refactor(vacay): share the calendar logging logic between desktop and phone

The log mode and its half and comp modifiers, the entry, shared and company holiday maps, the trip dots, the day click rules, the default person and the day count format lived in both the desktop calendar and the phone screen. They now live in useVacayCalendarLogic and vacayFormat; the phone keeps reloading trip dots only on a new window shape.
This commit is contained in:
Maurice
2026-10-09 10:23:49 +02:00
parent 18eeb16aa0
commit d0709c6a37
9 changed files with 453 additions and 207 deletions
@@ -201,8 +201,8 @@ describe('useMVacay', () => {
});
const { result } = await mount();
expect(result.current.dayCtx.sharedMap?.['2026-07-01']).toEqual([{ color: '#f59e0b' }]);
expect(result.current.dayCtx.sharedMap?.['2026-07-02']).toEqual([{ color: '#f59e0b' }]);
expect(result.current.dayCtx.sharedMap?.['2026-07-01']).toEqual([expect.objectContaining({ color: '#f59e0b' })]);
expect(result.current.dayCtx.sharedMap?.['2026-07-02']).toEqual([expect.objectContaining({ color: '#f59e0b' })]);
expect(result.current.dayCtx.sharedMap?.['2026-07-03']).toBeUndefined();
});