houseassassin
3bbcf7e256
fix: useAdminUsers null guard, unmount cleanup, split test
...
- Guard setUsers against null data with nullish coalescing (data ?? [])
- Add isMounted flag in useEffect to prevent setState after unmount
- Split combined inviteUser+deleteUser test into two independent it blocks
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com >
2026-05-10 13:08:07 +03:00
houseassassin
9189cc1b55
feat: add useAdminUsers hook + tests
2026-05-10 13:06:31 +03:00
houseassassin
f6a01812cd
feat: add admin SettingsPage for configurable pricing
2026-05-10 13:00:30 +03:00
houseassassin
52b5b77bc4
feat: add useSettings hook for admin price management
...
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com >
2026-05-10 12:59:02 +03:00
houseassassin
54b4356b89
fix: move setLoading to effect to satisfy react-hooks lint rule
2026-05-07 20:38:36 +03:00
houseassassin
05396b2217
fix: remove unused React imports, fix lint errors in admin panel
...
Remove bare `import React` from all admin panel JSX files (React 19 + Vite JSX transform makes it unnecessary) and add explicit vitest globals import to placeholder.test.js.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com >
2026-05-07 20:36:22 +03:00
houseassassin
5f8a71104e
fix: CompletedOrdersTable CSV quoting, error handling, button disabled state
...
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com >
2026-05-07 20:34:16 +03:00
houseassassin
a6038abc1f
fix: useAnalytics sort revenue by month, add error handling and test coverage
...
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com >
2026-05-07 20:32:01 +03:00
houseassassin
c34c99d86a
fix: memoize date range in AnalyticsDashboard to prevent infinite refetch
2026-05-07 20:31:49 +03:00
houseassassin
5714f99cbe
feat: add CompletedOrdersTable with sorting and CSV export
...
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com >
2026-05-07 20:30:53 +03:00
houseassassin
99c6624af7
feat: add AnalyticsDashboard with period selector and KPI cards
2026-05-07 20:30:25 +03:00
houseassassin
b19ab501cb
feat: add FunnelChart, RevenueChart, ObjectTypeChart, AvgTimeChart
2026-05-07 20:29:06 +03:00
houseassassin
ff84f89f29
fix: optimistic DnD updates, focus trap, film_thickness coercion, closed_at reset
...
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com >
2026-05-07 20:29:05 +03:00
houseassassin
fcc86fd7b9
feat: add useAnalytics hook with KPI and chart data aggregation
...
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com >
2026-05-07 20:27:30 +03:00
houseassassin
7089737f76
feat: add Kanban board with drag-and-drop, OrderModal create/edit
...
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com >
2026-05-07 20:25:28 +03:00
houseassassin
34a2f10b67
fix: useOrders unmount guard, log event errors, complete status coverage in tests
2026-05-07 20:19:45 +03:00
houseassassin
72407fa9b8
feat: add useOrders hook with CRUD, status updates, and Realtime
...
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com >
2026-05-07 20:18:15 +03:00
houseassassin
bb8d20a853
fix: move refreshBadge into effect, add logout error handling
...
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com >
2026-05-07 20:16:44 +03:00
houseassassin
735d0a88cb
feat: add AdminLayout with dark sidebar and sticky header
2026-05-07 20:15:28 +03:00
houseassassin
5628f45c71
fix: LoginPage accessibility (labels, alert), open-redirect guard
2026-05-07 20:14:06 +03:00
houseassassin
b52e3685ac
feat: add ProtectedRoute and LoginPage
2026-05-07 20:12:55 +03:00
houseassassin
713eee7912
fix: also guard onAuthStateChange callback with active flag
2026-05-07 20:11:59 +03:00
houseassassin
f6b66efd02
fix: guard useAuth against unmount race, return error from logout
2026-05-07 20:11:23 +03:00
houseassassin
418b4b7cac
feat: add useAuth hook with Supabase Auth session management
...
Implements useAuth with getSession, onAuthStateChange, login, and logout.
All 6 TDD tests pass, using vi.hoisted to resolve Vitest mock hoisting.
2026-05-07 20:07:53 +03:00