Merge branch 'release/2025.04.10' into rlsmerge/2025.04.10-to-develop
This commit is contained in:
commit
6b00a79852
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 baseMixin from "@/mixins/base-mixin.js";
|
||||||
import { navigateToHeritageFunnel } from "@/helpers/heritage-integration/navigation-helper";
|
import { navigateToHeritageFunnel } from "@/helpers/heritage-integration/navigation-helper";
|
||||||
import { applicationConfig } from "@/constants/application-config";
|
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";
|
import store from "@/store";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "insurance-company",
|
name: "insurance-company",
|
||||||
async beforeRouteEnter(to, from, next) {
|
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
|
// Call APIs
|
||||||
const cmsContentPromise = fetchCmsContentForPage(to.query.fmgPage);
|
const cmsContentPromise = fetchCmsContentForPage(to.query.fmgPage);
|
||||||
const insuranceCompanyListPromise = baseMixin.methods.dispatchStoreActionWithLogging(
|
const insuranceCompanyListPromise = baseMixin.methods.dispatchStoreActionWithLogging(
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue