Merge branch 'release/2023.03.09' into rlsmerge/2023.03.09-to-develop-v3
This commit is contained in:
commit
d8d653e7cb
5 changed files with 22 additions and 9 deletions
|
|
@ -1,7 +1,7 @@
|
||||||
const queryStrings = {
|
const queryStrings = {
|
||||||
FMG_PAGE: "fmgPage",
|
FMG_PAGE: "fmgPage",
|
||||||
START_TYPE: "start_type",
|
START_TYPE: "start_type",
|
||||||
ZIP_CODE: "zipCode",
|
ZIP_CODE: "zipcode",
|
||||||
};
|
};
|
||||||
|
|
||||||
export { queryStrings };
|
export { queryStrings };
|
||||||
|
|
|
||||||
|
|
@ -134,7 +134,7 @@ export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
selectedVinLookupMethod: null,
|
selectedVinLookupMethod: null,
|
||||||
serviceZipCode: this.getZipFromStore() ?? this.$route.query.zipCode,
|
serviceZipCode: this.getZipFromStore() ?? this.$route.query.zipcode,
|
||||||
emailAddress: this.getEmailFromStore(),
|
emailAddress: this.getEmailFromStore(),
|
||||||
displayInvalidZipAlert: false,
|
displayInvalidZipAlert: false,
|
||||||
displayNonServiceableZipAlert: false,
|
displayNonServiceableZipAlert: false,
|
||||||
|
|
@ -147,9 +147,13 @@ export default {
|
||||||
//Call APIs
|
//Call APIs
|
||||||
const cmsContentPromise = fetchCmsContentForPage(to.query.fmgPage);
|
const cmsContentPromise = fetchCmsContentForPage(to.query.fmgPage);
|
||||||
|
|
||||||
const zip = Object.hasOwn(to.query, queryStrings.ZIP_CODE) ? to.query.zipCode : null;
|
const queryString = window.location.search;
|
||||||
|
const urlParams = new URLSearchParams(queryString);
|
||||||
|
const hasZip = urlParams.has(queryStrings.ZIP_CODE);
|
||||||
|
const zip = urlParams.get(queryStrings.ZIP_CODE);
|
||||||
|
|
||||||
var vinByAddressPromise;
|
var vinByAddressPromise;
|
||||||
if (zip) {
|
if (hasZip) {
|
||||||
vinByAddressPromise = baseMixin.methods.dispatchStoreAction(
|
vinByAddressPromise = baseMixin.methods.dispatchStoreAction(
|
||||||
storeActions.IS_VIN_BY_ADDRESS_PERMISSIBLE,
|
storeActions.IS_VIN_BY_ADDRESS_PERMISSIBLE,
|
||||||
zip,
|
zip,
|
||||||
|
|
@ -189,7 +193,7 @@ export default {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (zip) {
|
if (zip && resultMap.vinByAddress === false) {
|
||||||
var indexToRemove = resultMap.cmsContent.VinLookupMethod.Answers.findIndex(
|
var indexToRemove = resultMap.cmsContent.VinLookupMethod.Answers.findIndex(
|
||||||
(answer) => answer.Name === "HomeAddress"
|
(answer) => answer.Name === "HomeAddress"
|
||||||
);
|
);
|
||||||
|
|
|
||||||
|
|
@ -152,7 +152,7 @@ export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
licensePlate: this.getLicensePlateFromStore(),
|
licensePlate: this.getLicensePlateFromStore(),
|
||||||
registrationZipCode: this.getRegistrationZipFromStore() ?? this.$route.query.zipCode,
|
registrationZipCode: this.getRegistrationZipFromStore() ?? this.$route.query.zipcode,
|
||||||
email: this.getEmailFromStore(),
|
email: this.getEmailFromStore(),
|
||||||
serviceZipCode: this.getServiceZipFromStore(),
|
serviceZipCode: this.getServiceZipFromStore(),
|
||||||
displayNonServiceableZipAlert: false,
|
displayNonServiceableZipAlert: false,
|
||||||
|
|
|
||||||
|
|
@ -176,7 +176,7 @@ export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
vin: this.getVinFromStore(),
|
vin: this.getVinFromStore(),
|
||||||
serviceZipCode: this.getZipFromStore() ?? this.$route.query.zipCode,
|
serviceZipCode: this.getZipFromStore() ?? this.$route.query.zipcode,
|
||||||
emailAddress: this.getEmailFromStore(),
|
emailAddress: this.getEmailFromStore(),
|
||||||
isCarIdDifferent: false,
|
isCarIdDifferent: false,
|
||||||
customAlertData: {},
|
customAlertData: {},
|
||||||
|
|
|
||||||
|
|
@ -265,14 +265,23 @@ async function navigate(
|
||||||
fmgPage: destinationFmgPageValue,
|
fmgPage: destinationFmgPageValue,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const queryString = window.location.search;
|
||||||
|
const urlParams = new URLSearchParams(queryString);
|
||||||
|
const lowerCaseParams = new URLSearchParams();
|
||||||
|
for (const [name, value] of urlParams) {
|
||||||
|
lowerCaseParams.append(name.toLowerCase(), value);
|
||||||
|
}
|
||||||
|
const hasZip = lowerCaseParams.has(queryStrings.ZIP_CODE);
|
||||||
|
const zip = lowerCaseParams.get(queryStrings.ZIP_CODE);
|
||||||
|
|
||||||
if (
|
if (
|
||||||
Object.hasOwn(currentRoute.query, queryStrings.ZIP_CODE) &&
|
hasZip &&
|
||||||
(store.getters.order.serviceLocation.zipCode === undefined ||
|
(store.getters.order.serviceLocation.zipCode === undefined ||
|
||||||
store.getters.order.serviceLocation.zipCode == null) &&
|
store.getters.order.serviceLocation.zipCode == null) &&
|
||||||
(store.getters.order.vehicle.registration.zipCode === undefined ||
|
(store.getters.order.vehicle.registration.zipCode === undefined ||
|
||||||
store.getters.order.vehicle.registration.zipCode == null)
|
store.getters.order.vehicle.registration.zipCode == null)
|
||||||
) {
|
) {
|
||||||
queryStringsObject[queryStrings.ZIP_CODE] = currentRoute.query.zipCode;
|
queryStringsObject[queryStrings.ZIP_CODE] = zip;
|
||||||
}
|
}
|
||||||
|
|
||||||
router.push({
|
router.push({
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue