From 4fc7012b7a913e36c7b6df90acd9d96c13367290 Mon Sep 17 00:00:00 2001 From: DavidAtSafelite Date: Wed, 10 May 2023 11:03:03 -0400 Subject: [PATCH] Nulls for the win! --- src/store/index.js | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/src/store/index.js b/src/store/index.js index 9fba1222..90b04423 100644 --- a/src/store/index.js +++ b/src/store/index.js @@ -699,10 +699,10 @@ export const useMainStore = defineStore({ this.order.damage.partQuestionAnswers = null; this.order.damage.moldingQuestionAnswers = null; this.order.damage.capabilityQuestionAnswers = null; - this.applicationUser.pageData[issPageValues.PART_QUESTIONS] = {}; - this.applicationUser.pageData[issPageValues.VEHICLE_PARTS] = {}; - this.applicationUser.pageData[issPageValues.MOLDING_QUESTIONS] = {}; - this.applicationUser.pageData[issPageValues.CAPABILITY_QUESTIONS] = {}; + this.applicationUser.pageData[issPageValues.PART_QUESTIONS] = null; + this.applicationUser.pageData[issPageValues.VEHICLE_PARTS] = null; + this.applicationUser.pageData[issPageValues.MOLDING_QUESTIONS] = null; + this.applicationUser.pageData[issPageValues.CAPABILITY_QUESTIONS] = null; }, resetSupportingItemsState() { @@ -734,8 +734,8 @@ export const useMainStore = defineStore({ this.resetPartsAndDependencies(); this.updateMoldingQuestionAnswers(null); this.updateCapabilityQuestionAnswers(null); - this.updatePageData({ page: issPageValues.MOLDING_QUESTIONS, data: {} }); - this.updatePageData({ page: issPageValues.CAPABILITY_QUESTIONS, data: {} }); + this.updatePageData({ page: issPageValues.MOLDING_QUESTIONS, data: null }); + this.updatePageData({ page: issPageValues.CAPABILITY_QUESTIONS, data: null }); } }, @@ -842,7 +842,7 @@ export const useMainStore = defineStore({ }, updatePageData(pageData) { - this.applicationUser.pageData[pageData.page] = (!!pageData.data) ? pageData.data : {}; + this.applicationUser.pageData[pageData.page] = pageData.data; }, updatePolicyData(welcomePageModel) { @@ -890,9 +890,9 @@ export const useMainStore = defineStore({ this.resetSupportingItemsState(); this.resetVapsState(); - this.updatePageData({ page: issPageValues.VEHICLE_PARTS, data: {} }); - this.updatePageData({ page: issPageValues.MOLDING_QUESTIONS, data: {} }); - this.updatePageData({ page: issPageValues.CAPABILITY_QUESTIONS, data: {} }); + this.updatePageData({ page: issPageValues.VEHICLE_PARTS, data: null }); + this.updatePageData({ page: issPageValues.MOLDING_QUESTIONS, data: null }); + this.updatePageData({ page: issPageValues.CAPABILITY_QUESTIONS, data: null }); } //Save new values @@ -918,7 +918,7 @@ export const useMainStore = defineStore({ // was updateGlassParts(null), added dependencies for SSR-290 this.resetPartsAndDependencies(); this.updateCapabilityQuestionAnswers(null); - this.updatePageData({ page: issPageValues.CAPABILITY_QUESTIONS, data: {} }); + this.updatePageData({ page: issPageValues.CAPABILITY_QUESTIONS, data: null }); } // Save new values