CSR-749 save-session additional data
This commit is contained in:
parent
ac528a861d
commit
610031f324
2 changed files with 58 additions and 42 deletions
|
|
@ -186,7 +186,6 @@ export default {
|
|||
async forwardButtonAction() {
|
||||
if (this.isRepair){
|
||||
const zipCodeData = await this.getZipCodeData(this.serviceZipCode);
|
||||
//todo: validation
|
||||
await this.dispatchStoreAction(storeActions.SAVE_EMAIL, this.emailAddress, false);
|
||||
await this.dispatchStoreAction(storeActions.SAVE_SERVICE_LOCATION, {
|
||||
zipCode: this.serviceZipCode,
|
||||
|
|
|
|||
|
|
@ -805,48 +805,65 @@ export const actions = {
|
|||
method: endpoints.SaveSession.method,
|
||||
endpoint: endpoints.SaveSession.url,
|
||||
payload: {
|
||||
vehicle: {
|
||||
carId: vehicle.carId,
|
||||
year: vehicle.year,
|
||||
make: vehicle.make,
|
||||
model: vehicle.model,
|
||||
style: vehicle.style,
|
||||
vin: vehicle.vin,
|
||||
registration: {
|
||||
firstName: vehicle.registration.firstName,
|
||||
lastName: vehicle.registration.lastName,
|
||||
streetAddress: vehicle.registration.address,
|
||||
city: vehicle.registration.city,
|
||||
state: vehicle.registration.state,
|
||||
zipCode: vehicle.registration.zipCode,
|
||||
licensePlateNumber: vehicle.registration.licensePlate,
|
||||
applicationUser: {
|
||||
crmCustomerId: applicationUser.crmCustomerId,
|
||||
experiments: applicationUser.experiments,
|
||||
lastPage: applicationUser.lastPageVisited,
|
||||
pageData: applicationUser.pageData,
|
||||
savedSessionId: applicationUser.savedSessionId,
|
||||
},
|
||||
order: {
|
||||
vehicle: {
|
||||
carId: vehicle.carId,
|
||||
year: vehicle.year,
|
||||
make: vehicle.make,
|
||||
model: vehicle.model,
|
||||
style: vehicle.style,
|
||||
vin: vehicle.vin,
|
||||
registration: {
|
||||
firstName: vehicle.registration.firstName,
|
||||
lastName: vehicle.registration.lastName,
|
||||
streetAddress: vehicle.registration.address,
|
||||
city: vehicle.registration.city,
|
||||
state: vehicle.registration.state,
|
||||
zipCode: vehicle.registration.zipCode,
|
||||
licensePlateNumber: vehicle.registration.licensePlate,
|
||||
},
|
||||
},
|
||||
},
|
||||
damage: {
|
||||
numberOfChips: damage.numberOfChips,
|
||||
glassToReplace: damage.glassToReplace,
|
||||
isRepair: damage.isRepair
|
||||
},
|
||||
customer: {
|
||||
emailAddress: order.customer.emailAddress,
|
||||
},
|
||||
lineItems: {
|
||||
glassParts: lineItems.glassParts
|
||||
},
|
||||
serviceLocation: {
|
||||
streetAddress: order.serviceLocation.address,
|
||||
city: order.serviceLocation.city,
|
||||
state: order.serviceLocation.state,
|
||||
zipCode: order.serviceLocation.zipCode
|
||||
},
|
||||
referralNumber: order.referralNumber?.toString(), // TODO It'd be nice to save these as strings in the first place
|
||||
referralDate: order.referralDate,
|
||||
accountNumber: order.accountNumber?.toString(),
|
||||
existingPromoCode: null,
|
||||
lastPage: applicationUser.lastPageVisited,
|
||||
crmCustomerId: applicationUser.crmCustomerId,
|
||||
savedSessionId: applicationUser.savedSessionId,
|
||||
experiments: applicationUser.experiments,
|
||||
customer: {
|
||||
emailAddress: order.customer.emailAddress,
|
||||
},
|
||||
damage: {
|
||||
numberOfChips: damage.numberOfChips,
|
||||
glassToReplace: damage.glassToReplace,
|
||||
isRepair: damage.isRepair,
|
||||
partQuestionAnswers: order.damage.partQuestionAnswers,
|
||||
moldingQuestionAnswers: order.damage.moldingQuestionAnswers,
|
||||
capabilityQuestionAnswers: order.damage.capabilityQuestionAnswers
|
||||
},
|
||||
lineItems: {
|
||||
glassParts: lineItems.glassParts
|
||||
},
|
||||
payment: {
|
||||
InsuranceCoverage: {
|
||||
isVerified: order.payment.insuranceCoverage.isVerified ?? false
|
||||
},
|
||||
isInsurance: order.payment.isInsurance ?? false
|
||||
},
|
||||
accountNumber: order.accountNumber?.toString(),
|
||||
providerNumber: "",
|
||||
serviceLocation: {
|
||||
streetAddress: order.serviceLocation.address,
|
||||
city: order.serviceLocation.city,
|
||||
state: order.serviceLocation.state,
|
||||
zipCode: order.serviceLocation.zipCode
|
||||
},
|
||||
existingPromoCode: null,
|
||||
referralCorrelationId: order.referralCorrelationId,
|
||||
referralDate: order.referralDate,
|
||||
referralNumber: order.referralNumber?.toString(), // TODO It'd be nice to save these as strings in the first place
|
||||
referralSequenceNumber: order.referralNumber?.toString(), // TODO Pass the referralSequence number once insurance flow creates it
|
||||
}
|
||||
},
|
||||
});
|
||||
},
|
||||
|
|
|
|||
Loading…
Reference in a new issue