delivery slot creation

This commit is contained in:
2026-10-06 17:37:02 +05:30
parent 990dd0dc23
commit 56e8a95c6a
7 changed files with 498 additions and 2 deletions

View File

@@ -1,5 +1,5 @@
import type { ReactNode } from 'react';
import { ArrowDown, Bike, Check, MapPin, Phone, X } from 'lucide-react';
import { ArrowDown, Bike, Check, Clock, MapPin, Phone, X } from 'lucide-react';
import type { DeliveryRow, OrderItem, OrderRow } from '@/api/types';
import { orderStage, type Stage } from './orderProgress';
import { useDeliveryMoves } from './DeliveryProgress';
@@ -284,6 +284,23 @@ function Sheet({
</Section>
) : null}
{/* The window the customer asked for.
Shown only when one was chosen: most orders have none, and an empty
"Delivery window —" row on every one of them would be noise that
hides the orders where it matters. */}
{'deliveryslotdate' in row && (row as { deliveryslotdate?: string }).deliveryslotdate ? (
<Section title="Delivery window">
<DrawerCard tone="subtle">
<Row
label="Requested"
value={(row as { deliveryslotdate?: string }).deliveryslotdate}
icon={<Clock size={14} />}
/>
</DrawerCard>
</Section>
) : null}
{row.ordernotes || job?.notes ? (
<Section title="Notes">
<DrawerCard tone="subtle">