Nulls for the win!

This commit is contained in:
DavidAtSafelite 2023-05-10 11:03:03 -04:00
parent ff0d877170
commit 4fc7012b7a

View file

@ -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