Bug 1: deliveryType='delivery' перезаписывался на 'pickup' маппером из-за адреса/источника. Теперь если БД явно содержит delivery_type='delivery', маппер это уважает.
Bug 2: водитель не мог сохранить частичную отгрузку — добавлена кнопка 'Сохранить отгрузку' в DriverShipmentPanel + saveShipmentData() в репозитории.
Bug 3: при смене типа на самовывоз assigned_driver_id не очищался — добавлено assigned_driver_id: null в updatePayload.
- P0-1: Move all hooks (useState, useCallback, useMemo) before early return to fix Rules of Hooks violation
- P0-3: Replace 7 inline isPickupOrder checks with single computed variable
- P1: Extract getErrorMessage, normalizeNom to shared utils/deliveryUtils.js
- P1: Replace duplicate STATUS_LABELS with DELIVERY_GROUP_STATUS_LABELS import
- P1: Add requires_address to DELIVERY_GROUP_STATUS_LABELS
- Remove duplicate getErrorMessage from useOrderGroups.js and OrderDetailPanel.jsx
- Remove duplicate normalizeNom from OrderDetailPanel.jsx and orderGroupRepository.js
- Added delivery address input field in manual agreement form (visible when delivery type)
- Pickup switching clears delivery_address in DB, delivery switching preserves/updates it
- useOrderGroups passes deliveryType, deliveryAddress, pickupDate, pickupTimeSlot to API
- orderGroupRepository: updateOrderGroupDeliveryChoice now handles delivery_type and address
- Pickup orders: address cleared, pickup_date/pickup_time_slot saved
- Delivery orders: address saved, pickup fields cleared
- Updated tests to match new payload structure
- orderGroupRepository: detect pickup from source_orders.ship='САМОВЫВОЗ' and address='САМОВЫВОЗ'
- orderGroupRepository: set effectiveDeliveryType='pickup' when source data indicates pickup even if DB says 'delivery'
- orderGroupRepository: clear deliveryAddress when it's just 'САМОВЫВОЗ' placeholder
- OrderDetailPanel: dynamic header 'Карточка группы самовывоза' vs 'Карточка группы доставки'
- OrderDetailPanel: subtitle now includes orderNumbers for visibility
- OrderDetailPanel: label changed from 'Номер счёта' to 'Заказ' with '+N сч.' for sub-bills
- GroupDetailPage: neutral 'Группа не найдена' instead of 'Группа доставки не найдена'
- Added pickup-specific test case
- 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
Filter client delivery slots to tomorrow and the day after,\nkeep invalid delivery times out of the UI, and show a clearer\nerror state when saving fails.
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.