This commit is contained in:
Hagernesh
2026-08-08 13:17:33 +00:00
parent 204bfd2421
commit 80e1648672
2 changed files with 15 additions and 13 deletions

View File

@@ -85,14 +85,15 @@ export function getNextInventoryAction(item: WarehouseInventoryItem): InventoryA
if (isImport) return inspected ? 'ready-for-pickup' : null;
return 'store';
case 'STORED':
// Reserve is retired: a stored export item goes straight to loading prep
// once inspection passes. An import item parked back into storage returns
// to pickup — otherwise Store would strand it with no action.
// Reserve is retired: a stored export item goes straight to loading prep.
// An import item parked back into storage returns to pickup — otherwise
// Store would strand it with no action.
if (isImport) return inspected ? 'ready-for-pickup' : null;
return inspected ? 'ready-for-loading' : null;
return 'ready-for-loading';
case 'RESERVED':
// Export loading is gated on a passed inspection.
return inspected ? 'ready-for-loading' : null;
// Export loading is not gated on inspection — inspection is tracked, but a
// train is never held waiting for it.
return 'ready-for-loading';
case 'READY_FOR_PICKUP':
// Issue the DO / release order first, then hand over the goods.
return item.releaseDate ? 'deliver' : 'release';