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
b154996500
fix: forward invite error status and add listUsers pagination
...
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com >
2026-05-10 13:05:26 +03:00
houseassassin
9ab728d721
fix: guard against null data.user in invite-admin-user Edge Function
...
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com >
2026-05-10 13:04:41 +03:00
houseassassin
1954577d6a
feat: add Edge Functions for admin user management
2026-05-10 13:02:17 +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
76b9913b09
fix: estimator always shows price (no false loading state)
2026-05-10 12:57:43 +03:00
houseassassin
9cfbee74e0
feat: estimator reads prices from DB via usePricing
2026-05-10 12:55:48 +03:00
houseassassin
775ad2d935
fix: usePricing handles DB errors and clears loading on failure
2026-05-10 12:54:28 +03:00
houseassassin
c0d9732706
feat: add usePricing hook reading prices from settings table
...
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com >
2026-05-10 12:48:11 +03:00
houseassassin
d7446c45af
docs: record DB migrations for admin panel v2
2026-05-10 12:47:15 +03:00
houseassassin
464cb3cab7
docs: add admin panel v2 implementation plan (10 tasks)
2026-05-10 12:37:27 +03:00
houseassassin
2b9903a6bf
docs: add admin panel v2 design spec (user mgmt, pricing, order fields)
2026-05-10 12:26:17 +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
f78b4dcb82
docs: mark admin panel spec as implemented
...
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com >
2026-05-07 20:35:08 +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
28df47ff00
fix: remove windows slider from Estimator (unused in cost formula)
2026-05-07 20:33:10 +03:00
houseassassin
72f8a4c126
feat: insert order to Supabase on lead form submit
...
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com >
2026-05-07 20:33:01 +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
houseassassin
cf6ef372c1
feat: add React Router, lazy-load admin routes
2026-05-07 20:06:20 +03:00
houseassassin
fa342235d9
feat: add Supabase, React Router, dnd-kit, recharts, Vitest
2026-05-07 20:04:19 +03:00