From f2d7bbafb585e0628fe9bdb540fc7dcc9a7a2d05 Mon Sep 17 00:00:00 2001 From: Leah Schumann Date: Fri, 28 Jul 2023 06:39:06 -0400 Subject: [PATCH 1/3] Added fields to vuex store --- src/store/index.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/store/index.js b/src/store/index.js index fa2906387..c3751b86a 100644 --- a/src/store/index.js +++ b/src/store/index.js @@ -59,9 +59,14 @@ const getDefaultState = () => { zipCodeCtu: null, }, }, + techNotes: null, }, customer: { + firstName: null, + lastName: null, emailAddress: null, + phoneNumber: null, + isSmsOptin: null, }, damage: { isRepair: null, From ec9584135b6b443115623199e1aa8e6597727ce0 Mon Sep 17 00:00:00 2001 From: Leah Schumann Date: Wed, 2 Aug 2023 09:31:45 -0400 Subject: [PATCH 2/3] Persistence Code for Customer Details --- src/constants/store-actions.js | 1 + src/constants/store-mutations.js | 4 +- .../textarea-question/textarea-question.vue | 2 +- .../customer-details/customer-details.spec.js | 2 +- .../customer-details/customer-details.vue | 59 ++++++++++++++++--- src/store/index.js | 26 ++++---- 6 files changed, 73 insertions(+), 21 deletions(-) diff --git a/src/constants/store-actions.js b/src/constants/store-actions.js index 9d7d3ea6a..c2a297823 100644 --- a/src/constants/store-actions.js +++ b/src/constants/store-actions.js @@ -85,6 +85,7 @@ const storeActions = { "saveSupportingItemsSuppressingStateResetting", SAVE_VAPS: "saveVaps", SAVE_CUSTOMER_DETAILS: "saveCustomerDetails", + SAVE_SERVICE_LOCATION_TECH_NOTES: "saveServiceLocationTechNotes", }; export { storeActions }; diff --git a/src/constants/store-mutations.js b/src/constants/store-mutations.js index 76d510507..7b57187c2 100644 --- a/src/constants/store-mutations.js +++ b/src/constants/store-mutations.js @@ -34,11 +34,13 @@ const storeMutations = { UPDATE_SERVICE_ZIP: "updateServiceZip", UPDATE_SERVICE_LOCATION: "updateServiceLocation", + UPDATE_SERVICE_LOCATION_TECH_NOTES: "updateServiceLocationTechNotes", + UPDATE_TECH_NOTES: "updateTechNotes", UPDATE_SCHEDULE: "updateSchedule", UPDATE_CUSTOMER_EMAIL_ADDRESS: "updateCustomerEmailAddress", - //CUSTOMER MUTATIONS + // CUSTOMER MUTATIONS UPDATE_CUSTOMER_DETAILS: "updateCustomerDetails", // ORDER MUTATIONS diff --git a/src/digital-components/textarea-question/textarea-question.vue b/src/digital-components/textarea-question/textarea-question.vue index 0ffe5ec0a..83d718976 100644 --- a/src/digital-components/textarea-question/textarea-question.vue +++ b/src/digital-components/textarea-question/textarea-question.vue @@ -54,7 +54,7 @@ export default { }, }, remainingCount() { - return this.maxLength - this.value.length; + return this.maxLength - (this.value?.length ?? 0); }, urgentCountdown() { return this.remainingCount <= this.maxLength * 0.1 ? true : false; diff --git a/src/layouts/customer-details/customer-details.spec.js b/src/layouts/customer-details/customer-details.spec.js index af43c1930..450339f4c 100644 --- a/src/layouts/customer-details/customer-details.spec.js +++ b/src/layouts/customer-details/customer-details.spec.js @@ -36,7 +36,7 @@ describe("customer-details.vue", () => { await wrapper.vm.forwardButtonAction(); // Assert - expect(navigateToHeritage.navigateToHeritageFunnel).toHaveBeenCalled(); + expect(wrapper.vm.$router.navigateWithoutSaving).toHaveBeenCalled(); }); }); }); diff --git a/src/layouts/customer-details/customer-details.vue b/src/layouts/customer-details/customer-details.vue index 9a0d7e554..06694586a 100644 --- a/src/layouts/customer-details/customer-details.vue +++ b/src/layouts/customer-details/customer-details.vue @@ -32,7 +32,7 @@ + v-model="isSmsOptin" /> Date: Wed, 2 Aug 2023 09:39:28 -0400 Subject: [PATCH 3/3] Merged from develop --- src/layouts/customer-details/customer-details.vue | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/src/layouts/customer-details/customer-details.vue b/src/layouts/customer-details/customer-details.vue index 06694586a..be533117f 100644 --- a/src/layouts/customer-details/customer-details.vue +++ b/src/layouts/customer-details/customer-details.vue @@ -163,13 +163,7 @@ export default { false ); - //Temporary, still need to determine what needs to be saved before continuing. - this.$router.navigateWithoutSaving( - this.navigationScenarios.CLICKED_FORWARD, - this.$route - ); - - //navigateToHeritageFunnel({ loadingModal: this.$refs.loadingModal }); + this.$router.navigateWithSaving(this.navigationScenarios.CLICKED_FORWARD, this.$route); }, }, components: {