mirror of
https://github.com/Tria-plc/edr-platform.git
synced 2026-08-30 07:38:10 +00:00
fix(warehouses): retire per-booking Load and Dispatch buttons
Wagon loading happens in the train flow and dispatch at the train level, which already advances inventory - the per-row buttons duplicated that and confused operators. - WarehouseInventoryTable (import dispatch queue + warehouse pages): suppress the 'load'/'dispatch' next-action buttons and drop the extra per-row Dispatch on READY_FOR_PICKUP rows (Store stays) - Export Dispatch Queue: drop the per-row Dispatch button and its Actions column; the bulk Dispatch All / Dispatch Selected controls remain Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -1697,7 +1697,6 @@ function LoadedExportTab({
|
|||||||
<Table.Th>Weight</Table.Th>
|
<Table.Th>Weight</Table.Th>
|
||||||
<Table.Th>Route</Table.Th>
|
<Table.Th>Route</Table.Th>
|
||||||
<Table.Th>Status</Table.Th>
|
<Table.Th>Status</Table.Th>
|
||||||
{dispatchable && <Table.Th ta="right">Actions</Table.Th>}
|
|
||||||
</Table.Tr>
|
</Table.Tr>
|
||||||
</Table.Thead>
|
</Table.Thead>
|
||||||
<Table.Tbody>
|
<Table.Tbody>
|
||||||
@@ -1739,19 +1738,6 @@ function LoadedExportTab({
|
|||||||
{r.status}
|
{r.status}
|
||||||
</Badge>
|
</Badge>
|
||||||
</Table.Td>
|
</Table.Td>
|
||||||
{dispatchable && (
|
|
||||||
<Table.Td ta="right">
|
|
||||||
<Button
|
|
||||||
size="compact-xs"
|
|
||||||
variant="light"
|
|
||||||
color="green"
|
|
||||||
loading={bulkDispatch.isPending}
|
|
||||||
onClick={() => dispatch([r.id])}
|
|
||||||
>
|
|
||||||
Dispatch
|
|
||||||
</Button>
|
|
||||||
</Table.Td>
|
|
||||||
)}
|
|
||||||
</Table.Tr>
|
</Table.Tr>
|
||||||
))}
|
))}
|
||||||
</Table.Tbody>
|
</Table.Tbody>
|
||||||
|
|||||||
@@ -160,7 +160,12 @@ export function WarehouseInventoryTable({
|
|||||||
{items.map((item) => {
|
{items.map((item) => {
|
||||||
const kind = itemKind(item);
|
const kind = itemKind(item);
|
||||||
const busy = busyId === item.id;
|
const busy = busyId === item.id;
|
||||||
const nextAction = getNextInventoryAction(item);
|
// Per-booking Load and Dispatch are retired: wagon loading happens in
|
||||||
|
// the train flow and dispatch at the train level (which already
|
||||||
|
// advances inventory). Only the remaining lifecycle actions render.
|
||||||
|
const rawNextAction = getNextInventoryAction(item);
|
||||||
|
const nextAction =
|
||||||
|
rawNextAction === 'load' || rawNextAction === 'dispatch' ? null : rawNextAction;
|
||||||
const canGenerateHandover =
|
const canGenerateHandover =
|
||||||
item.inspectionStatus === 'PASSED' &&
|
item.inspectionStatus === 'PASSED' &&
|
||||||
Boolean(item.bookingId) &&
|
Boolean(item.bookingId) &&
|
||||||
@@ -232,26 +237,15 @@ export function WarehouseInventoryTable({
|
|||||||
</Button>
|
</Button>
|
||||||
)}
|
)}
|
||||||
{item.status === 'READY_FOR_PICKUP' && (
|
{item.status === 'READY_FOR_PICKUP' && (
|
||||||
<>
|
<Button
|
||||||
<Button
|
size="compact-xs"
|
||||||
size="compact-xs"
|
variant="light"
|
||||||
variant="light"
|
color="blue"
|
||||||
color="blue"
|
loading={busy}
|
||||||
loading={busy}
|
onClick={() => onAdvance(item, 'store')}
|
||||||
onClick={() => onAdvance(item, 'store')}
|
>
|
||||||
>
|
Store
|
||||||
Store
|
</Button>
|
||||||
</Button>
|
|
||||||
<Button
|
|
||||||
size="compact-xs"
|
|
||||||
variant="light"
|
|
||||||
color="green"
|
|
||||||
loading={busy}
|
|
||||||
onClick={() => onAdvance(item, 'dispatch')}
|
|
||||||
>
|
|
||||||
Dispatch
|
|
||||||
</Button>
|
|
||||||
</>
|
|
||||||
)}
|
)}
|
||||||
{item.status !== 'DISPATCHED' && (
|
{item.status !== 'DISPATCHED' && (
|
||||||
<Tooltip label="Move" withArrow>
|
<Tooltip label="Move" withArrow>
|
||||||
|
|||||||
Reference in New Issue
Block a user