@roomstay/frontend 2.6.81 → 2.6.82
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/dist/370.bundle.js +1 -1
- package/dist/375.bundle.js +1 -1
- package/dist/430.bundle.js +1 -1
- package/dist/537.bundle.js +1 -1
- package/dist/978.bundle.js +1 -1
- package/dist/main.bundle.js +1 -1
- package/dist/src/api/AvailabilityAPI.d.ts +5 -1
- package/dist/src/api/AvailabilityAPI.js +23 -12
- package/dist/src/api/AvailabilityAPI.js.map +1 -1
- package/dist/src/api/ReservationAPI.js +12 -9
- package/dist/src/api/ReservationAPI.js.map +1 -1
- package/dist/src/components/User/Forms/SignInForm.js.map +1 -1
- package/dist/src/components/generic/PaymentCard/InlinePaymentOption.js +2 -2
- package/dist/src/components/generic/PaymentCard/InlinePaymentOption.js.map +1 -1
- package/dist/src/components/reservation/ReservationItem.d.ts +1 -0
- package/dist/src/components/reservation/ReservationItem.js +2 -2
- package/dist/src/components/reservation/ReservationItem.js.map +1 -1
- package/dist/src/components/reservation/ReservationList.d.ts +1 -0
- package/dist/src/components/reservation/ReservationList.js +2 -2
- package/dist/src/components/reservation/ReservationList.js.map +1 -1
- package/dist/src/components/steps/addons/AddonCard.js +8 -0
- package/dist/src/components/steps/addons/AddonCard.js.map +1 -1
- package/dist/src/components/steps/confirmation/StepConfirmationPolicyBlock.js +5 -4
- package/dist/src/components/steps/confirmation/StepConfirmationPolicyBlock.js.map +1 -1
- package/dist/src/components/steps/confirmation/TrueRewardsPaymentOption/TrueRewardsPaymentMethod.js +6 -4
- package/dist/src/components/steps/confirmation/TrueRewardsPaymentOption/TrueRewardsPaymentMethod.js.map +1 -1
- package/dist/src/components/steps/room/AvailableUpgradesModal.js +0 -5
- package/dist/src/components/steps/room/AvailableUpgradesModal.js.map +1 -1
- package/dist/src/components/steps/room/roomDetails/roomRates/RoomRateDescriptionTab.js +2 -2
- package/dist/src/components/steps/room/roomDetails/roomRates/RoomRateDescriptionTab.js.map +1 -1
- package/dist/src/components/steps/room/roomDetails/unavailableRoom/UnavailableRoom.js +6 -2
- package/dist/src/components/steps/room/roomDetails/unavailableRoom/UnavailableRoom.js.map +1 -1
- package/dist/src/components/summary/BEMobileSummaryModal.js +11 -10
- package/dist/src/components/summary/BEMobileSummaryModal.js.map +1 -1
- package/dist/src/components/summary/BESummary.js +4 -4
- package/dist/src/components/summary/BESummary.js.map +1 -1
- package/dist/src/contexts/BasketContext/BasketContextType.d.ts +3 -3
- package/dist/src/contexts/BasketContext/BasketContextType.js.map +1 -1
- package/dist/src/contexts/BasketContext/BasketContextWrapper.js +145 -73
- package/dist/src/contexts/BasketContext/BasketContextWrapper.js.map +1 -1
- package/dist/src/contexts/CompanyContext/CompanyContextWrapper.js +1 -2
- package/dist/src/contexts/CompanyContext/CompanyContextWrapper.js.map +1 -1
- package/dist/src/contexts/ConfirmationStepContext/ConfirmationStepContextWrapper.js +3 -2
- package/dist/src/contexts/ConfirmationStepContext/ConfirmationStepContextWrapper.js.map +1 -1
- package/dist/src/contexts/Members/AuthenticationContext/AuthenticationContextProvider.js +23 -7
- package/dist/src/contexts/Members/AuthenticationContext/AuthenticationContextProvider.js.map +1 -1
- package/dist/src/engines/RecentSearchesEngine/RecentSearchesEngineElement.js +0 -1
- package/dist/src/engines/RecentSearchesEngine/RecentSearchesEngineElement.js.map +1 -1
- package/dist/src/models/Api/HotelDTO.d.ts +1 -1
- package/dist/src/models/Api/HotelDTO.js.map +1 -1
- package/dist/src/models/Client/Hotel/Hotel.d.ts +1 -1
- package/dist/src/models/Client/Hotel/Hotel.js.map +1 -1
- package/dist/src/models/Room/RoomRate.d.ts +8 -1
- package/dist/src/models/Room/RoomRate.js +24 -0
- package/dist/src/models/Room/RoomRate.js.map +1 -1
- package/dist/src/pages/account/AccountHome/AccountHomePage.js +1 -1
- package/dist/src/pages/account/AccountHome/AccountHomePage.js.map +1 -1
- package/dist/src/pages/account/AccountRoutes.d.ts +5 -0
- package/dist/src/pages/account/AccountRoutes.js +8 -2
- package/dist/src/pages/account/AccountRoutes.js.map +1 -1
- package/dist/src/pages/account/Reservations/AccountReservationSinglePage.js +21 -6
- package/dist/src/pages/account/Reservations/AccountReservationSinglePage.js.map +1 -1
- package/dist/src/pages/account/Reservations/AccountReservationsPage.js +7 -7
- package/dist/src/pages/account/Reservations/AccountReservationsPage.js.map +1 -1
- package/dist/src/translations/Translation.js +1 -1
- package/dist/src/translations/Translation.js.map +1 -1
- package/dist/src/util/Analytics/Analytics.d.ts +33 -9
- package/dist/src/util/Analytics/Analytics.js +26 -0
- package/dist/src/util/Analytics/Analytics.js.map +1 -1
- package/dist/src/util/Analytics/GoogleAnalytics4.d.ts +2 -1
- package/dist/src/util/Analytics/GoogleAnalytics4.js +9 -0
- package/dist/src/util/Analytics/GoogleAnalytics4.js.map +1 -1
- package/dist/src/util/Analytics/UniversalAnalytics.d.ts +4 -22
- package/dist/src/util/Analytics/UniversalAnalytics.js +23 -4
- package/dist/src/util/Analytics/UniversalAnalytics.js.map +1 -1
- package/dist/src/util/DataLayer.d.ts +7 -2
- package/dist/src/util/DataLayer.js +47 -18
- package/dist/src/util/DataLayer.js.map +1 -1
- package/dist/test.bundle.js +1 -1
- package/dist/tests/offline/entry/config/hotelSpecDefault.js +1 -1
- package/dist/tests/offline/entry/config/hotelSpecDefault.js.map +1 -1
- package/dist/vendors.bundle.js +1 -1
- package/package.json +2 -2
|
@@ -297,19 +297,14 @@ function BasketContextWrapper(props) {
|
|
|
297
297
|
return (0, rxjs_1.timer)(scalingDuration);
|
|
298
298
|
}), (0, operators_1.finalize)(() => console.log('We are done!')));
|
|
299
299
|
};
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
const hotelFees = (_a = hotel.fees) !== null && _a !== void 0 ? _a : [];
|
|
300
|
+
/**
|
|
301
|
+
* Booking Fees.
|
|
302
|
+
* These fees aren't related to an addon or a room, they're just on the booking itself.
|
|
303
|
+
*/
|
|
304
|
+
const getBookingFees = () => {
|
|
305
|
+
var _a;
|
|
306
|
+
const hotelFees = (_a = hotel === null || hotel === void 0 ? void 0 : hotel.fees) !== null && _a !== void 0 ? _a : [];
|
|
308
307
|
const newFees = [];
|
|
309
|
-
/**
|
|
310
|
-
* Booking Fees.
|
|
311
|
-
* These fees aren't related to an addon or a room, they're just on the booking itself.
|
|
312
|
-
*/
|
|
313
308
|
let totalBookingFees = 0;
|
|
314
309
|
for (const fee of (0, core_1.getFilteredBookingFees)(hotelFees)) {
|
|
315
310
|
const feeAmount = (0, core_1.calculateFeeAmount)(fee);
|
|
@@ -328,61 +323,65 @@ function BasketContextWrapper(props) {
|
|
|
328
323
|
baseAmount += feeAmount;
|
|
329
324
|
}
|
|
330
325
|
}
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
removedPercentages,
|
|
353
|
-
});
|
|
354
|
-
}
|
|
355
|
-
let feeCalculationBaseAmount;
|
|
356
|
-
if (fee.extractFeeFromRates) {
|
|
357
|
-
// If this fee is included in the rates, there's no additional fee to calculate.
|
|
358
|
-
feeCalculationBaseAmount = fee.includeInRates ? 0 : initialCost;
|
|
359
|
-
}
|
|
360
|
-
else if (fee.includeInRates) {
|
|
361
|
-
// These fees are already included in the rates, we only need to calculate "fees on fees" if applicable.
|
|
362
|
-
if (!fee.includePreviousFeesInCalculation) {
|
|
363
|
-
continue;
|
|
364
|
-
}
|
|
365
|
-
feeCalculationBaseAmount = totalFeesAdded;
|
|
366
|
-
}
|
|
367
|
-
else {
|
|
368
|
-
// This fee either needs to include the full running total, or just the initial cost.
|
|
369
|
-
feeCalculationBaseAmount = fee.includePreviousFeesInCalculation ? initialCost + totalFeesAdded + totalFeesIncludedInRates : initialCost;
|
|
370
|
-
}
|
|
371
|
-
const feeAmount = (0, core_1.calculateFeeAmount)(fee, {
|
|
372
|
-
baseAmount: feeCalculationBaseAmount,
|
|
326
|
+
return newFees;
|
|
327
|
+
};
|
|
328
|
+
const getBookingRateFees = (row) => {
|
|
329
|
+
var _a, _b;
|
|
330
|
+
const hotelFees = (_a = hotel === null || hotel === void 0 ? void 0 : hotel.fees) !== null && _a !== void 0 ? _a : [];
|
|
331
|
+
const newFees = [];
|
|
332
|
+
const initialCost = (_b = row.getTotalPrice(true)) !== null && _b !== void 0 ? _b : 0;
|
|
333
|
+
let totalFeesAdded = 0;
|
|
334
|
+
let totalFeesIncludedInRates = 0;
|
|
335
|
+
const rateFees = (0, core_1.getFilteredBookingRateFees)(hotelFees);
|
|
336
|
+
// In order to calculate fees that were removed from the incoming rates using extractFeeFromRates option, we need
|
|
337
|
+
// to know which fees were removed. When there's more than 1 percentage fee that's been removed, we can't
|
|
338
|
+
// work backwards to figure out what the original price was without this.
|
|
339
|
+
const removedPercentages = rateFees.filter((fee) => fee.extractFeeFromRates).map((fee) => fee.amount);
|
|
340
|
+
for (const fee of rateFees) {
|
|
341
|
+
if (fee.extractFeeFromRates || fee.includeInRates) {
|
|
342
|
+
// For these fees, we need to add the amount to the the totalFeesIncludedInRates variable, so that we can
|
|
343
|
+
// correctly calculate subsequent fees that are using the 'extractFeeFromRates' option.
|
|
344
|
+
const baseAmount = fee.extractFeeFromRates ? initialCost : initialCost + totalFeesIncludedInRates;
|
|
345
|
+
totalFeesIncludedInRates += (0, core_1.calculateFeeAmount)(fee, {
|
|
346
|
+
baseAmount,
|
|
373
347
|
numberOfNights: row.getNumberOfDays(),
|
|
374
348
|
extractedFromRates: fee.extractFeeFromRates,
|
|
375
349
|
removedPercentages,
|
|
376
350
|
});
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
351
|
+
}
|
|
352
|
+
let feeCalculationBaseAmount;
|
|
353
|
+
if (fee.extractFeeFromRates) {
|
|
354
|
+
// If this fee is included in the rates, there's no additional fee to calculate.
|
|
355
|
+
feeCalculationBaseAmount = fee.includeInRates ? 0 : initialCost;
|
|
356
|
+
}
|
|
357
|
+
else if (fee.includeInRates) {
|
|
358
|
+
// These fees are already included in the rates, we only need to calculate "fees on fees" if applicable.
|
|
359
|
+
if (!fee.includePreviousFeesInCalculation) {
|
|
360
|
+
continue;
|
|
380
361
|
}
|
|
362
|
+
feeCalculationBaseAmount = totalFeesAdded;
|
|
363
|
+
}
|
|
364
|
+
else {
|
|
365
|
+
// This fee either needs to include the full running total, or just the initial cost.
|
|
366
|
+
feeCalculationBaseAmount = fee.includePreviousFeesInCalculation ? initialCost + totalFeesAdded + totalFeesIncludedInRates : initialCost;
|
|
367
|
+
}
|
|
368
|
+
const feeAmount = (0, core_1.calculateFeeAmount)(fee, {
|
|
369
|
+
baseAmount: feeCalculationBaseAmount,
|
|
370
|
+
numberOfNights: row.getNumberOfDays(),
|
|
371
|
+
extractedFromRates: fee.extractFeeFromRates,
|
|
372
|
+
removedPercentages,
|
|
373
|
+
});
|
|
374
|
+
newFees.push({ hotelFee: fee, amount: feeAmount });
|
|
375
|
+
if (!fee.extractFeeFromRates) {
|
|
376
|
+
totalFeesAdded += feeAmount;
|
|
381
377
|
}
|
|
382
378
|
}
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
379
|
+
return newFees;
|
|
380
|
+
};
|
|
381
|
+
const getBookingAddonFees = () => {
|
|
382
|
+
var _a;
|
|
383
|
+
const hotelFees = (_a = hotel === null || hotel === void 0 ? void 0 : hotel.fees) !== null && _a !== void 0 ? _a : [];
|
|
384
|
+
const newFees = [];
|
|
386
385
|
const validBasketAddonRows = basketAddonRows.filter((row) => row.isValid());
|
|
387
386
|
for (const row of validBasketAddonRows) {
|
|
388
387
|
const initialCost = row.getTotalPrice() - row.getTotalFees();
|
|
@@ -423,10 +422,36 @@ function BasketContextWrapper(props) {
|
|
|
423
422
|
}
|
|
424
423
|
}
|
|
425
424
|
}
|
|
425
|
+
return newFees;
|
|
426
|
+
};
|
|
427
|
+
const updateBasketFeeRows = () => {
|
|
428
|
+
const validBasketRows = currentBasketRows === null || currentBasketRows === void 0 ? void 0 : currentBasketRows.filter((row) => row.isValid());
|
|
429
|
+
if (!validBasketRows.length || !(hotel === null || hotel === void 0 ? void 0 : hotel.fees)) {
|
|
430
|
+
setBasketFeeRows([]);
|
|
431
|
+
return;
|
|
432
|
+
}
|
|
433
|
+
const newFees = [];
|
|
434
|
+
/**
|
|
435
|
+
* Booking Fees.
|
|
436
|
+
* These fees aren't related to an addon or a room, they're just on the booking itself.
|
|
437
|
+
*/
|
|
438
|
+
newFees.push(...getBookingFees());
|
|
439
|
+
/**
|
|
440
|
+
* Booking Rate Fees.
|
|
441
|
+
*/
|
|
442
|
+
for (const row of validBasketRows) {
|
|
443
|
+
const rateFees = getBookingRateFees(row);
|
|
444
|
+
newFees.push(...rateFees);
|
|
445
|
+
}
|
|
446
|
+
/**
|
|
447
|
+
* Booking Addon Fees.
|
|
448
|
+
*/
|
|
449
|
+
newFees.push(...getBookingAddonFees());
|
|
426
450
|
setBasketFeeRows(newFees);
|
|
427
451
|
};
|
|
428
452
|
const quoteQueryID = (0, react_1.useMemo)(() => {
|
|
429
|
-
|
|
453
|
+
const requireQuote = (hotel === null || hotel === void 0 ? void 0 : hotel.rmsUseDepositQuote) || (hotel === null || hotel === void 0 ? void 0 : hotel.bookingFlow) !== core_1.EBookingFlow.Default;
|
|
454
|
+
if (!hotel || !requireQuote) {
|
|
430
455
|
return '';
|
|
431
456
|
}
|
|
432
457
|
return BookingAPI_1.default.Reservation.buildQuoteQueryID(currentBasketRows, isExternalMemberHotel ? memberNumber : undefined);
|
|
@@ -577,7 +602,7 @@ function BasketContextWrapper(props) {
|
|
|
577
602
|
if ((hotel === null || hotel === void 0 ? void 0 : hotel.bookingFlow) === core_1.EBookingFlow.PreCheckoutPencil) {
|
|
578
603
|
callApi = BookingAPI_1.default.Reservation.pencilReservation;
|
|
579
604
|
}
|
|
580
|
-
else if (hotel === null || hotel === void 0 ? void 0 : hotel.
|
|
605
|
+
else if (hotel === null || hotel === void 0 ? void 0 : hotel.rmsUseDepositQuote) {
|
|
581
606
|
callApi = BookingAPI_1.default.Reservation.getPriceQuote;
|
|
582
607
|
}
|
|
583
608
|
else {
|
|
@@ -664,7 +689,7 @@ function BasketContextWrapper(props) {
|
|
|
664
689
|
getTotalPrice: () => {
|
|
665
690
|
let totalPrice = returnAggregationAndTranslation((row) => { var _a; return (row.isValid() ? (_a = row.getRate()) === null || _a === void 0 ? void 0 : _a.getTotalPrice() : 0); });
|
|
666
691
|
// If the hotel requires a deposit, and enableCreditCardSurchase is false, we need to add the deposit fees to the total price.
|
|
667
|
-
if ((hotel === null || hotel === void 0 ? void 0 : hotel.
|
|
692
|
+
if ((hotel === null || hotel === void 0 ? void 0 : hotel.rmsUseDepositQuote) && !(hotel === null || hotel === void 0 ? void 0 : hotel.enableCreditCardSurcharge) && (hotel === null || hotel === void 0 ? void 0 : hotel.addDepositFeeToBookingTotal)) {
|
|
668
693
|
const depositFees = returnAggregationAndTranslation((row) => { var _a; return (row.quoteDetails ? (_a = row.quoteDetails) === null || _a === void 0 ? void 0 : _a.totalFees : 0); });
|
|
669
694
|
totalPrice += depositFees;
|
|
670
695
|
}
|
|
@@ -677,17 +702,15 @@ function BasketContextWrapper(props) {
|
|
|
677
702
|
});
|
|
678
703
|
return totalPrice;
|
|
679
704
|
},
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
return totalDeposit;
|
|
705
|
+
getTotalQuoteDeposit: () => {
|
|
706
|
+
return returnAggregationAndTranslation((row) => { var _a; return (row.quoteDetails ? (_a = row.quoteDetails) === null || _a === void 0 ? void 0 : _a.totalDeposit : 0); });
|
|
683
707
|
},
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
return totalDepositFees;
|
|
708
|
+
getDepositQuoteFees: () => {
|
|
709
|
+
return returnAggregationAndTranslation((row) => { var _a; return (row.quoteDetails ? (_a = row.quoteDetails) === null || _a === void 0 ? void 0 : _a.totalFees : 0); });
|
|
687
710
|
},
|
|
688
711
|
getTotalFees: () => {
|
|
689
712
|
let totalFees = returnAggregationAndTranslation((row) => { var _a; return (row.isValid() ? (_a = row.getRate()) === null || _a === void 0 ? void 0 : _a.getTotalFees() : 0); });
|
|
690
|
-
if (totalFees == 0 && (hotel === null || hotel === void 0 ? void 0 : hotel.
|
|
713
|
+
if (totalFees == 0 && (hotel === null || hotel === void 0 ? void 0 : hotel.rmsUseDepositQuote)) {
|
|
691
714
|
// Hotel may have credit card surcharges disabled, but they could still be included as a part of the quote.
|
|
692
715
|
totalFees = returnAggregationAndTranslation((row) => { var _a; return (row.quoteDetails ? (_a = row.quoteDetails) === null || _a === void 0 ? void 0 : _a.totalFees : 0); });
|
|
693
716
|
}
|
|
@@ -729,11 +752,56 @@ function BasketContextWrapper(props) {
|
|
|
729
752
|
return (0, Fee_1.sortFees)(fees, (hotel === null || hotel === void 0 ? void 0 : hotel.fees) || []);
|
|
730
753
|
},
|
|
731
754
|
getTotalPayNow: () => {
|
|
732
|
-
|
|
755
|
+
var _a, _b;
|
|
756
|
+
if (hotel === null || hotel === void 0 ? void 0 : hotel.rmsUseDepositQuote) {
|
|
733
757
|
const depositFees = returnAggregationAndTranslation((row) => { var _a; return (row.quoteDetails ? (_a = row.quoteDetails) === null || _a === void 0 ? void 0 : _a.totalFees : 0); });
|
|
734
|
-
return workingContext.
|
|
758
|
+
return workingContext.getTotalQuoteDeposit() + depositFees;
|
|
759
|
+
}
|
|
760
|
+
const anyPolicyIsMissingDepositMode = currentBasketRows.some((row) => {
|
|
761
|
+
var _a;
|
|
762
|
+
const guaranteePolicy = (_a = row.getRate()) === null || _a === void 0 ? void 0 : _a.getGuaranteePolicy();
|
|
763
|
+
return guaranteePolicy && guaranteePolicy.depositMode === null;
|
|
764
|
+
});
|
|
765
|
+
if (anyPolicyIsMissingDepositMode) {
|
|
766
|
+
// This should only happen for SynXis.
|
|
767
|
+
return null;
|
|
768
|
+
}
|
|
769
|
+
let totalPayNow = 0;
|
|
770
|
+
const anyRateRequiresFullPrepayment = currentBasketRows.some((row) => { var _a; return ((_a = row.getRate()) === null || _a === void 0 ? void 0 : _a.getGuaranteePolicy().depositMode) === core_1.EGuaranteePolicyDepositMode.Full; });
|
|
771
|
+
if (anyRateRequiresFullPrepayment) {
|
|
772
|
+
// Add booking fees that aren't associated with a rate or addon.
|
|
773
|
+
getBookingFees().forEach((fee) => {
|
|
774
|
+
totalPayNow += fee.amount;
|
|
775
|
+
});
|
|
776
|
+
}
|
|
777
|
+
const firstRateGuaranteePolicy = (_b = (_a = currentBasketRows[0]) === null || _a === void 0 ? void 0 : _a.getRate()) === null || _b === void 0 ? void 0 : _b.getGuaranteePolicy();
|
|
778
|
+
if (firstRateGuaranteePolicy) {
|
|
779
|
+
const addonTotal = basketAddonRows.reduce((acc, row) => acc + row.getTotalPrice(), 0);
|
|
780
|
+
const addonTotalWithFees = addonTotal + getBookingAddonFees().reduce((acc, row) => acc + row.amount, 0);
|
|
781
|
+
const depositPercentage = firstRateGuaranteePolicy.depositPercentage;
|
|
782
|
+
switch (firstRateGuaranteePolicy.depositMode) {
|
|
783
|
+
case core_1.EGuaranteePolicyDepositMode.Full:
|
|
784
|
+
totalPayNow += addonTotalWithFees;
|
|
785
|
+
break;
|
|
786
|
+
case core_1.EGuaranteePolicyDepositMode.Percentage:
|
|
787
|
+
if (depositPercentage) {
|
|
788
|
+
totalPayNow += addonTotalWithFees * (depositPercentage / 100);
|
|
789
|
+
}
|
|
790
|
+
break;
|
|
791
|
+
case core_1.EGuaranteePolicyDepositMode.None:
|
|
792
|
+
case core_1.EGuaranteePolicyDepositMode.FirstNight:
|
|
793
|
+
break;
|
|
794
|
+
}
|
|
795
|
+
}
|
|
796
|
+
for (const row of currentBasketRows) {
|
|
797
|
+
const rate = row.getRate();
|
|
798
|
+
// The BookingRate fees that are not included in the rate.
|
|
799
|
+
const bookingRateFees = getBookingRateFees(row).reduce((acc, fee) => acc + fee.amount, 0);
|
|
800
|
+
if (rate) {
|
|
801
|
+
totalPayNow += rate.getDepositAccordingToGuaranteePolicy(bookingRateFees);
|
|
802
|
+
}
|
|
735
803
|
}
|
|
736
|
-
return
|
|
804
|
+
return totalPayNow;
|
|
737
805
|
},
|
|
738
806
|
/**
|
|
739
807
|
* Pops the provided row from the current basket array
|
|
@@ -814,6 +882,10 @@ function BasketContextWrapper(props) {
|
|
|
814
882
|
sessionProvider === null || sessionProvider === void 0 ? void 0 : sessionProvider.initialize(undefined, (_b = beContext === null || beContext === void 0 ? void 0 : beContext.engine) === null || _b === void 0 ? void 0 : _b.getSource());
|
|
815
883
|
const params = new URLSearchParams(window.location.search);
|
|
816
884
|
params.delete('planpay_checkout_id');
|
|
885
|
+
// MPGS params
|
|
886
|
+
params.delete('resultIndicator');
|
|
887
|
+
params.delete('sessionVersion');
|
|
888
|
+
params.delete('checkoutVersion');
|
|
817
889
|
window.history.replaceState({}, '', `${window.location.pathname}?${params}`);
|
|
818
890
|
navigate(StepThanks_1.default.getStepUrl());
|
|
819
891
|
},
|