Merge branch 'develop' into feature/CSR-1381

This commit is contained in:
Leah Schumann 2023-08-04 07:58:53 -04:00
commit e546875f14
3 changed files with 16 additions and 22 deletions

View file

@ -51,7 +51,7 @@ describe("schedule.vue", () => {
const { wrapper } = setupMocks({
customMountOptions: {
router: {
navigateWithoutSaving: jest.fn(),
navigateWithSaving: jest.fn(),
},
route: { schedule },
},
@ -67,7 +67,7 @@ describe("schedule.vue", () => {
await wrapper.vm.forwardButtonAction();
//Assert
expect(wrapper.vm.$router.navigateWithoutSaving).toHaveBeenCalled();
expect(wrapper.vm.$router.navigateWithSaving).toHaveBeenCalled();
});
test("should pass arePagePrerequisitesValid with a mobile order and no providerNumber", () => {
//Arrange

View file

@ -402,11 +402,7 @@ export default {
this.updateSupportingItems();
this.dispatchStoreAction(this.storeActions.SAVE_SCHEDULE, this.selectedTimeSlot, false);
//Temporary, still need to determine what needs to be saved before continuing.
this.$router.navigateWithoutSaving(
this.navigationScenarios.CLICKED_FORWARD,
this.$route
);
this.$router.navigateWithSaving(this.navigationScenarios.CLICKED_FORWARD, this.$route);
},
updateSupportingItems() {
const supportingItems = this.getSupportingItems();

View file

@ -244,12 +244,8 @@ export const mutations = {
},
updateRegistration(state, registrationInfo) {
state.order.vehicle.registration.licensePlate = registrationInfo?.licensePlate;
state.order.vehicle.registration.address = registrationInfo?.address;
state.order.vehicle.registration.city = registrationInfo?.city;
state.order.vehicle.registration.state = registrationInfo?.state;
state.order.vehicle.registration.zipCode = registrationInfo?.zipCode;
state.order.vehicle.registration.firstName = registrationInfo?.firstName;
state.order.vehicle.registration.lastName = registrationInfo?.lastName;
state.order.customer.firstName = registrationInfo?.firstName;
state.order.customer.lastName = registrationInfo?.lastName;
},
updateServiceZip(state, serviceZipInfo) {
state.order.serviceLocation.state = serviceZipInfo.state;
@ -437,15 +433,6 @@ export const mutations = {
imageUrl: sessionInformation.order.vehicle?.imageUrl,
imageVifNumber: sessionInformation.order.vehicle?.imageVifNumber,
imageColor: sessionInformation.order.vehicle?.imageVifColor,
registration: {
firstName: sessionInformation.order.vehicle.registration.firstName,
lastName: sessionInformation.order.vehicle.registration.lastName,
address: sessionInformation.order.vehicle.registration.streetAddress,
city: sessionInformation.order.vehicle.registration.city,
state: sessionInformation.order.vehicle.registration.state,
zipCode: sessionInformation.order.vehicle.registration.zipCode,
licensePlate: sessionInformation.order.vehicle.registration.licensePlateNumber,
},
});
state.order.damage.glassToReplace = sessionInformation.order.damage.glassToReplace;
@ -494,6 +481,7 @@ export const mutations = {
sessionInformation.order.serviceLocation.provider?.address?.zipCode;
state.order.serviceLocation.provider.address.zipCodeCtu =
sessionInformation.order.serviceLocation.provider?.address?.zipCodeCtu;
state.order.serviceLocation.techNotes = sessionInformation.order.serviceLocation.techNotes;
state.order.payment.isInsurance = sessionInformation.order.payment.isInsurance;
state.order.payment.insuranceCoverage.isVerified =
@ -502,6 +490,11 @@ export const mutations = {
sessionInformation?.insuranceInfo?.coverageStatus;
state.order.customer.emailAddress = sessionInformation.order.customer.emailAddress;
state.order.customer.firstName = sessionInformation.order.customer.firstName;
state.order.customer.lastName = sessionInformation.order.customer.lastName;
state.order.customer.phoneNumber = sessionInformation.order.customer.phoneNumber;
state.order.customer.isSmsOptin = sessionInformation.order.customer.isSmsOptin;
state.order.existingPromoCode = sessionInformation.order.existingPromoCode;
state.applicationUser.experiments = sessionInformation.applicationUser.experiments;
state.applicationUser.crmCustomerId = sessionInformation.applicationUser.crmCustomerId;
@ -1422,6 +1415,10 @@ export const actions = {
},
customer: {
emailAddress: order.customer.emailAddress,
firstName: order.customer.firstName,
lastName: order.customer.lastName,
isSmsOptin: order.customer.isSmsOptin,
phoneNumber: order.customer.phoneNumber,
},
damage: {
numberOfChips: damage.numberOfChips,
@ -1464,6 +1461,7 @@ export const actions = {
zipCodeCtu: order.serviceLocation.provider?.address?.zipCodeCtu,
},
},
techNotes: order.serviceLocation.techNotes,
},
schedule: {
date: order.schedule?.date,