Commit Graph

17 Commits

Author SHA1 Message Date
root 2f2dae686c refactor: Phase 3 resilience — ErrorBoundary, split saving states, extract useStopWords
- ErrorBoundary: Russian UI, compact mode for card-level errors, reload button
- ErrorBoundary wraps OrderDetailPanel in GroupDetailPage + DeliverySetDetailPanel
- Split isSavingDeliveryChoice into 3 independent states:
  isSavingDeliveryChoice (delivery tab save)
  isSavingDriverAssignment (driver assign)
  isSavingStatusChange (status change)
- Extract useStopWords hook + matchesStopWord to shared hooks/useStopWords.js
- Remove 3x duplicated matchesStopWord from OrderDetailPanel, DriverShipmentPanel, OrderCompositionPanel
- Remove useStopWords + supabase import from OrderDetailPanel
2026-06-12 15:47:55 +00:00
root 55422ec65a feat: add skeleton loading states across all pages
- New Loading.jsx component library (Skeleton, SkeletonPanel, SkeletonPage, SkeletonTable, Spinner, LoadingBlock)
- Dashboard: SkeletonTable/SkeletonPage during isLoading
- OrdersTable, LogisticsReadinessBoard, DriverDeliveryPlanner: show skeleton instead of empty state
- ChatTimeline, DeliverySlotsPicker, GroupDetailPage: skeleton while loading
- AdminDashboard, StopWordsPanel, UserManagementPanel, ErrorLogPanel, ActionLogPanel: skeleton during initial load
- NotificationSettings: skeleton for push toggle and notification preferences
- ClientDeliveryPage: skeleton bars instead of text-only loading
2026-06-12 07:46:58 +00:00
root 7e43f9e990 feat: requires_address status + address input for pickup-to-delivery switch
- New status: requires_address (Требуется адрес) in deliveryWorkflow
- ClientDeliveryPage: address input shown when delivery chosen without address on file
- OrderDetailPanel: requires_address status badge + address input for manager
- confirm_delivery_choice_by_token RPC: p_delivery_address param, sets requires_address status
- Edge function: delivery_address passed to RPC
- deliveryInvitationApi: deliveryAddress param
- CHECK constraint: requires_address, address_required added
- PickupSlotsPicker: styled storage conditions info block
2026-06-10 14:52:17 +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 3c22eb71ab fix: case-insensitive stop word matching 2026-05-28 19:55:57 +00:00
root d0f2a72dda feat: stop words CRUD + client-side filtering 2026-05-27 14:28:52 +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
Codex 496abc761b fix(delivery): simplify public choice flow 2026-05-14 21:10:27 +03:00
Codex fc74241378 fix(delivery): show invoice refs in client flow 2026-05-14 12:51:25 +03:00
Codex b3b8657b43 fix: merge saved delivery status into choice block 2026-04-16 19:34:57 +03:00
Codex a867bf5464 fix: remove duplicate saved choice block 2026-04-16 18:18:45 +03:00
Codex de0cf49490 fix: show saved client delivery choice 2026-04-16 17:41:46 +03:00
Codex 31388f267d fix: make client delivery selection explicit 2026-04-16 17:23:43 +03:00
Codex c28c826601 feat: show client order items in delivery flow 2026-04-16 12:42:41 +03:00
Codex 49e60d48c1 feat: complete delivery workflow updates 2026-04-13 16:32:18 +03:00