{canSeeAll ? (
setAllStaff(e.currentTarget.checked)}
label="All staff"
color="edr-green"
/>
) : null}
{source.isLoading ? (
) : (
<>
Requests{scopeAll ? "" : " you touched"}
{requests.length === 0 ? (
No requests yet.
) : (
{requests.map((r) => (
{roleBadge(r)}
{r.status.toLowerCase()}
))}
)}
Wagons moved
{movements.length === 0 ? (
No wagon moves yet.
) : (
{movements.map((m) => (
{m.wagon?.wagonNumber ?? "Wagon"}
{yardLabel(m.fromYard)} → {yardLabel(m.toYard)}
{m.transferRequestId ? (
from request
) : null}
{fmtDateTime(m.occurredAt)}
))}
)}
>
)}
);
}
/**
* OCC fulfilment queue for wagon-transfer requests. Lists PENDING requests; open
* one to hand-pick exactly the requested number of wagons from the source yard
* (of the requested type) and execute the move, or cancel the request.
* A second tab shows per-user transfer history.
*/
const WagonTransferRequestsModal = ({
opened,
onClose,
}: WagonTransferRequestsModalProps) => {
const { toast } = useToast();
const [tab, setTab] = useState