@qite/tide-booking-component 1.4.6 → 1.4.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/build-cjs/booking-wizard/features/booking/booking-slice.d.ts +1 -1
- package/build/build-cjs/index.js +11 -48
- package/build/build-esm/booking-wizard/features/booking/booking-slice.d.ts +1 -1
- package/build/build-esm/index.js +11 -48
- package/package.json +1 -1
- package/src/booking-wizard/features/booking/booking-slice.ts +3 -3
- package/src/booking-wizard/features/booking/booking.tsx +9 -0
|
@@ -42,6 +42,6 @@ export declare const fetchPackage: import("@reduxjs/toolkit").AsyncThunk<void, v
|
|
|
42
42
|
fulfilledMeta?: unknown;
|
|
43
43
|
rejectedMeta?: unknown;
|
|
44
44
|
}>;
|
|
45
|
-
export declare const setOfficeId: import("@reduxjs/toolkit").ActionCreatorWithPayload<number, "booking/setOfficeId">, setLanguageCode: import("@reduxjs/toolkit").ActionCreatorWithPayload<string, "booking/setLanguageCode">, setTranslations: import("@reduxjs/toolkit").ActionCreatorWithPayload<any, "booking/setTranslations">, setBookingOptions: import("@reduxjs/toolkit").ActionCreatorWithPayload<BookingOptions, "booking/setBookingOptions">, setBookingType: import("@reduxjs/toolkit").ActionCreatorWithPayload<string, "booking/setBookingType">, setProductAttributes: import("@reduxjs/toolkit").
|
|
45
|
+
export declare const setOfficeId: import("@reduxjs/toolkit").ActionCreatorWithPayload<number, "booking/setOfficeId">, setLanguageCode: import("@reduxjs/toolkit").ActionCreatorWithPayload<string, "booking/setLanguageCode">, setTranslations: import("@reduxjs/toolkit").ActionCreatorWithPayload<any, "booking/setTranslations">, setBookingOptions: import("@reduxjs/toolkit").ActionCreatorWithPayload<BookingOptions, "booking/setBookingOptions">, setBookingType: import("@reduxjs/toolkit").ActionCreatorWithPayload<string, "booking/setBookingType">, setProductAttributes: import("@reduxjs/toolkit").ActionCreatorWithOptionalPayload<ProductAttributes | undefined, "booking/setProductAttributes">, setBookingAttributes: import("@reduxjs/toolkit").ActionCreatorWithOptionalPayload<BookingAttributes | undefined, "booking/setBookingAttributes">, setCalculateDeposit: import("@reduxjs/toolkit").ActionCreatorWithPayload<boolean, "booking/setCalculateDeposit">, setBookingNumber: import("@reduxjs/toolkit").ActionCreatorWithPayload<string, "booking/setBookingNumber">, setIsRetry: import("@reduxjs/toolkit").ActionCreatorWithPayload<boolean, "booking/setIsRetry">, setFetchingPackage: import("@reduxjs/toolkit").ActionCreatorWithPayload<boolean, "booking/setFetchingPackage">, setPackage: import("@reduxjs/toolkit").ActionCreatorWithOptionalPayload<BookingPackage | undefined, "booking/setPackage">, setPackageRooms: import("@reduxjs/toolkit").ActionCreatorWithPayload<BookingPackageRoom[], "booking/setPackageRooms">, setPackageOptionPax: import("@reduxjs/toolkit").ActionCreatorWithPayload<BookingOptionPax[], "booking/setPackageOptionPax">, setPackageOptionUnits: import("@reduxjs/toolkit").ActionCreatorWithPayload<BookingOptionUnit[], "booking/setPackageOptionUnits">, setPackageGroups: import("@reduxjs/toolkit").ActionCreatorWithPayload<BookingOptionGroup<PerBookingPackageOption>[], "booking/setPackageGroups">, setSkipPayment: import("@reduxjs/toolkit").ActionCreatorWithPayload<boolean, "booking/setSkipPayment">, setGeneratePaymentUrl: import("@reduxjs/toolkit").ActionCreatorWithPayload<boolean, "booking/setGeneratePaymentUrl">, setTagIds: import("@reduxjs/toolkit").ActionCreatorWithOptionalPayload<number[] | undefined, "booking/setTagIds">, setAgentAdressId: import("@reduxjs/toolkit").ActionCreatorWithOptionalPayload<number | undefined, "booking/setAgentAdressId">, setBookingRemarks: import("@reduxjs/toolkit").ActionCreatorWithPayload<string, "booking/setBookingRemarks">, setVoucherCodes: import("@reduxjs/toolkit").ActionCreatorWithPayload<string[], "booking/setVoucherCodes">, setCurrentStep: import("@reduxjs/toolkit").ActionCreatorWithPayload<BookingStep, "booking/setCurrentStep">, setPackageAirlineGroups: import("@reduxjs/toolkit").ActionCreatorWithPayload<BookingAirlineGroup<AirlineBookingPackageOption>[], "booking/setPackageAirlineGroups">, setPackageAirportGroups: import("@reduxjs/toolkit").ActionCreatorWithPayload<BookingAirportGroup<AirportBookingPackageOption>[], "booking/setPackageAirportGroups">, setFlights: import("@reduxjs/toolkit").ActionCreatorWithPayload<GroupedFlights, "booking/setFlights">, setAccommodationViewId: import("@reduxjs/toolkit").ActionCreatorWithPayload<number, "booking/setAccommodationViewId">, setIsOption: import("@reduxjs/toolkit").ActionCreatorWithPayload<boolean, "booking/setIsOption">;
|
|
46
46
|
declare const _default: import("redux").Reducer<BookingState, import("redux").AnyAction>;
|
|
47
47
|
export default _default;
|
package/build/build-cjs/index.js
CHANGED
|
@@ -10167,42 +10167,6 @@ var selectBookingAddress = toolkit.createSelector(selectTravelersFormValues, sel
|
|
|
10167
10167
|
email: formValues === null || formValues === void 0 ? void 0 : formValues.email,
|
|
10168
10168
|
};
|
|
10169
10169
|
});
|
|
10170
|
-
// export const selectIsOnRequest = createSelector(selectActiveOption, selectAvailabilities, (selectedOption, availabilities) => {
|
|
10171
|
-
// if (selectedOption?.isOnRequest) return true;
|
|
10172
|
-
// const accoCounter = availabilities?.map((x) => ({
|
|
10173
|
-
// code: x.code,
|
|
10174
|
-
// count: x.count,
|
|
10175
|
-
// }));
|
|
10176
|
-
// const selectedAccommodations = new Map<string, number>();
|
|
10177
|
-
// return selectedOption?.rooms.map((room) => {
|
|
10178
|
-
// const selectedRoom = room.options.find((x) => x.isSelected)!;
|
|
10179
|
-
// return {
|
|
10180
|
-
// ...room,
|
|
10181
|
-
// options: room.options.map((option) => {
|
|
10182
|
-
// const isCurrentOption =
|
|
10183
|
-
// selectedRoom.accommodationCode === option.accommodationCode;
|
|
10184
|
-
// const usedCount =
|
|
10185
|
-
// selectedAccommodations.get(option.accommodationCode) ?? 0;
|
|
10186
|
-
// const availability = availabilities?.find(
|
|
10187
|
-
// (x) => x.code === option.accommodationCode
|
|
10188
|
-
// );
|
|
10189
|
-
// if (availability) {
|
|
10190
|
-
// const accoCount = accoCounter?.find(
|
|
10191
|
-
// (x) => x.code === option.accommodationCode
|
|
10192
|
-
// )!;
|
|
10193
|
-
// const roomsLeft = availability.count - usedCount;
|
|
10194
|
-
// let isOnRequest = isCurrentOption
|
|
10195
|
-
// ? accoCount.count < 0 && (availability?.onRequestPossible ?? false)
|
|
10196
|
-
// : roomsLeft < 0 && (availability?.onRequestPossible ?? false);
|
|
10197
|
-
// if (isCurrentOption) accoCount.count--;
|
|
10198
|
-
// return isOnRequest;
|
|
10199
|
-
// } else {
|
|
10200
|
-
// return false;
|
|
10201
|
-
// }
|
|
10202
|
-
// }),
|
|
10203
|
-
// };
|
|
10204
|
-
// });
|
|
10205
|
-
// });
|
|
10206
10170
|
var selectBookingPackageRequest = toolkit.createSelector(selectOfficeId, selectAgentId, selectAgentAdressId, function (officeId, agentId, agentAdressId) {
|
|
10207
10171
|
var _a;
|
|
10208
10172
|
var agencyId = ((_a = agentId !== null && agentId !== void 0 ? agentId : agentAdressId) !== null && _a !== void 0 ? _a : 0) > 0 ? agentId !== null && agentId !== void 0 ? agentId : agentAdressId : null;
|
|
@@ -10900,18 +10864,10 @@ var StepRoute = function (_a) {
|
|
|
10900
10864
|
};
|
|
10901
10865
|
|
|
10902
10866
|
var _a;
|
|
10903
|
-
// const initialState: ApiSettingsState = {
|
|
10904
|
-
// apiUrl: "https://tide-joker3287-acceptance.tidesoftware.be",
|
|
10905
|
-
// apiKey: "e9b95d79-de4c-41d6-ab7e-3dd429873058",
|
|
10906
|
-
// };
|
|
10907
10867
|
var initialState$1 = {
|
|
10908
|
-
apiUrl: "
|
|
10909
|
-
apiKey: "
|
|
10868
|
+
apiUrl: "",
|
|
10869
|
+
apiKey: "",
|
|
10910
10870
|
};
|
|
10911
|
-
// const initialState: ApiSettingsState = {
|
|
10912
|
-
// apiUrl: "",
|
|
10913
|
-
// apiKey: "",
|
|
10914
|
-
// };
|
|
10915
10871
|
var apiSettingsSlice = toolkit.createSlice({
|
|
10916
10872
|
name: "settings",
|
|
10917
10873
|
initialState: initialState$1,
|
|
@@ -13768,10 +13724,10 @@ var Sidebar = function (_a) {
|
|
|
13768
13724
|
React__default["default"].createElement("div", { className: "pricing-summary__property" }, option === null || option === void 0 ? void 0 :
|
|
13769
13725
|
option.accommodationName,
|
|
13770
13726
|
isOnRequest
|
|
13771
|
-
? " (".concat(translations.SIDEBAR.ON_REQUEST, ")
|
|
13727
|
+
? " (".concat(translations.SIDEBAR.ON_REQUEST, ")")
|
|
13772
13728
|
: "",
|
|
13773
13729
|
(option === null || option === void 0 ? void 0 : option.isOnRequest)
|
|
13774
|
-
? " (".concat(translations.SIDEBAR.ON_REQUEST, ")
|
|
13730
|
+
? " (".concat(translations.SIDEBAR.ON_REQUEST, ")")
|
|
13775
13731
|
: "")),
|
|
13776
13732
|
React__default["default"].createElement("div", { className: "pricing-summary__row" },
|
|
13777
13733
|
React__default["default"].createElement("div", { className: "price-summarty__property" }, option === null || option === void 0 ? void 0 : option.regimeName),
|
|
@@ -15111,6 +15067,13 @@ var Booking = function (_a) {
|
|
|
15111
15067
|
var packageDetails = reactRedux.useSelector(selectPackageDetails);
|
|
15112
15068
|
var isUnvailable = reactRedux.useSelector(selectIsUnavailable);
|
|
15113
15069
|
var translations = reactRedux.useSelector(selectTranslations);
|
|
15070
|
+
React.useEffect(function () {
|
|
15071
|
+
return function () {
|
|
15072
|
+
dispatch(setPackage(undefined));
|
|
15073
|
+
dispatch(setBookingAttributes(undefined));
|
|
15074
|
+
dispatch(setProductAttributes(undefined));
|
|
15075
|
+
};
|
|
15076
|
+
}, []);
|
|
15114
15077
|
React.useEffect(function () {
|
|
15115
15078
|
dispatch(setSkipPayment(skipPaymentWithAgent !== null && skipPaymentWithAgent !== void 0 ? skipPaymentWithAgent : false));
|
|
15116
15079
|
dispatch(setGeneratePaymentUrl(generatePaymentUrl !== null && generatePaymentUrl !== void 0 ? generatePaymentUrl : false));
|
|
@@ -42,6 +42,6 @@ export declare const fetchPackage: import("@reduxjs/toolkit").AsyncThunk<void, v
|
|
|
42
42
|
fulfilledMeta?: unknown;
|
|
43
43
|
rejectedMeta?: unknown;
|
|
44
44
|
}>;
|
|
45
|
-
export declare const setOfficeId: import("@reduxjs/toolkit").ActionCreatorWithPayload<number, "booking/setOfficeId">, setLanguageCode: import("@reduxjs/toolkit").ActionCreatorWithPayload<string, "booking/setLanguageCode">, setTranslations: import("@reduxjs/toolkit").ActionCreatorWithPayload<any, "booking/setTranslations">, setBookingOptions: import("@reduxjs/toolkit").ActionCreatorWithPayload<BookingOptions, "booking/setBookingOptions">, setBookingType: import("@reduxjs/toolkit").ActionCreatorWithPayload<string, "booking/setBookingType">, setProductAttributes: import("@reduxjs/toolkit").
|
|
45
|
+
export declare const setOfficeId: import("@reduxjs/toolkit").ActionCreatorWithPayload<number, "booking/setOfficeId">, setLanguageCode: import("@reduxjs/toolkit").ActionCreatorWithPayload<string, "booking/setLanguageCode">, setTranslations: import("@reduxjs/toolkit").ActionCreatorWithPayload<any, "booking/setTranslations">, setBookingOptions: import("@reduxjs/toolkit").ActionCreatorWithPayload<BookingOptions, "booking/setBookingOptions">, setBookingType: import("@reduxjs/toolkit").ActionCreatorWithPayload<string, "booking/setBookingType">, setProductAttributes: import("@reduxjs/toolkit").ActionCreatorWithOptionalPayload<ProductAttributes | undefined, "booking/setProductAttributes">, setBookingAttributes: import("@reduxjs/toolkit").ActionCreatorWithOptionalPayload<BookingAttributes | undefined, "booking/setBookingAttributes">, setCalculateDeposit: import("@reduxjs/toolkit").ActionCreatorWithPayload<boolean, "booking/setCalculateDeposit">, setBookingNumber: import("@reduxjs/toolkit").ActionCreatorWithPayload<string, "booking/setBookingNumber">, setIsRetry: import("@reduxjs/toolkit").ActionCreatorWithPayload<boolean, "booking/setIsRetry">, setFetchingPackage: import("@reduxjs/toolkit").ActionCreatorWithPayload<boolean, "booking/setFetchingPackage">, setPackage: import("@reduxjs/toolkit").ActionCreatorWithOptionalPayload<BookingPackage | undefined, "booking/setPackage">, setPackageRooms: import("@reduxjs/toolkit").ActionCreatorWithPayload<BookingPackageRoom[], "booking/setPackageRooms">, setPackageOptionPax: import("@reduxjs/toolkit").ActionCreatorWithPayload<BookingOptionPax[], "booking/setPackageOptionPax">, setPackageOptionUnits: import("@reduxjs/toolkit").ActionCreatorWithPayload<BookingOptionUnit[], "booking/setPackageOptionUnits">, setPackageGroups: import("@reduxjs/toolkit").ActionCreatorWithPayload<BookingOptionGroup<PerBookingPackageOption>[], "booking/setPackageGroups">, setSkipPayment: import("@reduxjs/toolkit").ActionCreatorWithPayload<boolean, "booking/setSkipPayment">, setGeneratePaymentUrl: import("@reduxjs/toolkit").ActionCreatorWithPayload<boolean, "booking/setGeneratePaymentUrl">, setTagIds: import("@reduxjs/toolkit").ActionCreatorWithOptionalPayload<number[] | undefined, "booking/setTagIds">, setAgentAdressId: import("@reduxjs/toolkit").ActionCreatorWithOptionalPayload<number | undefined, "booking/setAgentAdressId">, setBookingRemarks: import("@reduxjs/toolkit").ActionCreatorWithPayload<string, "booking/setBookingRemarks">, setVoucherCodes: import("@reduxjs/toolkit").ActionCreatorWithPayload<string[], "booking/setVoucherCodes">, setCurrentStep: import("@reduxjs/toolkit").ActionCreatorWithPayload<BookingStep, "booking/setCurrentStep">, setPackageAirlineGroups: import("@reduxjs/toolkit").ActionCreatorWithPayload<BookingAirlineGroup<AirlineBookingPackageOption>[], "booking/setPackageAirlineGroups">, setPackageAirportGroups: import("@reduxjs/toolkit").ActionCreatorWithPayload<BookingAirportGroup<AirportBookingPackageOption>[], "booking/setPackageAirportGroups">, setFlights: import("@reduxjs/toolkit").ActionCreatorWithPayload<GroupedFlights, "booking/setFlights">, setAccommodationViewId: import("@reduxjs/toolkit").ActionCreatorWithPayload<number, "booking/setAccommodationViewId">, setIsOption: import("@reduxjs/toolkit").ActionCreatorWithPayload<boolean, "booking/setIsOption">;
|
|
46
46
|
declare const _default: import("redux").Reducer<BookingState, import("redux").AnyAction>;
|
|
47
47
|
export default _default;
|
package/build/build-esm/index.js
CHANGED
|
@@ -10156,42 +10156,6 @@ var selectBookingAddress = createSelector(selectTravelersFormValues, selectBooki
|
|
|
10156
10156
|
email: formValues === null || formValues === void 0 ? void 0 : formValues.email,
|
|
10157
10157
|
};
|
|
10158
10158
|
});
|
|
10159
|
-
// export const selectIsOnRequest = createSelector(selectActiveOption, selectAvailabilities, (selectedOption, availabilities) => {
|
|
10160
|
-
// if (selectedOption?.isOnRequest) return true;
|
|
10161
|
-
// const accoCounter = availabilities?.map((x) => ({
|
|
10162
|
-
// code: x.code,
|
|
10163
|
-
// count: x.count,
|
|
10164
|
-
// }));
|
|
10165
|
-
// const selectedAccommodations = new Map<string, number>();
|
|
10166
|
-
// return selectedOption?.rooms.map((room) => {
|
|
10167
|
-
// const selectedRoom = room.options.find((x) => x.isSelected)!;
|
|
10168
|
-
// return {
|
|
10169
|
-
// ...room,
|
|
10170
|
-
// options: room.options.map((option) => {
|
|
10171
|
-
// const isCurrentOption =
|
|
10172
|
-
// selectedRoom.accommodationCode === option.accommodationCode;
|
|
10173
|
-
// const usedCount =
|
|
10174
|
-
// selectedAccommodations.get(option.accommodationCode) ?? 0;
|
|
10175
|
-
// const availability = availabilities?.find(
|
|
10176
|
-
// (x) => x.code === option.accommodationCode
|
|
10177
|
-
// );
|
|
10178
|
-
// if (availability) {
|
|
10179
|
-
// const accoCount = accoCounter?.find(
|
|
10180
|
-
// (x) => x.code === option.accommodationCode
|
|
10181
|
-
// )!;
|
|
10182
|
-
// const roomsLeft = availability.count - usedCount;
|
|
10183
|
-
// let isOnRequest = isCurrentOption
|
|
10184
|
-
// ? accoCount.count < 0 && (availability?.onRequestPossible ?? false)
|
|
10185
|
-
// : roomsLeft < 0 && (availability?.onRequestPossible ?? false);
|
|
10186
|
-
// if (isCurrentOption) accoCount.count--;
|
|
10187
|
-
// return isOnRequest;
|
|
10188
|
-
// } else {
|
|
10189
|
-
// return false;
|
|
10190
|
-
// }
|
|
10191
|
-
// }),
|
|
10192
|
-
// };
|
|
10193
|
-
// });
|
|
10194
|
-
// });
|
|
10195
10159
|
var selectBookingPackageRequest = createSelector(selectOfficeId, selectAgentId, selectAgentAdressId, function (officeId, agentId, agentAdressId) {
|
|
10196
10160
|
var _a;
|
|
10197
10161
|
var agencyId = ((_a = agentId !== null && agentId !== void 0 ? agentId : agentAdressId) !== null && _a !== void 0 ? _a : 0) > 0 ? agentId !== null && agentId !== void 0 ? agentId : agentAdressId : null;
|
|
@@ -10889,18 +10853,10 @@ var StepRoute = function (_a) {
|
|
|
10889
10853
|
};
|
|
10890
10854
|
|
|
10891
10855
|
var _a;
|
|
10892
|
-
// const initialState: ApiSettingsState = {
|
|
10893
|
-
// apiUrl: "https://tide-joker3287-acceptance.tidesoftware.be",
|
|
10894
|
-
// apiKey: "e9b95d79-de4c-41d6-ab7e-3dd429873058",
|
|
10895
|
-
// };
|
|
10896
10856
|
var initialState$1 = {
|
|
10897
|
-
apiUrl: "
|
|
10898
|
-
apiKey: "
|
|
10857
|
+
apiUrl: "",
|
|
10858
|
+
apiKey: "",
|
|
10899
10859
|
};
|
|
10900
|
-
// const initialState: ApiSettingsState = {
|
|
10901
|
-
// apiUrl: "",
|
|
10902
|
-
// apiKey: "",
|
|
10903
|
-
// };
|
|
10904
10860
|
var apiSettingsSlice = createSlice({
|
|
10905
10861
|
name: "settings",
|
|
10906
10862
|
initialState: initialState$1,
|
|
@@ -13757,10 +13713,10 @@ var Sidebar = function (_a) {
|
|
|
13757
13713
|
React.createElement("div", { className: "pricing-summary__property" }, option === null || option === void 0 ? void 0 :
|
|
13758
13714
|
option.accommodationName,
|
|
13759
13715
|
isOnRequest
|
|
13760
|
-
? " (".concat(translations.SIDEBAR.ON_REQUEST, ")
|
|
13716
|
+
? " (".concat(translations.SIDEBAR.ON_REQUEST, ")")
|
|
13761
13717
|
: "",
|
|
13762
13718
|
(option === null || option === void 0 ? void 0 : option.isOnRequest)
|
|
13763
|
-
? " (".concat(translations.SIDEBAR.ON_REQUEST, ")
|
|
13719
|
+
? " (".concat(translations.SIDEBAR.ON_REQUEST, ")")
|
|
13764
13720
|
: "")),
|
|
13765
13721
|
React.createElement("div", { className: "pricing-summary__row" },
|
|
13766
13722
|
React.createElement("div", { className: "price-summarty__property" }, option === null || option === void 0 ? void 0 : option.regimeName),
|
|
@@ -15100,6 +15056,13 @@ var Booking = function (_a) {
|
|
|
15100
15056
|
var packageDetails = useSelector(selectPackageDetails);
|
|
15101
15057
|
var isUnvailable = useSelector(selectIsUnavailable);
|
|
15102
15058
|
var translations = useSelector(selectTranslations);
|
|
15059
|
+
useEffect(function () {
|
|
15060
|
+
return function () {
|
|
15061
|
+
dispatch(setPackage(undefined));
|
|
15062
|
+
dispatch(setBookingAttributes(undefined));
|
|
15063
|
+
dispatch(setProductAttributes(undefined));
|
|
15064
|
+
};
|
|
15065
|
+
}, []);
|
|
15103
15066
|
useEffect(function () {
|
|
15104
15067
|
dispatch(setSkipPayment(skipPaymentWithAgent !== null && skipPaymentWithAgent !== void 0 ? skipPaymentWithAgent : false));
|
|
15105
15068
|
dispatch(setGeneratePaymentUrl(generatePaymentUrl !== null && generatePaymentUrl !== void 0 ? generatePaymentUrl : false));
|
package/package.json
CHANGED
|
@@ -394,10 +394,10 @@ const bookingSlice = createSlice({
|
|
|
394
394
|
setBookingType(state, action: PayloadAction<string>) {
|
|
395
395
|
state.bookingType = action.payload;
|
|
396
396
|
},
|
|
397
|
-
setProductAttributes(state, action: PayloadAction<ProductAttributes>) {
|
|
397
|
+
setProductAttributes(state, action: PayloadAction<ProductAttributes | undefined>) {
|
|
398
398
|
state.productAttributes = action.payload;
|
|
399
399
|
},
|
|
400
|
-
setBookingAttributes(state, action: PayloadAction<BookingAttributes>) {
|
|
400
|
+
setBookingAttributes(state, action: PayloadAction<BookingAttributes | undefined>) {
|
|
401
401
|
state.bookingAttributes = action.payload;
|
|
402
402
|
},
|
|
403
403
|
setCalculateDeposit(state, action: PayloadAction<boolean>) {
|
|
@@ -412,7 +412,7 @@ const bookingSlice = createSlice({
|
|
|
412
412
|
setFetchingPackage(state, action: PayloadAction<boolean>) {
|
|
413
413
|
state.isBusy = action.payload;
|
|
414
414
|
},
|
|
415
|
-
setPackage(state, action: PayloadAction<BookingPackage>) {
|
|
415
|
+
setPackage(state, action: PayloadAction<BookingPackage | undefined>) {
|
|
416
416
|
state.package = action.payload;
|
|
417
417
|
},
|
|
418
418
|
setPackageRooms(state, action: PayloadAction<BookingPackageRoom[]>) {
|
|
@@ -22,6 +22,7 @@ import {
|
|
|
22
22
|
setIsRetry,
|
|
23
23
|
setLanguageCode,
|
|
24
24
|
setOfficeId,
|
|
25
|
+
setPackage,
|
|
25
26
|
setProductAttributes,
|
|
26
27
|
setSkipPayment,
|
|
27
28
|
setTagIds,
|
|
@@ -101,6 +102,14 @@ const Booking: React.FC<BookingProps> = ({
|
|
|
101
102
|
const isUnvailable = useSelector(selectIsUnavailable);
|
|
102
103
|
const translations = useSelector(selectTranslations);
|
|
103
104
|
|
|
105
|
+
useEffect(() => {
|
|
106
|
+
return () => {
|
|
107
|
+
dispatch(setPackage(undefined));
|
|
108
|
+
dispatch(setBookingAttributes(undefined));
|
|
109
|
+
dispatch(setProductAttributes(undefined));
|
|
110
|
+
};
|
|
111
|
+
}, []);
|
|
112
|
+
|
|
104
113
|
useEffect(() => {
|
|
105
114
|
dispatch(setSkipPayment(skipPaymentWithAgent ?? false));
|
|
106
115
|
dispatch(setGeneratePaymentUrl(generatePaymentUrl ?? false));
|