Adds work week configuration feature

Implements configurable work week presets, allowing users to customize the days displayed in the calendar.

This includes:
- Defining work week settings (work days, day names, total days).
- Providing predefined work week presets (standard, compressed, weekend, full week).
- Adding UI elements to switch between presets.
- Updating grid and header rendering logic to reflect the selected work week.
- Emitting events when the work week changes, triggering necessary UI updates and data re-renders.

This provides a more flexible and personalized calendar experience.
This commit is contained in:
Janus Knudsen 2025-08-18 22:27:17 +02:00
parent 26f0cb8aaa
commit d017d48bd6
11 changed files with 283 additions and 34 deletions

View file

@ -60,19 +60,21 @@ export class GridStyleManager {
return resourceData.resources.length;
} else if (calendarType === 'date') {
const dateSettings = this.config.getDateViewSettings();
const workWeekSettings = this.config.getWorkWeekSettings();
switch (dateSettings.period) {
case 'day':
return 1;
case 'week':
return dateSettings.weekDays;
return workWeekSettings.totalDays;
case 'month':
return 7;
return workWeekSettings.totalDays; // Use work week for month view too
default:
return dateSettings.weekDays;
return workWeekSettings.totalDays;
}
}
return 7; // Default
return this.config.getWorkWeekSettings().totalDays; // Default to work week
}
/**