Merge pull request #1141 from Safelite/feature/kroell/big-truck-bailout-defect

big truck bailout defects
This commit is contained in:
katiekroell 2026-03-17 09:54:43 -04:00 committed by GitHub
commit f2e43565c4
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 17 additions and 16 deletions

View file

@ -215,6 +215,7 @@ export default {
async forwardButtonAction() {
this.resetWarningsAndErrors();
useMainStore().resetBailout();
// Vehicle info change in the flow, use a variable to keep track and commit to state at the end.
let vehicleInfoToCommit = {};
@ -361,7 +362,6 @@ export default {
this.displayVinNotFoundAlert = false;
this.displayMatchedDifferentVehicleAlert = false;
this.displayVinLookupByHomeAddressNotAllowedAlert = false;
this.displayNoServiceAlert = false;
this.$refs.siteFooter.enableForwardAction();
}
}

View file

@ -144,7 +144,8 @@ describe('address-vehicles.vue', () => {
const { wrapper } = setupMocks({});
const lookupVinResponse = {
data: {
carId: '456'
carId: '456',
canSafeliteService: true
}
};

View file

@ -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"
@ -91,6 +84,7 @@ import {
} from '@/helpers/cms-content-helper.js';
import routerParams from '@/router/router-constants/router-params';
import vinPagesMixin from '@/mixins/vin-pages-mixin';
import bailoutMessage from '@/constants/bailoutMessage';
// Import Component
import baseFormMixin from '@/mixins/base-form-mixin';
@ -147,8 +141,7 @@ export default {
displayMatchedDifferentVehicleAlert: false,
displayMatchedTwoIdenticalYMMVehicleAlert: false,
previouslyEnteredCarId: '',
forwardButtonCarStyle: '',
displayNoServiceAlert: false
forwardButtonCarStyle: ''
};
},
computed: {
@ -203,10 +196,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 +231,19 @@ export default {
return false;
},
async forwardButtonAction() {
this.mainStore.resetBailout();
const vinLookup = await useMainStore().lookupVehicleByVin(this.selectedVehicle.vin);
if (!vinLookup) {
return;
}
if (vinLookup.data?.canSafeliteService === false) {
this.mainStore.setBailout(bailoutMessage.HeavyTruckVehicle(vinLookup.data.carId));
this.$router.navigate(
this.navigationScenarios.BAILOUT,
this.$route
);
return;
}
this.isSelectedGlassAvailableForVehicle = await isGlassAvailableForCarId(vinLookup.data.carId);
await useMainStore().saveVin(
{

View file

@ -239,6 +239,7 @@ export default {
// NOTE: If form is not valid, this method is not called when 'Continue' button is clicked
async forwardButtonAction() {
this.resetWarningsAndErrors();
this.mainStore.resetBailout();
// Lookup VIN
const vinLookupResponse = await useMainStore().lookupVinByPlate(

View file

@ -170,6 +170,7 @@ export default {
// NOTE: If form is not valid, this method is not called when 'Continue' button is clicked
async forwardButtonAction() {
this.resetActiveAlert();
this.mainStore.resetBailout();
// Temp solution to reset the 'disabled' style on the Continue button
this.$refs.siteFooter.enableForwardAction();
showIssLoadingModal(true);
@ -182,7 +183,7 @@ export default {
this.mainStore.setBailout(bailoutMessage.HeavyTruckVehicle(vehicleLookupResponse.data.carId));
this.resetVehicleFromLookup();
showIssLoadingModal(false);
return;
return this.navigateForward();
}
// Add vin bcs the response from the service doesn't contain vin