Author leave on the calendar itself

Planning used to mean filling in a wish list on one tab, pressing a button to
see a suggestion, then pressing another to accept it — with nothing on screen
telling you whether a plan was active. Dragging a range on the calendar now
creates the period directly, clicking a band opens it for editing, and each
change is recomputed and saved in one step. A period repeats never or yearly,
matching what the planner can actually express.

Clicking a day edits that day: its funding type, which pins it so the planner
leaves it alone, and whether the day counts as worked or off. That switch used
to be a mode covering the whole grid, which is what made the calendar confusing.

The season presets move to a rail beside the grid. Picking one lets the planner
choose the placement, then jumps there and flashes it, rather than asking the
user to guess dates the engine already knows.

A sync that funds nothing now says so, naming the period and how many days it
fell short, instead of leaving the screen unchanged and looking broken.
This commit is contained in:
2026-09-17 21:31:54 +02:00
parent 5e96c352fb
commit c2e64b504d
19 changed files with 3440 additions and 745 deletions
+44
View File
@@ -49,6 +49,10 @@ export const calendar = {
'plannedDayModal.leaveTypeLabel': 'Leave Type',
'plannedDayModal.newTitle': 'Plan a Day',
'plannedDayModal.parentLabel': 'Parent',
'plannedDayModal.pinnedNotice': 'This day is pinned by you — the planner will not change it automatically.',
'plannedDayModal.dayStatusLabel': 'This day is:',
'plannedDayModal.workdayOption': 'Working day',
'plannedDayModal.dayOffOption': 'Day off',
'plannedDayModal.rangeTitle': 'Plan {count} days',
'plannedDayModal.saveButton': 'Save',
'plannedDayModal.saveError': 'Failed to save planned day',
@@ -63,4 +67,44 @@ export const calendar = {
'redDaysList.overrideFree': 'Exception: day off',
'redDaysList.overrideWorking': 'Exception: working day',
'redDaysList.prevWindow': 'Previous 4 years',
// §Task7 — the calendar becomes the plan: drag-select, period popover,
// preset rail, and the sync toast/undo.
'calendar.newPeriodName': 'New period',
'calendar.periodCreateError': 'Failed to create the period',
'calendar.syncError': 'Failed to sync the plan',
'calendar.syncingLabel': 'Syncing…',
'calendar.toastChangedDays': '{name}: {count} day(s) changed',
'calendar.toastGenericPeriod': 'The period',
'calendar.toastShortfallNone':
'{name} ({start}–{end}): none of the {weeksWished} week(s) requested could be funded — {shortfallDays} day(s) short',
'calendar.toastShortfallPartial':
'{name} ({start}–{end}): only {weeksFunded} of {weeksWished} week(s) funded — {shortfallDays} day(s) short',
'calendar.undoButton': 'Undo',
'calendar.undoError': 'Failed to undo the change',
'calendar.dismissToastAria': 'Dismiss the message',
'calendar.railHeading': 'Add leave',
'calendar.railHint': 'Click to add — the calendar jumps to wherever it fits best.',
'calendar.presetAddAria': 'Add {name}',
'calendar.periodPopoverTitle': 'Edit period',
'calendar.periodAdHocTitle': 'Period',
'calendar.periodAdHocNotice': 'This period is not linked to a saved wish.',
'calendar.periodNameLabel': 'Name',
'calendar.periodNameAria': "The period's name",
'calendar.periodStartLabel': 'Start date',
'calendar.periodEndLabel': 'End date',
'calendar.periodRepeatLabel': 'Repeat',
'calendar.periodRepeatNever': 'Never',
'calendar.periodRepeatYearly': 'Yearly',
'calendar.periodLastYearLabel': 'Last year',
'calendar.periodSaveButton': 'Save period',
'calendar.periodSavingButton': 'Saving…',
'calendar.periodDeleteButton': 'Delete period',
'calendar.periodDeletingButton': 'Deleting…',
'calendar.periodDeleteConfirm': 'Are you sure you want to delete this period?',
'calendar.periodDeleteAdHocButton': 'Delete these days',
'calendar.periodCancelButton': 'Cancel',
'calendar.periodCloseAria': 'Close',
} as const