From f7cbb6af6f0473d8ba06f3c1be9b6ba13790a891 Mon Sep 17 00:00:00 2001 From: Nathnael Date: Mon, 22 Jun 2026 13:52:34 +0000 Subject: [PATCH] fix: query key --- apps/edr-freight-web/backoffice/src/services/api.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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<