set canSafeliteService

This commit is contained in:
Katie Kroell 2025-09-08 10:39:08 -04:00
parent f0413c2a90
commit 8dcca6951d

View file

@ -90,7 +90,8 @@ export const getDefaultState = () => ({
firstName: null, firstName: null,
lastName: null lastName: null
}, },
isBigTruck: null isBigTruck: null,
canSafeliteService: null
}, },
damage: { damage: {
isRepair: null, isRepair: null,
@ -1018,7 +1019,6 @@ export const useMainStore = defineStore({
const windshieldPartWithRecal = partsWithRecal?.length > 0 ? partsWithRecal[0] : null; const windshieldPartWithRecal = partsWithRecal?.length > 0 ? partsWithRecal[0] : null;
const safeliteOnly = true; const safeliteOnly = true;
const shopRadiusInMiles = 100; const shopRadiusInMiles = 100;
const isHeavyTruck = this.order.vehicle.isBigTruck;
let url = `${endpoints.GetProviders.url}/${serviceZipCode}/${damageType}/${shopRadiusInMiles}/${parentAccountNumber}/${safeliteOnly}/${carId}`; let url = `${endpoints.GetProviders.url}/${serviceZipCode}/${damageType}/${shopRadiusInMiles}/${parentAccountNumber}/${safeliteOnly}/${carId}`;
if (windshieldPartWithRecal) { if (windshieldPartWithRecal) {
@ -1343,7 +1343,7 @@ export const useMainStore = defineStore({
}); });
}, },
setVehicle() { async setVehicle() {
const encodedMake = encodeURIComponent(this.order.vehicle.make); const encodedMake = encodeURIComponent(this.order.vehicle.make);
const encodedModel = encodeURIComponent(this.order.vehicle.model); const encodedModel = encodeURIComponent(this.order.vehicle.model);
return globalMethods return globalMethods
@ -1988,12 +1988,13 @@ export const useMainStore = defineStore({
this.order.vehicle.imageVifNumber = vehicle.imageVifNumber; this.order.vehicle.imageVifNumber = vehicle.imageVifNumber;
this.order.vehicle.imageColor = vehicle.imageVifColor; this.order.vehicle.imageColor = vehicle.imageVifColor;
this.order.vehicle.isBigTruck = vehicle.isBigTruck; this.order.vehicle.isBigTruck = vehicle.isBigTruck;
this.order.vehicle.canSafeliteService = vehicle.canSafeliteService;
if (vehicle.canSafeliteService !== undefined && !vehicle.canSafeliteService) { // if (vehicle.canSafeliteService !== undefined && !vehicle.canSafeliteService) {
this.setBailout(bailoutMessage.HeavyTruckVehicle(vehicle.carId)); // this.setBailout(bailoutMessage.HeavyTruckVehicle(vehicle.carId));
} else if (this.isBailout && this.bailoutCode === bailoutCode.HeavyTruckVehicle) { // } else if (this.isBailout && this.bailoutCode === bailoutCode.HeavyTruckVehicle) {
this.resetBailout(); // this.resetBailout();
} // }
this.updateSupportingItems(null); this.updateSupportingItems(null);
this.updateVaps(null); this.updateVaps(null);
@ -2119,6 +2120,7 @@ export const useMainStore = defineStore({
this.order.vehicle.registration.firstName = null; this.order.vehicle.registration.firstName = null;
this.order.vehicle.registration.lastName = null; this.order.vehicle.registration.lastName = null;
this.order.vehicle.isBigTruck = null; this.order.vehicle.isBigTruck = null;
this.order.vehicle.canSafeliteService = null;
if (this.isBailout && this.bailoutCode === bailoutCode.HeavyTruckVehicle) { if (this.isBailout && this.bailoutCode === bailoutCode.HeavyTruckVehicle) {
this.resetBailout(); this.resetBailout();