added teams

This commit is contained in:
2026-02-12 21:10:49 +11:00
parent ba6929629d
commit c92c722ad5
25 changed files with 1327 additions and 52 deletions

View File

@@ -9,7 +9,7 @@ templ LeaguesSection(season *db.Season, allLeagues []*db.League) {
permCache := contexts.Permissions(ctx)
canAddLeague := permCache.HasPermission(permissions.SeasonsAddLeague)
canRemoveLeague := permCache.HasPermission(permissions.SeasonsRemoveLeague)
// Create a map of assigned league IDs for quick lookup
assignedLeagueIDs := make(map[int]bool)
for _, league := range season.Leagues {
@@ -66,7 +66,7 @@ templ LeaguesSection(season *db.Season, allLeagues []*db.League) {
for _, league := range availableLeagues {
<button
type="button"
hx-post={ "/seasons/" + season.ShortName + "/leagues/" + league.ShortName }
hx-post={ "/seasons/" + season.ShortName + "/leagues/add/" + league.ShortName }
hx-target="#leagues-section"
hx-swap="outerHTML"
class="flex items-center gap-2 bg-surface1 hover:bg-surface2 border border-overlay0 rounded-lg px-3 py-2 transition hover:cursor-pointer"