CASH-415 do not get the pricing by day part or price it when insurance or in the control variation of the experiment
This commit is contained in:
CarlNation 2025-03-21 10:06:14 -04:00
parent d365390938
commit 9f3b901ce2

View file

@ -306,7 +306,7 @@ export default {
}); });
// Get pricingByDayUpcharge needed for Pricing By Day // Get pricingByDayUpcharge needed for Pricing By Day
const pricingByDayUpchargePartPromise = getPricingByDayPartWithPrice(); const pricingByDayUpchargePartPromise = showPricingByDay ? getPricingByDayPartWithPrice() : null;
const premiumFeePromise = baseMixin.methods.dispatchStoreActionWithLogging( const premiumFeePromise = baseMixin.methods.dispatchStoreActionWithLogging(
storeActions.GET_MOBILE_PREMIUM_FEE, storeActions.GET_MOBILE_PREMIUM_FEE,
@ -354,10 +354,7 @@ export default {
const resultMap = await settleAllPromises(promiseResultMap); const resultMap = await settleAllPromises(promiseResultMap);
const pricingByDayUpcharge = await baseMixin.methods.getTotalLineItemPrice( const pricingByDayUpcharge = showPricingByDay ? await baseMixin.methods.getTotalLineItemPrice(resultMap.pricingByDayUpchargePart,false) : null;
resultMap.pricingByDayUpchargePart,
false
);
const datePickerInitialData = resultMap.datePickerInitialData; const datePickerInitialData = resultMap.datePickerInitialData;
datePickerInitialData.pricingByDayBasePrice = pricingByDayBasePrice; datePickerInitialData.pricingByDayBasePrice = pricingByDayBasePrice;
@ -626,6 +623,7 @@ export default {
const supportingItems = this.getSupportingItems(); const supportingItems = this.getSupportingItems();
// if we have a pricing by day upcharge, then save/update supporting items with it // if we have a pricing by day upcharge, then save/update supporting items with it
if (this.showPricingByDay) {
const pricingByDayUpchargeFeeIndex = supportingItems?.findIndex( const pricingByDayUpchargeFeeIndex = supportingItems?.findIndex(
(item) => item.partType == PRICING_BY_DAY_PART_TYPE (item) => item.partType == PRICING_BY_DAY_PART_TYPE
); );
@ -646,6 +644,7 @@ export default {
supportingItems.splice(pricingByDayUpchargeFeeIndex, 1); supportingItems.splice(pricingByDayUpchargeFeeIndex, 1);
} }
} }
}
// if we have a premium fee(early bird), then save/update supporting items // if we have a premium fee(early bird), then save/update supporting items
if ( if (
@ -672,6 +671,7 @@ export default {
} }
// if it's not a mobile and/or premium early bird, then make sure we remove any that may have been added // if it's not a mobile and/or premium early bird, then make sure we remove any that may have been added
if (this.showPricingByDay) {
const removePremiumFeeIndex = supportingItems.findIndex( const removePremiumFeeIndex = supportingItems.findIndex(
(item) => item.partType == PREMIUM_FEE_PART_TYPE (item) => item.partType == PREMIUM_FEE_PART_TYPE
); );
@ -680,6 +680,7 @@ export default {
supportingItems.splice(removePremiumFeeIndex, 1); supportingItems.splice(removePremiumFeeIndex, 1);
} }
} }
}
this.dispatchStoreAction( this.dispatchStoreAction(
this.storeActions.SAVE_SUPPORTING_ITEMS_SUPPRESSING_STATE_RESETTING, this.storeActions.SAVE_SUPPORTING_ITEMS_SUPPRESSING_STATE_RESETTING,