CSR-690 Clear parts questions when coming back from heritage with a different vehicle

This commit is contained in:
Katie 2022-08-09 10:16:29 -04:00
parent 74b86c80d2
commit 4980a7bc91

View file

@ -288,6 +288,13 @@ export const mutations = {
state.order.referralCorrelationId = orderInformation.referralCorrelationId;
state.order.eon = orderInformation.eon;
if (state.order.vehicle.vin !== orderInformation.vehicle?.vin) {
state.applicationUser.pageData[fmgPageValues.PART_QUESTIONS] = null;
state.applicationUser.pageData[fmgPageValues.VEHICLE_PARTS] = null;
state.applicationUser.pageData[fmgPageValues.MOLDING_QUESTIONS] = null;
state.applicationUser.pageData[fmgPageValues.CAPABILITY_QUESTIONS] = null;
}
state.order.vehicle = Object.assign(state.order.vehicle, {
year: orderInformation.vehicle?.year,
make: orderInformation.vehicle?.make,