Remove bind of project month in resident calendar options

This commit is contained in:
2026-01-13 21:02:25 +02:00
parent 92a9c6d704
commit db7623528c
4 changed files with 10 additions and 15 deletions

View File

@@ -24,7 +24,12 @@ export class RotaState {
holidays = $state<CalendarDate[]>([]);
forbiddenPairs = $state<ForbiddenPair[]>([]);
projectMonth = $derived(new CalendarDate(this.selectedYear, this.selectedMonth, 1));
projectMonth = $state(new CalendarDate(2026, 2, 1));
syncProjectMonth() {
this.projectMonth = new CalendarDate(this.selectedYear, this.selectedMonth, 1);
}
projectMonthDays = $derived(this.projectMonth.calendar.getDaysInMonth(this.projectMonth));
daysArray = $derived(Array.from({ length: this.projectMonthDays }, (_, i) => i + 1));
emptySlots = $derived(Array.from({ length: getDayOfWeek(this.projectMonth, "en-GB") }));