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

View file

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

View file

@ -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"
@ -91,6 +84,7 @@ import {
} from '@/helpers/cms-content-helper.js'; } from '@/helpers/cms-content-helper.js';
import routerParams from '@/router/router-constants/router-params'; import routerParams from '@/router/router-constants/router-params';
import vinPagesMixin from '@/mixins/vin-pages-mixin'; import vinPagesMixin from '@/mixins/vin-pages-mixin';
import bailoutMessage from '@/constants/bailoutMessage';
// Import Component // Import Component
import baseFormMixin from '@/mixins/base-form-mixin'; import baseFormMixin from '@/mixins/base-form-mixin';
@ -147,8 +141,7 @@ export default {
displayMatchedDifferentVehicleAlert: false, displayMatchedDifferentVehicleAlert: false,
displayMatchedTwoIdenticalYMMVehicleAlert: false, displayMatchedTwoIdenticalYMMVehicleAlert: false,
previouslyEnteredCarId: '', previouslyEnteredCarId: '',
forwardButtonCarStyle: '', forwardButtonCarStyle: ''
displayNoServiceAlert: false
}; };
}, },
computed: { computed: {
@ -203,10 +196,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 +231,19 @@ 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 === 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); this.isSelectedGlassAvailableForVehicle = await isGlassAvailableForCarId(vinLookup.data.carId);
await useMainStore().saveVin( 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 // NOTE: If form is not valid, this method is not called when 'Continue' button is clicked
async forwardButtonAction() { async forwardButtonAction() {
this.resetWarningsAndErrors(); this.resetWarningsAndErrors();
this.mainStore.resetBailout();
// Lookup VIN // Lookup VIN
const vinLookupResponse = await useMainStore().lookupVinByPlate( 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 // NOTE: If form is not valid, this method is not called when 'Continue' button is clicked
async forwardButtonAction() { async forwardButtonAction() {
this.resetActiveAlert(); this.resetActiveAlert();
this.mainStore.resetBailout();
// Temp solution to reset the 'disabled' style on the Continue button // Temp solution to reset the 'disabled' style on the Continue button
this.$refs.siteFooter.enableForwardAction(); this.$refs.siteFooter.enableForwardAction();
showIssLoadingModal(true); showIssLoadingModal(true);
@ -182,7 +183,7 @@ export default {
this.mainStore.setBailout(bailoutMessage.HeavyTruckVehicle(vehicleLookupResponse.data.carId)); this.mainStore.setBailout(bailoutMessage.HeavyTruckVehicle(vehicleLookupResponse.data.carId));
this.resetVehicleFromLookup(); this.resetVehicleFromLookup();
showIssLoadingModal(false); showIssLoadingModal(false);
return; return this.navigateForward();
} }
// Add vin bcs the response from the service doesn't contain vin // Add vin bcs the response from the service doesn't contain vin