readonly logic
This commit is contained in:
parent
d25ac707b3
commit
8b25907bd9
3 changed files with 11 additions and 7 deletions
|
|
@ -23,10 +23,9 @@ export async function getPageToRouteExistingOrderTo(toRoute = {}, existingHerita
|
||||||
return await getLatestPageForRedirection();
|
return await getLatestPageForRedirection();
|
||||||
}
|
}
|
||||||
|
|
||||||
console.log(isVinRelatedPage(toRoute));
|
|
||||||
// If navigating to a specific page, and that page is not part of the vin pages.
|
// If navigating to a specific page, and that page is not part of the vin pages.
|
||||||
// Return that page, so that it can navigate like normal.
|
// Return that page, so that it can navigate like normal.
|
||||||
if (isVinRelatedPage(toRoute) === false || toRoute.query[queryStrings.FMG_PAGE] === undefined) {
|
if (toRoute.query[queryStrings.FMG_PAGE] !== undefined && !isVinRelatedPage(toRoute)) {
|
||||||
return overrideYmmsDirectionIfNeeded(toRoute, toRoute.query[queryStrings.FMG_PAGE]);
|
return overrideYmmsDirectionIfNeeded(toRoute, toRoute.query[queryStrings.FMG_PAGE]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -80,6 +79,7 @@ async function getLatestPageForRedirection() {
|
||||||
return fmgPageValues.VEHICLE_DAMAGE;
|
return fmgPageValues.VEHICLE_DAMAGE;
|
||||||
} else {
|
} else {
|
||||||
if (store.getters.vehicle.vin) {
|
if (store.getters.vehicle.vin) {
|
||||||
|
console.log("here");
|
||||||
return fmgPageValues.VIN_LOOKUP;
|
return fmgPageValues.VIN_LOOKUP;
|
||||||
} else {
|
} else {
|
||||||
return fmgPageValues.ESTIMATE;
|
return fmgPageValues.ESTIMATE;
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,7 @@
|
||||||
<funnelSubHeader cmsWidgetName="FunnelSubHeaderWidget" />
|
<funnelSubHeader cmsWidgetName="FunnelSubHeaderWidget" />
|
||||||
<div class="row my-2">
|
<div class="row my-2">
|
||||||
<div class="col">
|
<div class="col">
|
||||||
<textboxQuestion cmsWidgetName="VinNumber" v-model="vin" inputId="vin" disableAutoFill validationRules="vin-required|vin-format" />
|
<textboxQuestion cmsWidgetName="VinNumber" v-model="vin" inputId="vin" disableAutoFill validationRules="vin-required|vin-format" :isDisabled=isVinFieldReadOnly />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="row my-2">
|
<div class="row my-2">
|
||||||
|
|
@ -177,9 +177,7 @@ export default {
|
||||||
store.dispatch(storeActions.RESET_PARTS_STATE_AND_DEPENDENCIES);
|
store.dispatch(storeActions.RESET_PARTS_STATE_AND_DEPENDENCIES);
|
||||||
},
|
},
|
||||||
backButtonAction() {
|
backButtonAction() {
|
||||||
if(this.$store.getters.vehicle.vin){
|
this.$router.navigate(this.navigationScenarios.CLICKED_BACK, this.$route);
|
||||||
this.$router.navigate(this.navigationScenarios.CLICKED_BACK_WITH_VIN, this.$route);
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
async forwardButtonAction() {
|
async forwardButtonAction() {
|
||||||
const zipValidation = await this.validateZip(this.zip);
|
const zipValidation = await this.validateZip(this.zip);
|
||||||
|
|
@ -255,6 +253,11 @@ export default {
|
||||||
store.commit(storeMutations.UPDATE_CUSTOMER_EMAIL_ADDRESS, this.email);
|
store.commit(storeMutations.UPDATE_CUSTOMER_EMAIL_ADDRESS, this.email);
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
computed: {
|
||||||
|
isVinFieldReadOnly(){
|
||||||
|
return this.$store.getters.payment.insuranceCoverage.isVerified;
|
||||||
|
}
|
||||||
|
},
|
||||||
components: {
|
components: {
|
||||||
Form,
|
Form,
|
||||||
funnelHeader,
|
funnelHeader,
|
||||||
|
|
|
||||||
|
|
@ -194,11 +194,12 @@ export const mutations = {
|
||||||
make: orderInformation.vehicle?.make,
|
make: orderInformation.vehicle?.make,
|
||||||
model: orderInformation.vehicle?.model,
|
model: orderInformation.vehicle?.model,
|
||||||
style: orderInformation.vehicle?.style,
|
style: orderInformation.vehicle?.style,
|
||||||
|
vin: orderInformation.vehicle?.vin,
|
||||||
carId: orderInformation.vehicle?.carId,
|
carId: orderInformation.vehicle?.carId,
|
||||||
category: orderInformation.vehicle?.category,
|
category: orderInformation.vehicle?.category,
|
||||||
imageUrl: orderInformation.vehicle?.imageUrl,
|
imageUrl: orderInformation.vehicle?.imageUrl,
|
||||||
imageVifNumber: orderInformation.vehicle?.imageVifNumber,
|
imageVifNumber: orderInformation.vehicle?.imageVifNumber,
|
||||||
imageColor: orderInformation.vehicle?.imageVifColor
|
imageColor: orderInformation.vehicle?.imageVifColor,
|
||||||
});
|
});
|
||||||
|
|
||||||
state.order.damage.glassToReplace = orderInformation.glassToReplace;
|
state.order.damage.glassToReplace = orderInformation.glassToReplace;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue