remove old alert, bailout with non-serviceable vehicle
This commit is contained in:
parent
cd4cf33db5
commit
5a13165d09
1 changed files with 6 additions and 13 deletions
|
|
@ -13,13 +13,6 @@
|
||||||
<siteSubHeader
|
<siteSubHeader
|
||||||
cmsWidgetName="SiteSubHeaderWidget"
|
cmsWidgetName="SiteSubHeaderWidget"
|
||||||
class="mt-4" />
|
class="mt-4" />
|
||||||
<alert
|
|
||||||
v-if="displayNoServiceAlert"
|
|
||||||
ref="AlertNoService"
|
|
||||||
class="mt-5"
|
|
||||||
cmsWidgetName="AlertVehicleSelection"
|
|
||||||
alertClass="alert-danger"
|
|
||||||
:isDismissable="false" />
|
|
||||||
<addressVehiclesQuestion
|
<addressVehiclesQuestion
|
||||||
ref="addressVehiclesQuestion"
|
ref="addressVehiclesQuestion"
|
||||||
v-model="selectedVehicleVin"
|
v-model="selectedVehicleVin"
|
||||||
|
|
@ -147,8 +140,7 @@ export default {
|
||||||
displayMatchedDifferentVehicleAlert: false,
|
displayMatchedDifferentVehicleAlert: false,
|
||||||
displayMatchedTwoIdenticalYMMVehicleAlert: false,
|
displayMatchedTwoIdenticalYMMVehicleAlert: false,
|
||||||
previouslyEnteredCarId: '',
|
previouslyEnteredCarId: '',
|
||||||
forwardButtonCarStyle: '',
|
forwardButtonCarStyle: ''
|
||||||
displayNoServiceAlert: false
|
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
|
|
@ -203,10 +195,6 @@ export default {
|
||||||
selectedVehicleVin: {
|
selectedVehicleVin: {
|
||||||
handler() {
|
handler() {
|
||||||
this.resetWarningsAndErrors();
|
this.resetWarningsAndErrors();
|
||||||
if (!this.selectedVehicle?.vehicle.canSafeliteService) {
|
|
||||||
this.displayNoServiceAlert = true;
|
|
||||||
return this.$refs.siteFooter.disableForwardButton();
|
|
||||||
}
|
|
||||||
// does this vehicle match the previously selected carId?
|
// does this vehicle match the previously selected carId?
|
||||||
this.isCarIdDifferent =
|
this.isCarIdDifferent =
|
||||||
this.selectedVehicle?.vehicle.carId
|
this.selectedVehicle?.vehicle.carId
|
||||||
|
|
@ -242,10 +230,15 @@ export default {
|
||||||
return false;
|
return false;
|
||||||
},
|
},
|
||||||
async forwardButtonAction() {
|
async forwardButtonAction() {
|
||||||
|
this.mainStore.resetBailout();
|
||||||
const vinLookup = await useMainStore().lookupVehicleByVin(this.selectedVehicle.vin);
|
const vinLookup = await useMainStore().lookupVehicleByVin(this.selectedVehicle.vin);
|
||||||
if (!vinLookup) {
|
if (!vinLookup) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
if (!vinLookup.data?.canSafeliteService) {
|
||||||
|
this.mainStore.setBailout(bailoutMessage.HeavyTruckVehicle(carFound.carId));
|
||||||
|
return this.navigateForward();
|
||||||
|
}
|
||||||
this.isSelectedGlassAvailableForVehicle = await isGlassAvailableForCarId(vinLookup.data.carId);
|
this.isSelectedGlassAvailableForVehicle = await isGlassAvailableForCarId(vinLookup.data.carId);
|
||||||
await useMainStore().saveVin(
|
await useMainStore().saveVin(
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue