mirror of
https://github.com/Tria-plc/edr-platform.git
synced 2026-08-27 12:00:59 +00:00
fix: use byId() instead of detail() in QUERY_KEYS
QUERY_KEYS.FIRST_MILE and QUERY_KEYS.LAST_MILE have byId() not detail(). Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -444,7 +444,7 @@ const FirstMilePage = () => {
|
||||
mutationFn: (data) => api.post(`/first-mile/${containerAllocationFirstMileId}/allocate-containers`, data),
|
||||
onSuccess: () => {
|
||||
toast({ title: "Containers allocated" });
|
||||
void qc.invalidateQueries({ queryKey: QUERY_KEYS.FIRST_MILE.detail(containerAllocationFirstMileId ?? "") });
|
||||
void qc.invalidateQueries({ queryKey: QUERY_KEYS.FIRST_MILE.byId(containerAllocationFirstMileId ?? "") });
|
||||
setContainerAllocationOpen(false);
|
||||
setContainerAllocationFirstMileId(null);
|
||||
},
|
||||
|
||||
@@ -395,7 +395,7 @@ const LastMilePage = () => {
|
||||
api.post(`/last-mile/${activeId}/allocate-containers`, data),
|
||||
onSuccess: () => {
|
||||
toast({ title: "Containers allocated", variant: "default" });
|
||||
void qc.invalidateQueries({ queryKey: QUERY_KEYS.LAST_MILE.detail(activeId ?? "") });
|
||||
void qc.invalidateQueries({ queryKey: QUERY_KEYS.LAST_MILE.byId(activeId ?? "") });
|
||||
closeAllocation();
|
||||
},
|
||||
onError: () => {
|
||||
|
||||
Reference in New Issue
Block a user