Commit Graph
2 Commits
Author SHA1 Message Date
vliaudatandClaude Opus 5 7312a121df feat: let the quick schedule changes target any day, not just today
Opening later and closing earlier were fixed to today, which was an
assumption rather than a requirement: closing next Thursday afternoon is
the same decision as closing this one, and the shop knows about it in
advance more often than not.

The date is a single control and still defaults to today, so the
two-click path for the most frequent case is unchanged.

The usual hours differ from one weekday to the next, and "opens later"
is late relative to them, so the whole sixty-day window is resolved on
the server and handed over at once. Sixty small entries cost less than a
round trip per change of date.

The date control's accessible name is explicit: "du" alone collided with
the "Du" field of the range form below it, which the end-to-end run
caught as an ambiguous locator — and an ambiguous locator is an
ambiguous label for anyone using a screen reader.

The end-to-end suite ran before this was pushed, unlike last time.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012cSY9pVhZmJUKNN7wf1Myd
2026-09-22 23:17:26 +02:00
vliaudatandClaude Opus 5 7d23b14ad8 feat: add the one-off schedule changes page
The page opens on the gesture the shop actually makes: changing today's
hours from a phone, behind the counter. "Closed today", "opens later at"
and "closes earlier at" are one tap plus a time, and each shows the
hours it would produce before it is applied.

The derivation is the delicate part and is pure and tested. Opening at
14:00 drops a 10:00-13:00 morning rather than keeping it, and trims the
slot the new time falls inside rather than dropping it. Closing early is
the mirror. Both are computed against what the day would normally be,
ignoring any exception already recorded, since that is what "late" is
late relative to.

The upcoming list is built by resolving each of the next sixty days, not
by reading the exception table. Vacations and public holidays are never
materialised as rows, so the table alone would quietly omit most of what
is actually in effect. Each entry is badged with the rule that produced
it, and only stored exceptions offer a delete.

Ranges are capped at 92 days and point at the holidays page beyond that:
a typo in a year field should produce an error, not thirty thousand rows.

Editing the French note clears the English one. A translation of text
that has changed is worse than no translation.

Three exports were removed from the actions module before committing:
every export in a 'use server' file becomes a publicly callable
endpoint, and those three had ended up unused.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012cSY9pVhZmJUKNN7wf1Myd
2026-09-20 19:11:28 +02:00