playoff visual fixes
This commit is contained in:
@@ -21,6 +21,16 @@ templ FinalsSetupForm(
|
||||
} else if len(leaderboard) >= 5 && len(leaderboard) <= 6 {
|
||||
defaultFormat = string(db.PlayoffFormat5to6)
|
||||
}
|
||||
|
||||
// Prefill dates from existing season values
|
||||
endDateDefault := ""
|
||||
if !season.EndDate.IsZero() {
|
||||
endDateDefault = season.EndDate.Time.Format("02/01/2006")
|
||||
}
|
||||
finalsStartDefault := ""
|
||||
if !season.FinalsStartDate.IsZero() {
|
||||
finalsStartDefault = season.FinalsStartDate.Time.Format("02/01/2006")
|
||||
}
|
||||
}}
|
||||
<div class="max-w-3xl mx-auto">
|
||||
<div
|
||||
@@ -44,28 +54,30 @@ templ FinalsSetupForm(
|
||||
>
|
||||
<!-- Date Fields -->
|
||||
<div class="grid grid-cols-1 md:grid-cols-2 gap-6">
|
||||
<div>
|
||||
@datepicker.DatePicker(
|
||||
"regular_season_end_date",
|
||||
"regular_season_end_date",
|
||||
"Regular Season End Date",
|
||||
"DD/MM/YYYY",
|
||||
true,
|
||||
"",
|
||||
)
|
||||
<p class="text-xs text-subtext0 mt-1">Games after this date will be forfeited</p>
|
||||
</div>
|
||||
<div>
|
||||
@datepicker.DatePicker(
|
||||
"finals_start_date",
|
||||
"finals_start_date",
|
||||
"Finals Start Date",
|
||||
"DD/MM/YYYY",
|
||||
true,
|
||||
"",
|
||||
)
|
||||
<p class="text-xs text-subtext0 mt-1">First playoff matches begin on this date</p>
|
||||
</div>
|
||||
<div>
|
||||
@datepicker.DatePickerWithDefault(
|
||||
"regular_season_end_date",
|
||||
"regular_season_end_date",
|
||||
"Regular Season End Date",
|
||||
"DD/MM/YYYY",
|
||||
true,
|
||||
"",
|
||||
endDateDefault,
|
||||
)
|
||||
<p class="text-xs text-subtext0 mt-1">Last day of the regular season (inclusive)</p>
|
||||
</div>
|
||||
<div>
|
||||
@datepicker.DatePickerWithDefault(
|
||||
"finals_start_date",
|
||||
"finals_start_date",
|
||||
"Finals Start Date",
|
||||
"DD/MM/YYYY",
|
||||
true,
|
||||
"",
|
||||
finalsStartDefault,
|
||||
)
|
||||
<p class="text-xs text-subtext0 mt-1">First playoff matches begin on this date</p>
|
||||
</div>
|
||||
</div>
|
||||
<!-- Format Selection -->
|
||||
<div>
|
||||
|
||||
Reference in New Issue
Block a user