Refactor calendar navigation with flexible day offsets

Improves date navigation by introducing dynamic period-based offsets for calendar views

Replaces week-based navigation with more flexible day offsets that support:
- Single-day and multi-day navigation
- Configurable work week presets with different period lengths
- More granular control over date range selection

Adds support for dynamic navigation periods through workweek preset configuration
This commit is contained in:
Janus C. H. Knudsen 2025-12-18 00:11:45 +01:00
parent 863b433eba
commit fa2eb66fb2
5 changed files with 526 additions and 43 deletions

View file

@ -6,27 +6,38 @@
"standard": {
"id": "standard",
"workDays": [1, 2, 3, 4, 5],
"label": "Man-Fre"
"label": "Man-Fre",
"periodDays": 7
},
"compressed": {
"id": "compressed",
"workDays": [1, 2, 3],
"label": "Man-Ons"
"label": "Man-Ons",
"periodDays": 7
},
"midweek": {
"id": "midweek",
"workDays": [4, 5],
"label": "Tors-Fre"
"label": "Tors-Fre",
"periodDays": 7
},
"weekend": {
"id": "weekend",
"workDays": [6, 7],
"label": "Weekend"
"label": "Weekend",
"periodDays": 7
},
"fullweek": {
"id": "fullweek",
"workDays": [1, 2, 3, 4, 5, 6, 7],
"label": "Alle dage"
"label": "Alle dage",
"periodDays": 7
},
"day": {
"id": "day",
"workDays": [1],
"label": "Dag",
"periodDays": 1
}
},
"defaultPreset": "standard",