diff --git a/apps/edr-freight-web/backoffice/src/services/api.ts b/apps/edr-freight-web/backoffice/src/services/api.ts index e801b856c..f5239110d 100644 --- a/apps/edr-freight-web/backoffice/src/services/api.ts +++ b/apps/edr-freight-web/backoffice/src/services/api.ts @@ -163,6 +163,10 @@ const INVENTORY_INVALIDATIONS: ReadonlyArray = [ ["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<