Merge pull request #2419 from Safelite/rlsmerge/2025.04.10-to-2025.04.24
Rlsmerge/2025.04.10 to 2025.04.24
This commit is contained in:
commit
28c2bba85a
1 changed files with 22 additions and 0 deletions
|
|
@ -53,11 +53,33 @@ import { Form, defineRule } from "vee-validate";
|
|||
import baseMixin from "@/mixins/base-mixin.js";
|
||||
import { navigateToHeritageFunnel } from "@/helpers/heritage-integration/navigation-helper";
|
||||
import { applicationConfig } from "@/constants/application-config";
|
||||
import experimentMixin from "@/mixins/experiment-mixin.js";
|
||||
import { experimentSettings } from "@/constants/experiments";
|
||||
import { partNumberStrings } from "@/constants/part-number-strings";
|
||||
import { deepClone } from "@/helpers/object-helper";
|
||||
import store from "@/store";
|
||||
|
||||
export default {
|
||||
name: "insurance-company",
|
||||
async beforeRouteEnter(to, from, next) {
|
||||
// Remove any Pricing By Day lineItems before going to Heritage insurance
|
||||
const isPricingByDayExperiment = experimentMixin.methods.hasSettingEqualTo(
|
||||
experimentSettings.PRICING_BY_DAY,
|
||||
"true"
|
||||
);
|
||||
if (isPricingByDayExperiment) {
|
||||
const lineItems = deepClone(store.getters.order.lineItems);
|
||||
const supportingItemsWithoutPricingByDay =
|
||||
baseMixin.methods.filterOutCertainPartTypesOrNumbers(lineItems.supportingItems, {
|
||||
partNumbersToRemove: [partNumberStrings.PRICING_BY_DAY_UPCHARGE],
|
||||
});
|
||||
baseMixin.methods.dispatchStoreAction(
|
||||
storeActions.SAVE_SUPPORTING_ITEMS_SUPPRESSING_STATE_RESETTING,
|
||||
supportingItemsWithoutPricingByDay,
|
||||
false
|
||||
);
|
||||
}
|
||||
|
||||
// Call APIs
|
||||
const cmsContentPromise = fetchCmsContentForPage(to.query.fmgPage);
|
||||
const insuranceCompanyListPromise = baseMixin.methods.dispatchStoreActionWithLogging(
|
||||
|
|
|
|||
Loading…
Reference in a new issue