added teams
This commit is contained in:
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user