change where zip is pulled for getParts method

This commit is contained in:
Kroell 2023-02-18 12:36:31 -05:00
parent d7aee3e3a9
commit 366d60685a

View file

@ -362,7 +362,7 @@ export const useMainStore = defineStore({
const carId = vehicle.carId;
const glassArray = damage.glassToReplace;
const resultsArray = damage.partQuestionAnswers;
const zipCode = order.serviceLocation.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