From 4980a7bc914cb1a2a7c249aa900d5bc0f9fd7fe4 Mon Sep 17 00:00:00 2001 From: Katie Date: Tue, 9 Aug 2022 10:16:29 -0400 Subject: [PATCH] CSR-690 Clear parts questions when coming back from heritage with a different vehicle --- src/store/index.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/store/index.js b/src/store/index.js index 7db358c1e..014ba7ec7 100644 --- a/src/store/index.js +++ b/src/store/index.js @@ -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,