Commit Graph

14 Commits

Author SHA1 Message Date
root 7dfdd91798 fix: comprehensive error logging — all errors now captured in client_error_logs
- safeSupabaseCall: logs caught errors via logError
- AuthContext: logs sendOtp, verifyOtp errors
- ErrorLogPanel: fixed client→supabase reference in delete functions
- AuthContext: sets window.__supersam_user_id__ on auth state change
2026-05-27 15:30:33 +00:00
root 41e36299b7 fix: persist signed-out flag in sessionStorage to block auto-login after logout 2026-05-26 17:53:21 +00:00
root 8a8446bfec fix: prevent session restore after signOut with signedOutRef flag 2026-05-26 14:43:43 +00:00
root 844f052462 fix: kill session on signOut, .maybeSingle() for 406, remove StrictMode 2026-05-26 14:36:50 +00:00
Codex b9c6bb2810 fix: RLS recursion, driver UI, auth errors, status counts
- Fix infinite RLS recursion in users policies via current_role_name()
- Add is_admin() helper and simplify users select policies
- Fix order_groups insert for service_role (n8n integration)
- Fix status option counts in dropdown (LogisticsReadinessBoard)
- Add driver delivery status buttons (loaded, on_route, delivered, problem, cancelled)
- Replace driver date range filters with single date picker + date pills
- Hide SMS/internal data from driver view in OrderDetailPanel
- Fix Edge Function error messages in OTP flow (read error.context body)
- Add update_delivery_status RPC for driver workflow
- Remove customer column from order_groups fetch (DB schema mismatch)
- UI: swap filter/search positions, limit modal width, status label cleanup
2026-05-20 16:25:05 +03:00
Codex b79de7afba feat(delivery): auto-create invitation links
Add a Supabase trigger that creates delivery invitations and writes delivery_link on order_groups changes. n8n can now consume link_ready rows without calling the edge function first.
2026-05-13 18:59:30 +03:00
Codex f2230f3277 Add logistics UI actions and demo login buttons
- Fix bug in transfer-to-logistics: body.note was incorrectly used for delivery_agreement_status
- Add quick actions section in OrderDetailPanel for status changes (visible to role)
- Add driver assignment buttons for logistician/admin
- Add demo login buttons for all roles (works with real Supabase config)
- Add loginAsDemoUser function to AuthContext for quick demo login
2026-05-13 18:59:30 +03:00
Codex e29a51e7ea Harden auth and delivery endpoints 2026-05-13 18:59:30 +03:00
Codex 5dcfa80940 Polish demo UI and delivery filters 2026-05-13 18:59:30 +03:00
Codex ffc7f3a97d fix: speed up otp login 2026-04-16 16:30:36 +03:00
Codex b147d632e8 feat: add role switch login and clean production copy 2026-04-14 23:01:02 +03:00
Codex 49e60d48c1 feat: complete delivery workflow updates 2026-04-13 16:32:18 +03:00
Codex a534d53e61 feat: tighten email otp auth flow 2026-04-09 22:35:13 +03:00
Codex b40a4a553e Initial import 2026-03-14 18:40:54 +03:00