5a5f5c554b
Adds an admin Reports screen (/setup/reports, gated report:read) — an on-demand dashboard over the signed event log. Server (ledger-first): GET /api/reports/summary?from&to&bucket aggregates in one call — entry/exit counts + all money summed straight from ledger_events (same source the shift Z-report reconciles, so totals tie out to the drawer); revenue split into ticket / subscription-sale / out-of-window mirrors the Z-report. Duration stats come from the sessions cache (flagged). All bucketing is in the SITE timezone (siteTz). A .csv export of the per-bucket series. reports.ts + routes/reports.ts. Web: Reports.tsx — date-range presets (today/7d/30d/90d), hour/day/month grain, KPI cards, entry/exit line, revenue bar + cash/card split, revenue-mix pie, peak-hours histogram, numeric breakdown, subscription stats. Charts via Recharts (MIT), lazy-loaded into its own chunk (~111KB gz) so the booth bundle is untouched. New Setup tab + nav + i18n (sq + en parity). asc() exported from @parking/db; formatMinutes helper. Tests: reports.test.ts (10) pin the sums, tz bucketing, money split, duration stats, subscription counts. server 90/90; build+lint 14/14. Wiki: reporting-analytics.md "Built v1" section + log entry. Claude-Session: https://claude.ai/code/session_01Xcm6ikLgGoCxxHrxtjkk5V
44 lines
1.2 KiB
JSON
44 lines
1.2 KiB
JSON
{
|
|
"name": "@parking/web",
|
|
"version": "0.0.0",
|
|
"private": true,
|
|
"type": "module",
|
|
"scripts": {
|
|
"dev": "vite",
|
|
"build": "tsc -b && vite build",
|
|
"preview": "vite preview",
|
|
"typecheck": "tsc --noEmit",
|
|
"lint": "tsc --noEmit",
|
|
"test": "vitest run"
|
|
},
|
|
"dependencies": {
|
|
"@parking/shared": "workspace:*",
|
|
"@radix-ui/react-dialog": "^1.1.17",
|
|
"@radix-ui/react-dropdown-menu": "^2.1.18",
|
|
"@radix-ui/react-tabs": "^1.1.15",
|
|
"@tanstack/react-query": "^5.101.0",
|
|
"@tanstack/react-router": "^1.170.16",
|
|
"@tauri-apps/plugin-process": "^2.3.1",
|
|
"@tauri-apps/plugin-updater": "^2.10.1",
|
|
"i18next": "^26.3.1",
|
|
"react": "19.2.7",
|
|
"react-dom": "19.2.7",
|
|
"react-i18next": "^17.0.8",
|
|
"recharts": "^3.2.1",
|
|
"zustand": "^5.0.14"
|
|
},
|
|
"devDependencies": {
|
|
"@tailwindcss/vite": "^4.3.1",
|
|
"@tanstack/react-router-devtools": "^1.167.0",
|
|
"@types/react": "19.2.17",
|
|
"@types/react-dom": "19.2.3",
|
|
"@testing-library/react": "^16.1.0",
|
|
"@vitejs/plugin-react": "6.0.2",
|
|
"jsdom": "^25.0.1",
|
|
"tailwindcss": "^4.3.1",
|
|
"typescript": "6.0.3",
|
|
"vite": "8.0.16",
|
|
"vitest": "^4.1.9"
|
|
}
|
|
}
|