Happy path vin-lookup loader update
This commit is contained in:
parent
19c34ac240
commit
8ee87b3a8f
1 changed files with 6 additions and 6 deletions
|
|
@ -28,6 +28,7 @@
|
|||
ref="siteFooter"
|
||||
cmsWidgetName="SiteFooterWidget"
|
||||
:isForwardActionDisabled="!meta.valid"
|
||||
:isForwardButtonNavigavtionDisabled="isForwardNavigationDisabled"
|
||||
class="mt-5"
|
||||
@backClicked="navigateBack"
|
||||
@forwardClicked="forwardButtonAction" />
|
||||
|
|
@ -117,6 +118,9 @@ export default {
|
|||
};
|
||||
},
|
||||
computed: {
|
||||
isForwardNavigationDisabled() {
|
||||
return this.needToLookupVehicle;
|
||||
},
|
||||
isCarIdDifferentFromTheStore() {
|
||||
return (
|
||||
this.vehicleFromLookup !== null
|
||||
|
|
@ -136,8 +140,7 @@ export default {
|
|||
// TODO: Side effects in computed.
|
||||
if (this.vinPopulatedOnPageLoad) {
|
||||
// TODO: Modify to remove side effects in computed
|
||||
this.activeVehicleLookupAlertType =
|
||||
vehicleLookupAlertTypes.PERFECT_MATCH;
|
||||
this.activeVehicleLookupAlertType = vehicleLookupAlertTypes.PERFECT_MATCH;
|
||||
this.needToLookupVehicle = false;
|
||||
const lastSixChars = this.vin.substring(11, this.vin.length);
|
||||
return `!X!X!X!X!X!X!X!X!X!X!X${lastSixChars}`;
|
||||
|
|
@ -228,10 +231,7 @@ export default {
|
|||
}
|
||||
|
||||
// navigate back to vehicle-damage
|
||||
if (
|
||||
this.isCarIdDifferentFromTheStore
|
||||
&& !isSelectedGlassAvailableForVehicle
|
||||
) {
|
||||
if (this.isCarIdDifferentFromTheStore && !isSelectedGlassAvailableForVehicle) {
|
||||
this.mainStore.updateVehicle(this.vehicleFromLookup);
|
||||
this.mainStore.resetDamageState();
|
||||
this.$router.navigate(
|
||||
|
|
|
|||
Loading…
Reference in a new issue