WIP code review updates.
This commit is contained in:
parent
519fa5740a
commit
7b8ad775cf
5 changed files with 20 additions and 50 deletions
|
|
@ -93,7 +93,7 @@ async function getLatestPageForRedirection() {
|
|||
return fmgPageValues.VEHICLE_DAMAGE;
|
||||
} else {
|
||||
if (store.getters.vehicle.vin) {
|
||||
return fmgPageValues.LICENSE_PLATE_LOOKUP;
|
||||
return fmgPageValues.VIN_LOOKUP;
|
||||
} else {
|
||||
return fmgPageValues.VIN_LOOKUP;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -167,9 +167,6 @@ export default {
|
|||
vm.setCmsContent(resultMap.cmsContent);
|
||||
});
|
||||
},
|
||||
props: {
|
||||
validationRules: String,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
isRegistrationZipServicable: true,
|
||||
|
|
|
|||
|
|
@ -62,16 +62,9 @@
|
|||
:manualHeadline="MatchedDifferentVehicleAlertHeader"
|
||||
:manualCopy="MatchedDifferentVehicleAlertBody"
|
||||
v-model="customAlertData"
|
||||
v-if="matchedDifferentVehicle"
|
||||
v-if="isCarIdDifferent"
|
||||
alertClass="alert-danger"
|
||||
/>
|
||||
<alert
|
||||
class="my-3"
|
||||
v-model="customAlertData"
|
||||
v-if="noMatchAlert"
|
||||
alertClass="alert-warning"
|
||||
cmsWidgetName="NoMatchAlertWidget"
|
||||
/>
|
||||
<alert
|
||||
class="my-3"
|
||||
:manualHeadline="NoServiceZipHeader"
|
||||
|
|
@ -80,13 +73,6 @@
|
|||
v-if="noServiceZip"
|
||||
alertClass="alert-warning"
|
||||
/>
|
||||
<alert
|
||||
class="my-3"
|
||||
v-model="customAlertData"
|
||||
v-if="foundWindshieldAlert"
|
||||
alertClass="alert-warning"
|
||||
cmsWidgetName="FoundWindshieldAlert"
|
||||
/>
|
||||
<alert
|
||||
class="my-3"
|
||||
v-model="customAlertData"
|
||||
|
|
@ -98,7 +84,7 @@
|
|||
class="my-3"
|
||||
v-model="customAlertData"
|
||||
v-if="perfectMatchNewVinAlert"
|
||||
alertClass="alert-warning"
|
||||
alertClass="alert-success"
|
||||
cmsWidgetName="PerfectMatchNewVinAlert"
|
||||
/>
|
||||
<funnelFooter
|
||||
|
|
@ -175,44 +161,39 @@ export default {
|
|||
vm.setCmsContent(resultMap.cmsContent);
|
||||
});
|
||||
},
|
||||
props: {
|
||||
validationRules: String,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
matchedDifferentVehicle: false,
|
||||
noMatchAlert: false,
|
||||
isCarIdDifferent: false,
|
||||
noServiceZip: false,
|
||||
vinFound: false,
|
||||
vinFoundReadOnly: false,
|
||||
foundWindshieldAlert: false,
|
||||
vinNotFound: false,
|
||||
perfectMatchNewVinAlert: false,
|
||||
vin: this.getVinFromStore(),
|
||||
zip: this.getZipFromStore(),
|
||||
email: this.getEmailFromStore(),
|
||||
customAlertData: {},
|
||||
isCarIdDifferent: false,
|
||||
previouslyEnteredCarId: '',
|
||||
invalidZip: '',
|
||||
vinPopulatedOnPageLoad: this.getVinFromStore()?.length > 0,
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
perfectMatchNewVinAlert() {
|
||||
return this.vinPopulatedOnPageLoad && this.vin === this.getVinFromStore();
|
||||
},
|
||||
MatchedDifferentVehicleAlertHeader(){
|
||||
let text = this.getCmsContent("MatchedDifferentVehicle",
|
||||
const text = this.getCmsContent("MatchedDifferentVehicle",
|
||||
"HeadlineText").replaceAll("{custom:damage}", getDamageString());
|
||||
|
||||
return text;
|
||||
},
|
||||
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}",
|
||||
this.customAlertData?.vehicleInfo?.model);
|
||||
|
||||
return text;
|
||||
},
|
||||
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;
|
||||
},
|
||||
|
|
@ -288,7 +269,7 @@ export default {
|
|||
this.isVinValid = true;
|
||||
this.isSelectedGlassAvailableForVehicle = await isGlassAvailableForCarId(vehicleLookup.data.carId);
|
||||
this.$refs.funnelFooter.removeLoader();
|
||||
this.matchedDifferentVehicle = true;
|
||||
this.isCarIdDifferent = true;
|
||||
return;
|
||||
}
|
||||
this.updateStore(vehicleLookup.data);
|
||||
|
|
|
|||
|
|
@ -114,19 +114,11 @@ const routingTable = [
|
|||
maps: [
|
||||
{
|
||||
scenario: navigationScenarios.CLICKED_BACK,
|
||||
destinationFmgPageValue: fmgPageValues.REVEAL,
|
||||
},
|
||||
{
|
||||
scenario: navigationScenarios.CLICKED_BACK_WITH_VIN,
|
||||
destinationFmgPageValue: fmgPageValues.VEHICLE_DAMAGE,
|
||||
},
|
||||
{
|
||||
scenario: navigationScenarios.VIN_LOOKUP,
|
||||
destinationFmgPageValue: fmgPageValues.PART_QUESTIONS,
|
||||
destinationFmgPageValue: fmgPageValues.ESTIMATE,
|
||||
},
|
||||
{
|
||||
scenario: navigationScenarios.CLICKED_FORWARD,
|
||||
destinationFmgPageValue: fmgPageValues.ESTIMATE,
|
||||
destinationFmgPageValue: fmgPageValues.VEHICLE_DAMAGE,
|
||||
}
|
||||
],
|
||||
},
|
||||
|
|
@ -169,9 +161,9 @@ const routingTable = [
|
|||
{
|
||||
scenario: navigationScenarios.CLICKED_FORWARD,
|
||||
destinationFmgPageValue: fmgPageValues.VEHICLE_DAMAGE,
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
},
|
||||
];
|
||||
|
||||
export { routingTable };
|
||||
|
|
|
|||
|
|
@ -145,16 +145,16 @@ export const mutations = {
|
|||
state.order.vehicle.registration.address = registrationAddress;
|
||||
},
|
||||
updateServiceLocationZip(state, serviceLocationZip){
|
||||
state.order.serviceLocation.zip = serviceLocationZip;
|
||||
state.order.vehicle.registration.zip = serviceLocationZip;
|
||||
},
|
||||
updateRegistrationCity(state, serviceCity){
|
||||
state.order.serviceLocation.city = serviceCity;
|
||||
state.order.vehicle.registration.city = serviceCity;
|
||||
},
|
||||
updateRegistrationFirstName(state, firstName){
|
||||
state.order.serviceLocation.firstName = firstName;
|
||||
state.order.vehicle.registration.firstName = firstName;
|
||||
},
|
||||
updateRegistrationLastName(state, lastName){
|
||||
state.order.serviceLocation.lastName = lastName;
|
||||
state.order.vehicle.registration.lastName = lastName;
|
||||
},
|
||||
updateCustomerEmailAddress(state, customerEmailAddress){
|
||||
state.order.customer.emailAddress = customerEmailAddress;
|
||||
|
|
|
|||
Loading…
Reference in a new issue