feat(frontend): workday summary modal, print analytics UI, staff zone-PIN management, report upgrades

manager_dashboard:
- DashboardPage: WorkdaySummaryModal integration (view / close-day flows); revenue chart upgrades
- WorkdaySummaryModal: new component — shows full shift/revenue summary before closing the day
- StaffTab: full rewrite — zone-assignment modal, reset-PIN modal, actions dropdown, richer staff card
- ProductsTab: digital-menu fields surfaced in product form
- PrintFontsTab: expanded font-size/weight controls per printer channel
- TablesConfigTab / TablesPage / tableColourStore: color picker and zone fields for tables
- FilterBar: unified filter component with date-range, printer, and category selectors
- CategoryPerformance / ProductPerformance / TableAnalytics: donut/bar charts,
  thermal+browser print modals, richer breakdown tables
- PrinterHistory: redesigned with per-printer drill-down and summary blocks
- TrafficAnalytics / WorkDaySummary / RevenueTrends / ShiftsOverview / StaffLeaderboard: polish pass
- tokens.js: design token updates

waiter_pwa:
- TableCard: show table color indicator from zone/colour config

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-06-07 20:28:23 +03:00
co-authored by Claude Sonnet 4.6
parent 79bd3b0f41
commit ac7ec45279
21 changed files with 3352 additions and 644 deletions
+15 -1
View File
@@ -94,7 +94,21 @@ export const fmtTime = (iso) => {
}
export const fmtDate = (iso) => {
if (!iso) return '—'
return new Date(iso).toLocaleDateString('en-GB', { weekday: 'short', day: '2-digit', month: 'short' })
// Parse as local time by replacing the T separator so Date treats it as local
const d = new Date(String(iso).replace('T', ' '))
if (isNaN(d)) return String(iso)
const day = String(d.getDate()).padStart(2, '0')
const month = String(d.getMonth() + 1).padStart(2, '0')
const year = d.getFullYear()
return `${day}/${month}/${year}`
}
// Format a raw YYYY-MM-DD string (from a date picker) as DD/MM/YYYY without any timezone conversion
export const fmtDateStr = (yyyymmdd) => {
if (!yyyymmdd) return '—'
const [y, m, d] = String(yyyymmdd).split('-')
if (!y || !m || !d) return yyyymmdd
return `${d}/${m}/${y}`
}
export const fmtDateTime = (iso) => {
if (!iso) return '—'