Files
edr-platform/apps/edr-freight-web/backoffice/src/pages/warehouses/DispatchQueuePage.tsx
2026-06-20 10:30:31 +00:00

33 lines
1.0 KiB
TypeScript

import { Card } from '@mantine/core';
import { PageContainer, PageHeader } from '@/components/page';
import { InventoryWorkbench, VisualEmptyState } from '@/components/warehouses';
import { useWarehouseInventory } from '@/hooks/useWarehouses';
/** Items that are LOADED and awaiting dispatch (train departure). */
export default function DispatchQueuePage() {
const { data, isLoading } = useWarehouseInventory({ status: 'LOADED' });
const items = data ?? [];
return (
<PageContainer>
<PageHeader
title="Dispatch Queue"
subtitle="Loaded inventory awaiting train departure. Mark items dispatched once they leave."
/>
<Card>
{!isLoading && items.length === 0 ? (
<VisualEmptyState
variant="train"
title="Nothing to dispatch"
description="Loaded items appear here, ready to mark as dispatched."
/>
) : (
<InventoryWorkbench items={items} isLoading={isLoading} />
)}
</Card>
</PageContainer>
);
}