houseassassin
643fc62ddc
feat: remove estimated_cost, auto-calculate final_cost in OrderModal
...
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com >
2026-05-10 16:25:20 +03:00
houseassassin
05c1459e2f
fix: revert upsert to update in useSettings to satisfy RLS policy
...
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com >
2026-05-10 16:19:35 +03:00
houseassassin
73516f69a0
fix: convert empty numeric fields to null before insert/update orders
...
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com >
2026-05-10 16:18:07 +03:00
houseassassin
d4030d9c88
fix: integration fixes from final review
...
- useSettings: upsert instead of update (safe if migration rows missing)
- invite-admin-user: return created_at and last_sign_in_at in response
- UserManagementPage: clear deleteError when opening new confirmation
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com >
2026-05-10 13:14:59 +03:00
houseassassin
f6f5253f04
feat: add Users and Settings nav items and routes
...
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com >
2026-05-10 13:13:07 +03:00
houseassassin
aae78e95ca
feat: add telegram, max, address fields to OrderModal
...
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com >
2026-05-10 13:12:05 +03:00
houseassassin
769836714a
fix: UserManagementPage delete error feedback, input disable, date guard
...
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com >
2026-05-10 13:11:09 +03:00
houseassassin
4b244bf0bb
feat: add UserManagementPage component
2026-05-10 13:09:30 +03:00
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