From 755385cf0e91930965ca9c91019410e5e596e3c8 Mon Sep 17 00:00:00 2001 From: root Date: Mon, 13 Jul 2026 13:16:48 +0000 Subject: [PATCH] fix: StatusActionPanel smart hints + driver name lookup + logistician can edit shipment + completed label MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 1. StatusActionPanel: all buttons clickable (no more manual:false blocking) - Click on current status shows actual state: "Водитель уже назначен: Иван" - "Назначен водитель" clickable even if already assigned - "Согласовано" clickable even if already agreed 2. Status indicators: green badges ✓ Дата согласована / ✓ Водитель: имя + warning badges if missing 3. DriverAssignmentPanel: look up driver name from drivers list if assignedDriverName is empty (Supabase join failed) 4. DriverShipmentPanel: now visible to logistician/admin too — can edit shipment data (fix wrong driver checkboxes) 5. SmsStatusCard: add completed label ("Завершено") --- .../orders/DriverAssignmentPanel.jsx | 2 +- src/components/orders/OrderDetailPanel.jsx | 2 +- src/components/orders/SmsStatusCard.jsx | 2 + src/components/orders/StatusActionPanel.jsx | 123 +++++++++++------- 4 files changed, 79 insertions(+), 50 deletions(-) diff --git a/src/components/orders/DriverAssignmentPanel.jsx b/src/components/orders/DriverAssignmentPanel.jsx index b1761ef..fb40dd7 100644 --- a/src/components/orders/DriverAssignmentPanel.jsx +++ b/src/components/orders/DriverAssignmentPanel.jsx @@ -122,7 +122,7 @@ const DriverAssignmentPanel = ({ Водитель назначен
- {order.assignedDriverName || "Водитель назначен"} + {order.assignedDriverName || drivers.find((d) => d.id === order.assignedDriverId)?.name || "Водитель назначен"}