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