WIP code review updates.

This commit is contained in:
bmauger 2022-05-04 14:22:39 -04:00
parent 519fa5740a
commit 7b8ad775cf
5 changed files with 20 additions and 50 deletions

View file

@ -93,7 +93,7 @@ async function getLatestPageForRedirection() {
return fmgPageValues.VEHICLE_DAMAGE; return fmgPageValues.VEHICLE_DAMAGE;
} else { } else {
if (store.getters.vehicle.vin) { if (store.getters.vehicle.vin) {
return fmgPageValues.LICENSE_PLATE_LOOKUP; return fmgPageValues.VIN_LOOKUP;
} else { } else {
return fmgPageValues.VIN_LOOKUP; return fmgPageValues.VIN_LOOKUP;
} }

View file

@ -167,9 +167,6 @@ export default {
vm.setCmsContent(resultMap.cmsContent); vm.setCmsContent(resultMap.cmsContent);
}); });
}, },
props: {
validationRules: String,
},
data() { data() {
return { return {
isRegistrationZipServicable: true, isRegistrationZipServicable: true,

View file

@ -62,16 +62,9 @@
:manualHeadline="MatchedDifferentVehicleAlertHeader" :manualHeadline="MatchedDifferentVehicleAlertHeader"
:manualCopy="MatchedDifferentVehicleAlertBody" :manualCopy="MatchedDifferentVehicleAlertBody"
v-model="customAlertData" v-model="customAlertData"
v-if="matchedDifferentVehicle" v-if="isCarIdDifferent"
alertClass="alert-danger" alertClass="alert-danger"
/> />
<alert
class="my-3"
v-model="customAlertData"
v-if="noMatchAlert"
alertClass="alert-warning"
cmsWidgetName="NoMatchAlertWidget"
/>
<alert <alert
class="my-3" class="my-3"
:manualHeadline="NoServiceZipHeader" :manualHeadline="NoServiceZipHeader"
@ -80,13 +73,6 @@
v-if="noServiceZip" v-if="noServiceZip"
alertClass="alert-warning" alertClass="alert-warning"
/> />
<alert
class="my-3"
v-model="customAlertData"
v-if="foundWindshieldAlert"
alertClass="alert-warning"
cmsWidgetName="FoundWindshieldAlert"
/>
<alert <alert
class="my-3" class="my-3"
v-model="customAlertData" v-model="customAlertData"
@ -98,7 +84,7 @@
class="my-3" class="my-3"
v-model="customAlertData" v-model="customAlertData"
v-if="perfectMatchNewVinAlert" v-if="perfectMatchNewVinAlert"
alertClass="alert-warning" alertClass="alert-success"
cmsWidgetName="PerfectMatchNewVinAlert" cmsWidgetName="PerfectMatchNewVinAlert"
/> />
<funnelFooter <funnelFooter
@ -175,44 +161,39 @@ export default {
vm.setCmsContent(resultMap.cmsContent); vm.setCmsContent(resultMap.cmsContent);
}); });
}, },
props: {
validationRules: String,
},
data() { data() {
return { return {
matchedDifferentVehicle: false, isCarIdDifferent: false,
noMatchAlert: false,
noServiceZip: false, noServiceZip: false,
vinFound: false,
vinFoundReadOnly: false,
foundWindshieldAlert: false,
vinNotFound: false, vinNotFound: false,
perfectMatchNewVinAlert: false,
vin: this.getVinFromStore(), vin: this.getVinFromStore(),
zip: this.getZipFromStore(), zip: this.getZipFromStore(),
email: this.getEmailFromStore(), email: this.getEmailFromStore(),
customAlertData: {}, customAlertData: {},
isCarIdDifferent: false,
previouslyEnteredCarId: '', previouslyEnteredCarId: '',
invalidZip: '', invalidZip: '',
vinPopulatedOnPageLoad: this.getVinFromStore()?.length > 0,
}; };
}, },
computed: { computed: {
perfectMatchNewVinAlert() {
return this.vinPopulatedOnPageLoad && this.vin === this.getVinFromStore();
},
MatchedDifferentVehicleAlertHeader(){ MatchedDifferentVehicleAlertHeader(){
let text = this.getCmsContent("MatchedDifferentVehicle", const text = this.getCmsContent("MatchedDifferentVehicle",
"HeadlineText").replaceAll("{custom:damage}", getDamageString()); "HeadlineText").replaceAll("{custom:damage}", getDamageString());
return text; return text;
}, },
MatchedDifferentVehicleAlertBody(){ MatchedDifferentVehicleAlertBody(){
let text = this.getCmsContent("MatchedDifferentVehicle", const text = this.getCmsContent("MatchedDifferentVehicle",
"BodyText").replaceAll("{custom:damage}", getDamageString()).replaceAll("{custom:vinlookupYear}", this.customAlertData?.vehicleInfo?.year).replaceAll("{custom:vinlookupMake}", this.customAlertData?.vehicleInfo?.make).replaceAll("{custom:vinlookupModel}", "BodyText").replaceAll("{custom:damage}", getDamageString()).replaceAll("{custom:vinlookupYear}", this.customAlertData?.vehicleInfo?.year).replaceAll("{custom:vinlookupMake}", this.customAlertData?.vehicleInfo?.make).replaceAll("{custom:vinlookupModel}",
this.customAlertData?.vehicleInfo?.model); this.customAlertData?.vehicleInfo?.model);
return text; return text;
}, },
NoServiceZipHeader(){ NoServiceZipHeader(){
let text = this.getCmsContent("NoServiceZipWidget", "HeadlineText").replaceAll("{custom:serviceZip}", this.invalidZip); const text = this.getCmsContent("NoServiceZipWidget", "HeadlineText").replaceAll("{custom:serviceZip}", this.invalidZip);
return text; return text;
}, },
@ -288,7 +269,7 @@ export default {
this.isVinValid = true; this.isVinValid = true;
this.isSelectedGlassAvailableForVehicle = await isGlassAvailableForCarId(vehicleLookup.data.carId); this.isSelectedGlassAvailableForVehicle = await isGlassAvailableForCarId(vehicleLookup.data.carId);
this.$refs.funnelFooter.removeLoader(); this.$refs.funnelFooter.removeLoader();
this.matchedDifferentVehicle = true; this.isCarIdDifferent = true;
return; return;
} }
this.updateStore(vehicleLookup.data); this.updateStore(vehicleLookup.data);

View file

@ -114,19 +114,11 @@ const routingTable = [
maps: [ maps: [
{ {
scenario: navigationScenarios.CLICKED_BACK, scenario: navigationScenarios.CLICKED_BACK,
destinationFmgPageValue: fmgPageValues.REVEAL, destinationFmgPageValue: fmgPageValues.ESTIMATE,
},
{
scenario: navigationScenarios.CLICKED_BACK_WITH_VIN,
destinationFmgPageValue: fmgPageValues.VEHICLE_DAMAGE,
},
{
scenario: navigationScenarios.VIN_LOOKUP,
destinationFmgPageValue: fmgPageValues.PART_QUESTIONS,
}, },
{ {
scenario: navigationScenarios.CLICKED_FORWARD, scenario: navigationScenarios.CLICKED_FORWARD,
destinationFmgPageValue: fmgPageValues.ESTIMATE, destinationFmgPageValue: fmgPageValues.VEHICLE_DAMAGE,
} }
], ],
}, },
@ -169,9 +161,9 @@ const routingTable = [
{ {
scenario: navigationScenarios.CLICKED_FORWARD, scenario: navigationScenarios.CLICKED_FORWARD,
destinationFmgPageValue: fmgPageValues.VEHICLE_DAMAGE, destinationFmgPageValue: fmgPageValues.VEHICLE_DAMAGE,
}, },
], ],
}, },
]; ];
export { routingTable }; export { routingTable };

View file

@ -145,16 +145,16 @@ export const mutations = {
state.order.vehicle.registration.address = registrationAddress; state.order.vehicle.registration.address = registrationAddress;
}, },
updateServiceLocationZip(state, serviceLocationZip){ updateServiceLocationZip(state, serviceLocationZip){
state.order.serviceLocation.zip = serviceLocationZip; state.order.vehicle.registration.zip = serviceLocationZip;
}, },
updateRegistrationCity(state, serviceCity){ updateRegistrationCity(state, serviceCity){
state.order.serviceLocation.city = serviceCity; state.order.vehicle.registration.city = serviceCity;
}, },
updateRegistrationFirstName(state, firstName){ updateRegistrationFirstName(state, firstName){
state.order.serviceLocation.firstName = firstName; state.order.vehicle.registration.firstName = firstName;
}, },
updateRegistrationLastName(state, lastName){ updateRegistrationLastName(state, lastName){
state.order.serviceLocation.lastName = lastName; state.order.vehicle.registration.lastName = lastName;
}, },
updateCustomerEmailAddress(state, customerEmailAddress){ updateCustomerEmailAddress(state, customerEmailAddress){
state.order.customer.emailAddress = customerEmailAddress; state.order.customer.emailAddress = customerEmailAddress;