feat: show delivery type (pickup/delivery) in logistics board + driver planner

This commit is contained in:
root 2026-06-30 09:04:27 +00:00
parent 858d36e5b0
commit c0c549adca
2 changed files with 10 additions and 1 deletions

View File

@ -419,6 +419,9 @@ export const DriverDeliveryPlanner = ({ orderGroups = [], onOpenOrder, currentUs
{getOrderGroupDeliveryHalfDay(item) ? ` · ${getOrderGroupDeliveryHalfDay(item)}` : ""} {getOrderGroupDeliveryHalfDay(item) ? ` · ${getOrderGroupDeliveryHalfDay(item)}` : ""}
</div> </div>
</div> </div>
<span className={`inline-flex items-center gap-1 rounded-full px-2.5 py-0.5 text-xs font-semibold shrink-0 ${item.deliveryType === "pickup" ? "bg-[var(--color-accent-soft)] text-[var(--color-accent)]" : "bg-[var(--color-surface-strong)] text-[var(--color-text-muted)]"}`}>
{item.deliveryType === "pickup" ? "🏪 Самовывоз" : "🚚 Доставка"}
</span>
</div> </div>
<div className="mt-3 text-sm text-[var(--color-text-muted)]"> <div className="mt-3 text-sm text-[var(--color-text-muted)]">

View File

@ -71,12 +71,13 @@ export const LogisticsReadinessBoard = ({ orderGroups = [], onSelectSet, statusO
const totalGroups = filteredGroups.length; const totalGroups = filteredGroups.length;
const COLS = "grid-cols-[minmax(140px,2fr)_minmax(80px,1fr)_minmax(100px,1.2fr)_minmax(80px,1fr)_minmax(100px,1fr)_minmax(120px,1fr)]"; const COLS = "grid-cols-[minmax(140px,2fr)_minmax(80px,1fr)_minmax(70px,0.7fr)_minmax(100px,1.2fr)_minmax(80px,1fr)_minmax(100px,1fr)_minmax(120px,1fr)]";
const TableHeader = () => ( const TableHeader = () => (
<div className={`grid ${COLS} gap-0 border-b border-[var(--color-border)] bg-[var(--color-surface-strong)] text-xs uppercase tracking-[0.14em] text-[var(--color-text-muted)]`}> <div className={`grid ${COLS} gap-0 border-b border-[var(--color-border)] bg-[var(--color-surface-strong)] text-xs uppercase tracking-[0.14em] text-[var(--color-text-muted)]`}>
<div className="px-4 py-3 font-medium">Клиент</div> <div className="px-4 py-3 font-medium">Клиент</div>
<div className="px-4 py-3 font-medium">Город</div> <div className="px-4 py-3 font-medium">Город</div>
<div className="px-4 py-3 font-medium">Тип</div>
<div className="px-4 py-3 font-medium">Дата доставки</div> <div className="px-4 py-3 font-medium">Дата доставки</div>
<div className="px-4 py-3 font-medium">Водитель</div> <div className="px-4 py-3 font-medium">Водитель</div>
<div className="px-4 py-3 font-medium">Статус</div> <div className="px-4 py-3 font-medium">Статус</div>
@ -172,6 +173,11 @@ export const LogisticsReadinessBoard = ({ orderGroups = [], onSelectSet, statusO
<div className="px-4 py-2.5 text-sm"> <div className="px-4 py-2.5 text-sm">
{group.city || group.customerAddress || "—"} {group.city || group.customerAddress || "—"}
</div> </div>
<div className="px-4 py-2.5">
<span className={`inline-flex items-center gap-1 rounded-full px-2.5 py-0.5 text-xs font-semibold ${group.deliveryType === "pickup" ? "bg-[var(--color-accent-soft)] text-[var(--color-accent)]" : "bg-[var(--color-surface-strong)] text-[var(--color-text-muted)]"}`}>
{group.deliveryType === "pickup" ? "🏪 Самовывоз" : "🚚 Доставка"}
</span>
</div>
<div className="px-4 py-2.5 text-sm"> <div className="px-4 py-2.5 text-sm">
{group.deliveryDate {group.deliveryDate
? <span>{formatDate(group.deliveryDate)}{group.deliveryTime ? <span className="text-[var(--color-text-muted)]"> · {group.deliveryTime}</span> : ""}</span> ? <span>{formatDate(group.deliveryDate)}{group.deliveryTime ? <span className="text-[var(--color-text-muted)]"> · {group.deliveryTime}</span> : ""}</span>