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();
|
||||
}
|
||||
|
||||
console.log(isVinRelatedPage(toRoute));
|
||||
// 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.
|
||||
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]);
|
||||
}
|
||||
|
||||
|
|
@ -80,6 +79,7 @@ async function getLatestPageForRedirection() {
|
|||
return fmgPageValues.VEHICLE_DAMAGE;
|
||||
} else {
|
||||
if (store.getters.vehicle.vin) {
|
||||
console.log("here");
|
||||
return fmgPageValues.VIN_LOOKUP;
|
||||
} else {
|
||||
return fmgPageValues.ESTIMATE;
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@
|
|||
<funnelSubHeader cmsWidgetName="FunnelSubHeaderWidget" />
|
||||
<div class="row my-2">
|
||||
<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 class="row my-2">
|
||||
|
|
@ -177,9 +177,7 @@ export default {
|
|||
store.dispatch(storeActions.RESET_PARTS_STATE_AND_DEPENDENCIES);
|
||||
},
|
||||
backButtonAction() {
|
||||
if(this.$store.getters.vehicle.vin){
|
||||
this.$router.navigate(this.navigationScenarios.CLICKED_BACK_WITH_VIN, this.$route);
|
||||
}
|
||||
this.$router.navigate(this.navigationScenarios.CLICKED_BACK, this.$route);
|
||||
},
|
||||
async forwardButtonAction() {
|
||||
const zipValidation = await this.validateZip(this.zip);
|
||||
|
|
@ -255,6 +253,11 @@ export default {
|
|||
store.commit(storeMutations.UPDATE_CUSTOMER_EMAIL_ADDRESS, this.email);
|
||||
},
|
||||
},
|
||||
computed: {
|
||||
isVinFieldReadOnly(){
|
||||
return this.$store.getters.payment.insuranceCoverage.isVerified;
|
||||
}
|
||||
},
|
||||
components: {
|
||||
Form,
|
||||
funnelHeader,
|
||||
|
|
|
|||
|
|
@ -194,11 +194,12 @@ export const mutations = {
|
|||
make: orderInformation.vehicle?.make,
|
||||
model: orderInformation.vehicle?.model,
|
||||
style: orderInformation.vehicle?.style,
|
||||
vin: orderInformation.vehicle?.vin,
|
||||
carId: orderInformation.vehicle?.carId,
|
||||
category: orderInformation.vehicle?.category,
|
||||
imageUrl: orderInformation.vehicle?.imageUrl,
|
||||
imageVifNumber: orderInformation.vehicle?.imageVifNumber,
|
||||
imageColor: orderInformation.vehicle?.imageVifColor
|
||||
imageColor: orderInformation.vehicle?.imageVifColor,
|
||||
});
|
||||
|
||||
state.order.damage.glassToReplace = orderInformation.glassToReplace;
|
||||
|
|
|
|||
Loading…
Reference in a new issue