This commit is contained in:
2025-10-24 06:12:58 +03:00
parent 3aeaa0a9f3
commit 3a827a8f69
7 changed files with 90 additions and 52 deletions

View File

@@ -24,6 +24,7 @@ export const loginApi = baseApi.injectEndpoints({
method: "POST",
body,
}),
invalidatesTags: ["Restaurant"],
}),
}),
});

View File

@@ -26,6 +26,7 @@ export const branchApi = baseApi.injectEndpoints({
transformResponse: (response: any) => {
return response?.result?.restaurants?.[0];
},
providesTags: ["Restaurant"],
}),
getMenu: builder.query<any, string | void>({
query: (restaurantId: string) =>
@@ -50,7 +51,7 @@ export const branchApi = baseApi.injectEndpoints({
method: "POST",
body,
}),
invalidatesTags: ["Orders"],
invalidatesTags: ["Orders", "Restaurant"],
}),
cancelOrder: builder.mutation({
query: (body: any) => ({
@@ -58,7 +59,7 @@ export const branchApi = baseApi.injectEndpoints({
method: "POST",
body,
}),
invalidatesTags: ["Orders"],
invalidatesTags: ["Orders", "Restaurant"],
}),
getTables: builder.query<any, { restaurantID: string; tableType: string }>({
query: ({