diff --git a/src/store/index.js b/src/store/index.js index 25af8c097..0417aee8c 100644 --- a/src/store/index.js +++ b/src/store/index.js @@ -229,22 +229,29 @@ export const mutations = { imageVifNumber: orderInformation.vehicle?.imageVifNumber, imageColor: orderInformation.vehicle?.imageVifColor, registration: { - zipCode: orderInformation.zipCode // TODO CSR-416 make sure customer vs service is different + firstName: orderInformation.vehicle.registration.firstName, + lastName: orderInformation.vehicle.registration.lastName, + address: orderInformation.vehicle.registration.streetAddress, + city: orderInformation.vehicle.registration.city, + state: orderInformation.vehicle.registration.state, + zipCode: orderInformation.vehicle.registration.zipCode, // TODO CSR-416 make sure customer vs service is different + licensePlate: null, } }); - state.order.damage.glassToReplace = orderInformation.glassToReplace; - state.order.damage.isRepair = orderInformation.isRepair; - state.order.damage.numberOfChips = orderInformation.numberOfChips; + state.order.damage.glassToReplace = orderInformation.damage.glassToReplace; + state.order.damage.isRepair = orderInformation.damage.isRepair; + state.order.damage.numberOfChips = orderInformation.damage.numberOfChips; state.order.lineItems.glassParts = orderInformation.parts; state.order.accountNumber = orderInformation.accountNumber; - state.order.serviceLocation.zip = orderInformation.zipCode; // TODO CSR-416 make sure customer vs service is different + state.order.serviceLocation.zip = orderInformation.zipCode; // TODO CSR-416 make sure customer vs service is different, add this to service state.order.payment.isInsurance = orderInformation.IsInsuranceOrder; state.order.payment.insuranceCoverage.isVerified = orderInformation?.insuranceInfo.coverageVerified; - state.order.customer.emailAddress = orderInformation.emailAddress + state.order.customer.emailAddress = orderInformation.customer.emailAddress + } } @@ -510,6 +517,8 @@ export const actions = { const damage = context.getters.damage; const order = context.state.order; + console.log(context) + return globalMethods.callHttpClient({ method: endpoints.SaveOrder.method, endpoint: endpoints.SaveOrder.url, @@ -537,7 +546,7 @@ export const actions = { emailAddress: order.customer.emailAddress, }, serviceLocation: { - zipCode: order.serviceLocation.zip + zipCode: order.serviceLocation.zipCode }, referralNumber: order.referralNumber, referralDate: order.referralDate,