Files
TREK/client/src/components/Vacay/vacayFormat.ts
T
Maurice d0709c6a37 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.
2026-10-09 15:19:50 +02:00

4 lines
249 B
TypeScript

// Used/remaining can be fractional once half days (#552) are in play; entry
// fractions are exact multiples of 0.5, so one decimal is enough and never drifts.
export const fmtDays = (n: number) => (Number.isInteger(n) ? String(n) : n.toFixed(1));