map is the resting state of the rider and store views

Opening dispatch showed "Pick one to see its stops" over an empty panel.
That wastes the first look: the whole day IS the answer to "where is my
work", and an operator usually only wants to narrow after seeing it.

Both views now open on the map, drawn from every stop in range. Picking a
rider or a shop filters it; it no longer summons it. The customer view keeps
its placeholder — one customer's drops are all at one address, so there is
no shape to open onto.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JYEsb8PNZ19G9R8gUjTU7n
This commit is contained in:
2026-09-10 11:26:09 +05:30
parent e069068ce7
commit 79a8f2b234

View File

@@ -337,6 +337,31 @@ export function DispatchPage() {
} }
: {})} : {})}
/> />
) : mode === 'riders' || mode === 'stores' ? (
/*
The map is the resting state of these two views, not a reward for
picking something. Opening dispatch to a placeholder that says
"pick one" wastes the first look: the whole day IS the answer to
"where is my work", and the operator often only wants to narrow
after seeing it. Picking a rider or a shop filters this map; it
does not summon it.
*/
<Card padding={0} elevation="low">
<VStack gap={1.5} padding={2}>
<HStack justify="between" align="center" gap={2} wrap="wrap">
<Text type="label" size="lg" weight="semibold">
{mode === 'riders' ? 'Everyone on the road' : 'Every shop'}
</Text>
<Text type="body" size="sm" color="secondary">
{stops.length} stop{stops.length === 1 ? '' : 's'} · {moneyExact(totals.value)}
</Text>
</HStack>
<GroupMap
stops={stops}
groupName={isOneDay ? 'this day' : 'this range'}
/>
</VStack>
</Card>
) : ( ) : (
<Card padding={0} elevation="low"> <Card padding={0} elevation="low">
<VStack gap={1} padding={4} align="center"> <VStack gap={1} padding={4} align="center">