intergrate openening times & show extras

This commit is contained in:
2026-01-15 11:43:36 +03:00
parent 046773cb8b
commit 0ce2d320a8
8 changed files with 212 additions and 166 deletions

View File

@@ -13,6 +13,7 @@ import {
REDEEM_DETAILS_URL,
LOYALTY_HISTORY_URL,
CREATE_GIFT_AMOUNT_URL,
OPENING_TIMES_URL,
} from "utils/constants";
import { OrderDetails } from "pages/checkout/hooks/types";
@@ -25,6 +26,7 @@ import {
import { baseApi } from "./apiSlice";
import { EGiftCard } from "pages/EGiftCards/type";
import { RedeemResponse } from "pages/redeem/types";
import { OpeningTimeResponse } from "./types";
export const branchApi = baseApi.injectEndpoints({
endpoints: (builder) => ({
@@ -210,6 +212,15 @@ export const branchApi = baseApi.injectEndpoints({
body,
}),
}),
getOpeningTimes: builder.query<OpeningTimeResponse, string | void>({
query: (restaurantId: string) => ({
url: OPENING_TIMES_URL +"/"+ restaurantId,
method: "GET",
}),
transformResponse: (response: any) => {
return response.result;
},
}),
}),
});
export const {
@@ -227,4 +238,5 @@ export const {
useGetRedeemDetailsQuery,
useGetLoyaltyHistoryQuery,
useCreateGiftAmountMutation,
useGetOpeningTimesQuery,
} = branchApi;