Commit Graph

78 Commits

Author SHA1 Message Date
root e04485c446 feat: add-user modal dialog — compact, centered, backdrop 2026-05-27 11:53:54 +00:00
root 696f275567 fix: simple add-user form — 3 fields + small button 2026-05-27 11:50:12 +00:00
root 9009ffdfb0 feat: manage-users edge function, admin CRUD via API instead of direct supabase.auth.admin 2026-05-27 11:28:53 +00:00
root b9b227e524 feat: UserManagementPanel — themed dropdown, inline edit name/email/role 2026-05-27 11:23:37 +00:00
root bb6708e94b fix: mega_admin in GroupDetailPage + OrderDetailPanel role checks 2026-05-27 11:19:43 +00:00
root c59a806c2c fix: mega_admin role in UI checks + fix UserManagementPanel client→supabase 2026-05-27 11:17:41 +00:00
root 58a96355f1 fix: replace createClient with shared supabase singleton in useAdminStats and errorLogger 2026-05-27 10:59:37 +00:00
root 2fea387d43 fix: use shared supabase client with auth session in admin panels
- UserManagementPanel: replace createClient() with supabase from supabaseClient
- ErrorLogPanel: same — reuse authenticated supabase singleton
- Remove production_lead role from ROLES/ROLE_LABELS/ROLE_TONES
- Remove service_role key dependency — RLS handles auth
- Fixes: admin Users tab showing empty (RLS couldnt resolve auth.uid())
2026-05-27 09:50:07 +00:00
root c996805122 fix: duplicate client declaration 2026-05-27 08:55:35 +00:00
root f4a4082677 fix: remove service_role from ErrorLogPanel - use anon key + RLS 2026-05-27 08:54:49 +00:00
root 3934e6a872 feat: error log panel - delete, export JSON/CSV, select rows 2026-05-27 06:14:33 +00:00
root f451add13c fix: replace assign_driver RPC with direct supabase update 2026-05-26 19:55:35 +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
root cbc6242613 fix: remove TS annotations from jsx file 2026-05-25 15:34:03 +00:00
root ca6f160073 feat: secure auth storage - obfuscated sessionStorage instead of plaintext localStorage 2026-05-25 15:32:17 +00:00
root cf18ecb6ff fix: funnel show all steps, center KPI, top nav, roles RU, admin users tab 2026-05-25 13:17:24 +00:00
root 0d5fb1b79a mobile: responsive admin dashboard 2026-05-25 12:57:46 +00:00
root 79e1173dd3 funnel: outcomes only, SMS separate panel 2026-05-25 12:47:57 +00:00
root 011dd08f08 bump: SW cache v4 to force cache invalidation 2026-05-25 12:41:25 +00:00
root 40b28be0ee fix: automation funnel — correct data logic, remove emojis, rename to Воронка согласования 2026-05-25 12:31:58 +00:00
root 89d6a01b68 feat: add PWA install button to header 2026-05-22 14:10:08 +00:00
root a04e8edb6e feat: auto-restore push subscription + bump SW cache v3 2026-05-22 11:18:58 +00:00
root 5f88b2ca65 feat: role-based notification settings, push via DB trigger 2026-05-22 11:11:01 +00:00
root f099cf20d8 fix: update VAPID public key to match server-side keys 2026-05-22 10:59:39 +00:00
root bcf6f9d16f fix: JSX syntax error in Navigate component 2026-05-22 10:49:48 +00:00
root dc9d7de60f feat: push notifications + PWA notifications UI
- VAPID keys generated for web push
- push_subscriptions, notifications, notification_preferences tables
- DB triggers: auto-notify on order status change, driver assignment
- Edge functions: send-push-notification, subscribe-push, unsubscribe-push
- Frontend: NotificationBell, NotificationSettings components
- usePushNotifications hook (subscribe/unsubscribe push)
- useNotifications hook (fetch + realtime + mark read)
- Service worker: push event handler + notification click
- AppShell: notification bell in header
- DashboardPage: wired notifications
- manifest.webmanifest: name updated to SuperSam
- Caddyfile: CSP allows wss:// + fcm push
2026-05-22 10:48:33 +00:00
Codex 43c5f75055 feat: delivery page improvements and driver shipment workflow
- OrderCompositionPanel: flatten nested source_orders into product list, collapsed by default
- DeliverySlotsPicker: single-line heading 'Доставка завтра · 22.05.2026' instead of two-line
- OrderDetailPanel: add logistics status change panel, reorder sections (delivery date → driver → status → paid storage)
- OrderDetailPanel: require delivery date before assigning driver
- GroupDetailPage: dedicated route /dashboard/group/:groupId instead of modal
- DashboardPage: navigate to group detail page instead of opening modal
- DriverDeliveryPlanner: remove 'agreed' status, add city filter pills, group by status within dates
- DriverDeliveryPlanner: show delivery address instead of order numbers/ready count/SMS
- DriverShipmentPanel: new component with per-item checkboxes, ship-all, comments for unshipped items
- OrderDetailPanel: driver sees shipment panel + status buttons; 'delivered' requires all items shipped or commented
- Driver status: start from 'Назначено вам' (driver_assigned), not 'agreed'
- Remove duplicate header from GroupDetailPage
2026-05-22 12:53:43 +03:00
Codex 9abfbff654 feat: show order composition collapsed with product list from source_orders
- OrderCompositionPanel now collapsed by default with position count badge
- Flattens all products from source_orders into a single list
- RPC migration to extract items from source_orders (needs DB deploy)
- Edge Function updated to include source_orders items
- Removed Edge Function enrichment hack from fetchDeliveryInvitation
2026-05-21 14:18:10 +03:00
Codex e6dc1972fb feat: show full order composition on delivery page
- Extract OrderCompositionPanel as standalone component
- Support nested order items with sub-positions from source_orders
- Enrich order items from Edge Function when RPC only has invoice refs
- Update RPC SQL to extract product items from source_orders
- Update Edge Function to include source_orders items in invitation
- Add detail rows (account, customer) when no order items available
2026-05-21 11:52:46 +03:00
root 5a5636c738 fix: use npm install instead of npm ci for build reliability 2026-05-20 14:05:31 +00:00
root cfb4110d82 fix: Caddyfile static assets + update package-lock 2026-05-20 14:01:40 +00:00
Codex 6244749545 feat: unify manual_required status and driver label
- orderGroupViews: unify notification manual_required + pending delivery_status into single "Требуется ручное управление" status
- LogisticsReadinessBoard: use status:manual_required in funnel instead of delivery:manual_confirmation_required
- DriverDeliveryPlanner: show "Назначено вам" for driver_assigned instead of "Назначен водитель"
- Add sync-manual-status.sql trigger patch for backend
2026-05-20 16:25:06 +03:00
Codex 838c4cb7ae feat(paid-storage): bypass stale RPC for paid_storage transitions
- OrderDetailPanel: paid_storage bypasses update_delivery_status RPC
- Repository: direct table update for paid_storage entry/exit
- LogisticsBoard: collapsible sections ordered by funnel
- SQL: updated paid_storage schema patch
- LoginPage: hide dev quick-login in production
2026-05-20 16:25:06 +03:00
Codex c8fbe95bd1 feat(paid-storage): inline confirmation + cancel action + status display
- Replaced window.confirm with inline confirmation panel in app style
- Shows confirmation block with 'Yes, transfer' / 'Cancel' buttons
- After transfer: shows 'Transferred to paid storage' with date and yellow indicator
- Added cancel button to revert from paid_storage back to pending_confirmation
2026-05-20 16:25:06 +03:00
Codex 140fbc8122 fix(logistics): pass group.id instead of group object to onSelectSet 2026-05-20 16:25:06 +03:00
Codex a2196d232b feat(order-detail): collapsible order composition with table layout
- Extracted IIFE into CollapsibleOrderComposition component to fix React hooks error
- Состав заказа свернут по умолчанию, разворачивается по клику
- Позиции отображаются в табличном виде (grid 1fr + auto)
- Количество и единицы измерения не обрезаются (whitespace-nowrap)
- Парсинг работает из source_orders, order_list, order_list_structured
2026-05-20 16:25:06 +03:00
Codex 0d3be0502c fix(order-detail): show positions from order_list column
- parseOrderList now checks orderList first (Supabase), then orderListStructured, then sourceOrders
- removed debug output from UI rendering
- added flexible field fallbacks for position name/quantity/unit
2026-05-20 16:25:06 +03:00
Codex 874e9b3885 fix: debug order composition parsing and add visible error info 2026-05-20 16:25:06 +03:00
Codex 458414636d fix: parse order composition from source_orders field 2026-05-20 16:25:06 +03:00
Codex 3728ed0e95 fix: include order_list fields in queries and map to frontend object 2026-05-20 16:25:06 +03:00
Codex 0056e71b39 fix: add explicit text color and order composition to OrderDetailPanel 2026-05-20 16:25:06 +03:00
Codex f6bbfe1ba2 fix: add explicit text color to OrderDetailPanel value fields for dark theme visibility 2026-05-20 16:25:05 +03: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
Test 5e9da52690 Revert "test push"
This reverts commit db2ba331eb.
2026-05-20 13:09:02 +00:00
Test db2ba331eb test push 2026-05-20 13:08:57 +00:00
mihail 488e478841 Merge pull request 'fix(delivery): simplify public choice flow' (#2) from codex/delivery-rpc-deploy into main
Reviewed-on: https://git.supersamsev.ru/mihail/supersam/pulls/2
2026-05-14 18:17:59 +00:00
Codex 496abc761b fix(delivery): simplify public choice flow 2026-05-14 21:10:27 +03:00
mihail 2367ff2554 Merge pull request 'fix(delivery): show invoice refs in client flow' (#1) from codex/delivery-rpc-deploy into main
Reviewed-on: https://git.supersamsev.ru/mihail/supersam/pulls/1
2026-05-14 10:22:16 +00:00