Commit Graph

22 Commits

Author SHA1 Message Date
root eabf30bceb fix: stop SMS UI for terminal delivery statuses (picked_up/delivered/cancelled)
- SmsStatusCard: show "SMS не отправляется" when delivery is terminal, hide countdown + restart buttons
- SmsCampaignPanel fmtAgreement: check terminal status FIRST → " Самовывоз завершён" instead of "Самовывоз (неполно)"
- update_delivery_status RPC: reset notification_status→completed on terminal transition
- Add completed to notification_status check constraint
- SW v60→v61
2026-07-04 11:27:03 +00:00
root 43d9116c51 fix: restore localStorage filter persistence in LogisticsReadinessBoard, SW v60 2026-07-03 15:04:05 +00:00
root 468c3c4097 fix: sessionStorage→localStorage for filter persistence, SW v59 2026-07-03 14:14:00 +00:00
root 1d288279c0 fix: extractCity word boundary + filter persistence in sessionStorage 2026-07-03 14:07:13 +00:00
root 8ade6a6ff3 fix: fallback fresh slots when all availableSlots passed + SW v57 2026-07-03 13:37:42 +00:00
root a74a5242b8 fix: use current date for slot availability + SW v56 2026-07-03 13:32:24 +00:00
root e93215f837 feat: SMS filter no_sms in queue + SW v55 2026-07-03 13:26:13 +00:00
root 6a34f36621 SW v54 — business schedule 2026-07-03 12:45:26 +00:00
root db57624626 merge: resolve conflicts (our SmsCampaignPanel + SW v43) 2026-07-01 16:20:12 +00:00
root b78bdc48bb feat: drag-n-drop status sections + localStorage filters/collapsed + pickup date in logistics board
- Drag-n-drop reordering of status sections (desktop + touch)
- Section order saved in localStorage (logistics-section-order)
- Collapsed/expanded state saved in localStorage (logistics-collapsed)
- Filters (city, status, search) saved in localStorage (logistics-filters)
- Pickup date shown in delivery date column for self-pickup orders
- SMS campaign scripts (manual, second, paid_storage, timer manager)
- SmsCampaignStats + SmsStatusCard components
- DashboardPage: unified LogisticsReadinessBoard for all roles
- OrdersTable cleanup, StatusActionPanel updates
- SW v42
2026-07-01 16:16:22 +00:00
root 4215001ab7 feat: test_mode toggle in admin + cache bump v10
- test_mode + test_phone columns in sms_campaign_settings (DB)
- Script reads test_mode from DB settings, not env vars
- Admin panel: toggle Test/Production mode with visual indicator
- test_mode=true (default): SMS only to test_phone
- test_mode=false: SMS to real customers
- Service worker cache v9 → v10 (fixes white screen)
2026-06-23 08:58:59 +00:00
root 17fe2125a5 fix: replace Button with native button for mobile cards — proper left-align
Button component forces inline-flex items-center justify-center rounded-full
which was overriding all alignment. Switched to native <button> with
flex flex-col items-start justify-start. SW v8→v9.
2026-06-18 18:35:42 +00:00
root 28ccb655d3 fix: mobile card — no phone, show ordersTotal badge, cache-control headers
Mobile: removed phone + buildGroupSummary, kept name + type badge + status +
  order numbers + count badge (N сч.)
Caddyfile: Cache-Control immutable for assets, no-cache for HTML+SW
SW v7→v8
2026-06-18 17:56:37 +00:00
root 7b773dd4aa fix: mobile card left-align (!items-start !justify-start override Button center)
Button base has inline-flex items-center justify-center — overriding with
!important Tailwind utilities for mobile cards. SW cache v6→v7.
2026-06-18 17:48:19 +00:00
root 921b7dbf00 fix: bump SW cache v5→v6, force client cache bust 2026-06-18 17:33:14 +00:00
root e05613ac1d feat: add pickup (самовывоз) delivery type
- New status pickup in delivery workflow
- DB: delivery_type, pickup_date, pickup_time_slot columns
- Client page: tabs Доставка/Самовывоз with PickupSlotsPicker
- PickupSlotsPicker: today/tomorrow/day-after with half-day slots
- Storage notice: free 2 workdays, then 300₽/day
- OrderDetailPanel: delivery type tabs, pickup date/time, status button
- Edge function: delivery_type/pickup fields in confirm-delivery-choice
- RPC: confirm_delivery_choice_by_token updated for pickup
- orderGroupRepository: full pickup field mapping
2026-06-10 12:02:46 +00:00
root 011dd08f08 bump: SW cache v4 to force cache invalidation 2026-05-25 12:41:25 +00:00
root a04e8edb6e feat: auto-restore push subscription + bump SW cache v3 2026-05-22 11:18:58 +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 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 5dcfa80940 Polish demo UI and delivery filters 2026-05-13 18:59:30 +03:00
Codex b40a4a553e Initial import 2026-03-14 18:40:54 +03:00