{
- return match[1] === "globalState";
+ return match[1] === magicStrings.GLOBAL_STATE;
})
// Our final string value that will be built from the matches.
@@ -63,7 +64,7 @@ function mapStringToState(str) {
const stringWithReplacement = str.replace(match[0], storeState);
// If we still have values we need to substitute, call this function again.
- if (stringWithReplacement.includes("{globalState:")) {
+ if (stringWithReplacement.includes(magicStrings.GLOBAL_STATE)) {
return mapStringToState(stringWithReplacement);
}
@@ -99,7 +100,7 @@ function findAndReplaceGlobalStateValues(widgetModel, widgetName) {
function processWidgetItemForReplacement(widgetModel, key) {
// If we have a string, and it needs to be replaced.
if (typeof widgetModel[key] === "string") {
- if (widgetModel[key].includes("{globalState:")) {
+ if (widgetModel[key].includes(magicStrings.GLOBAL_STATE)) {
widgetModel[key] = mapStringToState(widgetModel[key]);
}
return widgetModel[key];
@@ -119,4 +120,4 @@ function processWidgetItemForReplacement(widgetModel, key) {
// If we have something else like a number, boolean, etc. just return it
return widgetModel[key];
-}
+}
\ No newline at end of file
diff --git a/src/helpers/damage-helper.js b/src/helpers/damage-helper.js
new file mode 100644
index 000000000..603109b58
--- /dev/null
+++ b/src/helpers/damage-helper.js
@@ -0,0 +1,5 @@
+import store from "@/store";
+
+export function getDamageString() {
+ return store.getters.damage.glassToReplace.length > 1 ? "match" : store.getters.damage.glassToReplace[0].location;
+}
\ No newline at end of file
diff --git a/src/helpers/heritage-integration/navigation-helper.js b/src/helpers/heritage-integration/navigation-helper.js
index 06eff0042..b193e1cba 100644
--- a/src/helpers/heritage-integration/navigation-helper.js
+++ b/src/helpers/heritage-integration/navigation-helper.js
@@ -43,10 +43,10 @@ export async function getPageToRouteExistingOrderTo(toRoute = {}, existingHerita
return 'vehicle-damage'
} else {
if (store.getters.vehicle.vin) {
- return 'vehicle-damage';
+ return 'license-plate-lookup';
//return "vin-lookup"; (uncomment)
} else {
- return 'vehicle-damage';
+ return 'license-plate-lookup';
//return "estimate" (uncomment)
}
}
@@ -66,6 +66,9 @@ export async function navigateToHeritageFunnel() {
{
corid: store.getters.order.referralCorrelationId,
src: "concept-funnel",
+ // TODO CSR-28, remove this
+ cns: "all",
+ experiments: "RemoveServiceAreaPage=ServAreaRemoval_V7=NoShowPackages_CONTROL=true,ConceptFunnel=ConceptFunnel_V1=ConceptFunnel_TEST=true"
}
);
}
\ No newline at end of file
diff --git a/src/layouts/license-plate-lookup/license-plate-lookup.vue b/src/layouts/license-plate-lookup/license-plate-lookup.vue
index e1cb88150..6b10ae0dd 100644
--- a/src/layouts/license-plate-lookup/license-plate-lookup.vue
+++ b/src/layouts/license-plate-lookup/license-plate-lookup.vue
@@ -26,22 +26,21 @@
@@ -78,6 +77,7 @@ import baseMixin from "@/mixins/base-mixin.js";
import { storeActions } from "@/constants/store-actions";
import { storeMutations } from "@/constants/store-mutations";
import { errorMessages } from "@/constants/error-messages";
+import { getDamageString } from "@/helpers/damage-helper";
import { required, regex } from "@/helpers/validation-rules";
import { Form, defineRule } from "vee-validate";
import { navigateToHeritageFunnel } from "@/helpers/heritage-integration/navigation-helper";
@@ -125,6 +125,35 @@ export default {
customAlertData: {}
};
},
+ computed: {
+ MatchedDifferentVehicleAlertHeader(){
+ let text = this.getCmsContent("MatchedDifferentVehicleAlertWidget", "HeadlineText");
+ // Replace all instances where custom data is implemented
+ text = text.replaceAll("{custom:damage}", getDamageString());
+
+ return text;
+ },
+ MatchedDifferentVehicleAlertBody(){
+ let text = this.getCmsContent("MatchedDifferentVehicleAlertWidget", "BodyText");
+ // Replace all instances where custom data is implemented
+ text = text.replaceAll("{custom:damage}", getDamageString());
+ text = text.replaceAll("{custom:plateLookupYear}", this.customAlertData?.vehicleInfo?.year);
+ text = text.replaceAll("{custom:plateLookupMake}", this.customAlertData?.vehicleInfo?.make);
+ text = text.replaceAll("{custom:plateLookupModel}", this.customAlertData?.vehicleInfo?.model);
+
+ return text;
+ },
+ NoServiceZipHeader(){
+ let text = this.getCmsContent("NoServiceZipWidget", "HeadlineText");
+ // Replace all instances where custom data is implemented
+ text = text.replaceAll("{custom:zip}", this.zip);
+
+ return text;
+ },
+ NoServiceZipBody(){
+ return this.getCmsContent("NoServiceZipWidget", "BodyText");
+ }
+ },
methods: {
arePagePrerequisitesValid() {
return store.getters.vehicle.carId !== null;
@@ -171,7 +200,7 @@ export default {
vehicleInfo = store.getters.vehicle;
}
- this.updateStore(vin, vehicleInfo, zipValidation.data.state);
+ this.updateCustomerInfo(vin, vehicleInfo, zipValidation.data.state);
const partsData = await baseMixin.methods.dispatchNonBlockingStoreAction(
this.storeActions.GET_PARTS_OR_QUESTIONS,
@@ -209,7 +238,7 @@ export default {
{ licensePlate: plate, licenseState: state }
);
},
- updateStore(vin, vehicleInfo, registrationState) {
+ updateCustomerInfo(vin, vehicleInfo, registrationState) {
// if(vehicleDamage){
// store.dispatch(storeActions.RESET_DAMAGE_STATE_AND_DEPENDENCIES);
// }
diff --git a/src/layouts/part-questions/part-questions.vue b/src/layouts/part-questions/part-questions.vue
index 0cb64dcbc..0818bb46f 100644
--- a/src/layouts/part-questions/part-questions.vue
+++ b/src/layouts/part-questions/part-questions.vue
@@ -5,7 +5,7 @@