fix: query key

This commit is contained in:
Nathnael
2026-06-22 13:52:34 +00:00
parent 2700a3edec
commit f7cbb6af6f

View File

@@ -163,6 +163,10 @@ const INVENTORY_INVALIDATIONS: ReadonlyArray<readonly unknown[]> = [
["warehouse-inventory"],
["warehouse-loadings"],
["warehouses"],
// Singular `"warehouse"` root covers loadableWagons / bookingSchedule, which
// change when inventory is loaded/dispatched. Distinct from the `warehouse-*`
// roots above (prefix matching is element-exact, not string-prefix).
["warehouse"],
];
/**
@@ -918,7 +922,7 @@ export const api = {
"auto-load-ready",
() => warehouseService.autoLoadReady().then((r) => r.data),
undefined,
() => [["warehouse-inventory"], ["warehouses"]],
() => INVENTORY_INVALIDATIONS,
),
unloadBooking: endpoint<