From 48e238e634fbdb3feba4653963e60cc424258736 Mon Sep 17 00:00:00 2001 From: root Date: Tue, 14 Jul 2026 18:00:35 +0000 Subject: [PATCH] =?UTF-8?q?fix:=20=D0=BB=D0=BE=D0=B3=D0=B8=D1=81=D1=82?= =?UTF-8?q?=D1=8B=20=D0=BC=D0=BE=D0=B3=D1=83=D1=82=20=D1=81=D1=82=D0=B0?= =?UTF-8?q?=D0=B2=D0=B8=D1=82=D1=8C=20=D0=BF=D1=80=D0=BE=D1=88=D0=B5=D0=B4?= =?UTF-8?q?=D1=88=D0=B8=D0=B5=20=D0=B4=D0=B0=D1=82=D1=8B=20+=20dedup=20?= =?UTF-8?q?=D1=82=D1=80=D0=B8=D0=B3=D0=B3=D0=B5=D1=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/AppShell.jsx | 9 +++++++++ src/components/orders/OrderDetailPanel.jsx | 5 +++-- src/components/orders/SmsStatusCard.jsx | 17 +++++++++++++++++ src/components/orders/StatusActionPanel.jsx | 16 ++++++++++++---- 4 files changed, 41 insertions(+), 6 deletions(-) diff --git a/src/AppShell.jsx b/src/AppShell.jsx index 53a162d..2a1a744 100644 --- a/src/AppShell.jsx +++ b/src/AppShell.jsx @@ -85,6 +85,9 @@ export const AppShell = ({ + @@ -124,6 +127,9 @@ export const AppShell = ({ + + diff --git a/src/components/orders/OrderDetailPanel.jsx b/src/components/orders/OrderDetailPanel.jsx index 834a526..3eec303 100644 --- a/src/components/orders/OrderDetailPanel.jsx +++ b/src/components/orders/OrderDetailPanel.jsx @@ -722,7 +722,8 @@ export const OrderDetailPanel = ({ return; } - if (!isFutureDeliveryDate(effectiveDate)) { + const canUsePastDate = ["logistician", "admin", "mega_admin", "manager"].includes(userRole); + if (!canUsePastDate && !isFutureDeliveryDate(effectiveDate)) { setFormMessage(deliveryType === "pickup" ? "Выберите дату самовывоза позже сегодняшнего дня." : "Выберите дату доставки позже сегодняшнего дня."); return; } @@ -1337,7 +1338,7 @@ export const OrderDetailPanel = ({ - {userRole !== "driver" && order?.deliveryLink ? ( + {order?.deliveryLink ? ( Ссылка на согласование

diff --git a/src/components/orders/SmsStatusCard.jsx b/src/components/orders/SmsStatusCard.jsx index 408277d..1b84acc 100644 --- a/src/components/orders/SmsStatusCard.jsx +++ b/src/components/orders/SmsStatusCard.jsx @@ -261,6 +261,23 @@ export const SmsStatusCard = ({ order, userRole }) => { )} + {/* Client page access info */} + {(order.invitationAccessCount > 0 || order.invitationOpenedAt) ? ( +

+ 👁 Клиент открывал страницу согласования + {order.invitationAccessCount || 1} раз + {(order.invitationLastAccessedAt || order.invitationOpenedAt) && ( + + · последний: {fmtTime(order.invitationLastAccessedAt || order.invitationOpenedAt)} + + )} +
+ ) : ( +
+ 📭 Клиент ещё не открывал страницу согласования +
+ )} + {/* Restart buttons */} {canManage && (
diff --git a/src/components/orders/StatusActionPanel.jsx b/src/components/orders/StatusActionPanel.jsx index 862b671..0664df5 100644 --- a/src/components/orders/StatusActionPanel.jsx +++ b/src/components/orders/StatusActionPanel.jsx @@ -42,7 +42,7 @@ const StatusActionPanel = ({ { value: "pending_confirmation", label: "Ожидает согласования" }, { value: "agreed", label: "Согласовано" }, { value: "driver_assigned", label: "Назначен водитель" }, - { value: "picked_up", label: "Вывезено", primary: true, requiresSchedule: true }, + { value: "picked_up", label: "Вывезено", primary: true, requiresSchedule: true, requiresDriver: false }, { value: "delivered", label: "Доставлено", mismatch: true, requiresSchedule: true }, { value: "requires_address", label: "Требуется адрес" }, { value: "problem", label: "Проблема" }, @@ -52,7 +52,7 @@ const StatusActionPanel = ({ { value: "pending_confirmation", label: "Ожидает согласования" }, { value: "agreed", label: "Согласовано" }, { value: "driver_assigned", label: "Назначен водитель" }, - { value: "delivered", label: "Доставлено", primary: true, requiresSchedule: true }, + { value: "delivered", label: "Доставлено", primary: true, requiresSchedule: true, requiresDriver: true }, { value: "picked_up", label: "Вывезено", mismatch: true, requiresSchedule: true }, { value: "requires_address", label: "Требуется адрес" }, { value: "problem", label: "Проблема" }, @@ -79,7 +79,7 @@ const StatusActionPanel = ({ {!hasDeliverySchedule && ( ⚠ Дата не указана )} - {!hasDriver && ( + {!hasDriver && !isPickup && ( ⚠ Водитель не назначен )}
@@ -88,6 +88,7 @@ const StatusActionPanel = ({ {allStatuses.map((statusOption) => { const isCurrent = currentStatus === statusOption.value; const blockedBySchedule = statusOption.requiresSchedule && !hasDeliverySchedule; + const blockedByDriver = statusOption.requiresDriver !== false && !hasDriver; const hint = getHint(statusOption.value); return (