vin-lookup couldn't rely on registration zip, updated logic to pull from either registration or customer depending on which was available.

This commit is contained in:
Jason Wheeler 2023-02-06 13:41:06 -05:00
parent 96476aa44a
commit acbbbfe661
2 changed files with 2 additions and 1 deletions

View file

@ -197,6 +197,7 @@ export default {
registrationInfo: {
licensePlate: this.licensePlate,
state: this.licenseState,
zipCode: useMainStore().vehicle.registration.zipCode,
},
},
false

View file

@ -329,7 +329,7 @@ export const useMainStore = defineStore({
const carId = vehicle.carId;
const glassArray = damage.glassToReplace;
const zipCode = order.customer.zipCode;
const zipCode = vehicle.registration.zipCode ? vehicle.registration.zipCode : order.customer.address.zipCode;
const vin = vehicle.vin;
// create a new array to avoid mutating state