fix: логисты могут ставить Доставлено без части дня + дублирующий индекс удалён
This commit is contained in:
parent
48e238e634
commit
3b93e755fb
|
|
@ -1197,7 +1197,11 @@ export const OrderDetailPanel = ({
|
|||
return statusOptions.map((statusOption) => {
|
||||
const isSelected = pendingStatus?.value === statusOption.value;
|
||||
const isMismatch = statusOption.mismatch;
|
||||
const blockedBySchedule = statusOption.requiresSchedule && !hasDeliverySchedule;
|
||||
const hasDeliveryDate = !!(order?.deliveryDate || order?.customerDate);
|
||||
const hasDeliverySchedule = hasDeliveryDate && !!(order?.deliveryTime || order?.deliveryHalfDay || order?.delivery_time);
|
||||
const canSkipHalfDay = ["logistician", "admin", "mega_admin", "manager"].includes(userRole);
|
||||
const scheduleReady = canSkipHalfDay ? hasDeliveryDate : hasDeliverySchedule;
|
||||
const blockedBySchedule = statusOption.requiresSchedule && !scheduleReady;
|
||||
return (
|
||||
<Button
|
||||
key={statusOption.value}
|
||||
|
|
|
|||
|
|
@ -87,7 +87,9 @@ const StatusActionPanel = ({
|
|||
<div className="flex flex-wrap gap-2">
|
||||
{allStatuses.map((statusOption) => {
|
||||
const isCurrent = currentStatus === statusOption.value;
|
||||
const blockedBySchedule = statusOption.requiresSchedule && !hasDeliverySchedule;
|
||||
const canSkipHalfDay = ["logistician", "admin", "mega_admin", "manager"].includes(userRole);
|
||||
const scheduleReady = canSkipHalfDay ? hasDeliveryDate : hasDeliverySchedule;
|
||||
const blockedBySchedule = statusOption.requiresSchedule && !scheduleReady;
|
||||
const blockedByDriver = statusOption.requiresDriver !== false && !hasDriver;
|
||||
const hint = getHint(statusOption.value);
|
||||
return (
|
||||
|
|
|
|||
Loading…
Reference in New Issue