From 3f109d244ea82dec4b6c6e40819202fad0b17965 Mon Sep 17 00:00:00 2001 From: Adam Caouette Date: Mon, 8 Jan 2024 13:53:31 -0500 Subject: [PATCH 01/14] CSR-1610: another attempt to fix load issue for saved sessions --- src/layouts/part-questions/part-questions.vue | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/src/layouts/part-questions/part-questions.vue b/src/layouts/part-questions/part-questions.vue index 113e91e42..08eecfc14 100644 --- a/src/layouts/part-questions/part-questions.vue +++ b/src/layouts/part-questions/part-questions.vue @@ -5,11 +5,13 @@ :isMetaValid="meta.valid" :alertFewMoreQuestionsHeader="AlertFewMoreQuestionsHeader" :alertFewMoreQuestionsCopy="AlertFewMoreQuestionsCopy" + v-if="questionsData" :questionsData="questionsData" validationRules="questions-required" v-model="selectedAnswers" @forwardButtonAction="forwardButtonAction" @back-click="navigateBack" + :key="currentGlassIndex" :index="currentGlassIndex" /> @@ -55,7 +57,7 @@ export default { }, data() { return { - questionsData: [], + questionsData: null, selectedAnswers: {}, currentGlassIndex: 0, }; @@ -71,7 +73,7 @@ export default { return this.$store.getters.pageData(fmgPageValues.PART_QUESTIONS).partsOrQuestions; }, }, - created() { + mounted() { this.getInitialQuestionData(); }, methods: { @@ -117,6 +119,14 @@ export default { return updatedGlass; }); + + // if no preanswered questions then make sure index starts with the correct value + if (this.currentGlassIndex === 0) { + this.currentGlassIndex = this.questionsData?.findIndex( + (glass) => glass.questions?.length > 0 + ); + } + }, async forwardButtonAction() { const questionAnswersArray = this.questionsData.map((glass) => { From e98875370775f12def62b6f3c21e4603b28ab8e6 Mon Sep 17 00:00:00 2001 From: Adam Caouette Date: Mon, 8 Jan 2024 15:29:46 -0500 Subject: [PATCH 02/14] CSR-1610: reformatting from prettier --- src/layouts/part-questions/part-questions.vue | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/layouts/part-questions/part-questions.vue b/src/layouts/part-questions/part-questions.vue index 08eecfc14..d9fbd369d 100644 --- a/src/layouts/part-questions/part-questions.vue +++ b/src/layouts/part-questions/part-questions.vue @@ -119,14 +119,13 @@ export default { return updatedGlass; }); - + // if no preanswered questions then make sure index starts with the correct value if (this.currentGlassIndex === 0) { this.currentGlassIndex = this.questionsData?.findIndex( (glass) => glass.questions?.length > 0 ); } - }, async forwardButtonAction() { const questionAnswersArray = this.questionsData.map((glass) => { From 6d269ada669e46ed0146cbed0fed9ffced37237b Mon Sep 17 00:00:00 2001 From: Adam Caouette Date: Mon, 8 Jan 2024 15:35:42 -0500 Subject: [PATCH 03/14] CSR-1610: fix unit test --- src/digital-components/question-chain/question-chain.spec.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/digital-components/question-chain/question-chain.spec.js b/src/digital-components/question-chain/question-chain.spec.js index 2444fd22d..d516afc03 100644 --- a/src/digital-components/question-chain/question-chain.spec.js +++ b/src/digital-components/question-chain/question-chain.spec.js @@ -265,8 +265,8 @@ describe("Question Chain component", () => { ], }, ], - index: 0, }); + await wrapper.setProps({ index: 0 }); //Act const result = wrapper.vm.getQuestionChainAnswerIfComplete(testReturnedAnswer); From 9624deea4ba9d6f9a0a85aaa659de6ecf6da41c8 Mon Sep 17 00:00:00 2001 From: Sneha Date: Tue, 9 Jan 2024 18:08:59 +0530 Subject: [PATCH 04/14] Update promo-question.vue --- .../promo-modal-question/promo-question/promo-question.vue | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/layouts/payment-method/promo-modal-question/promo-question/promo-question.vue b/src/layouts/payment-method/promo-modal-question/promo-question/promo-question.vue index 053e8eedc..e840c5ace 100644 --- a/src/layouts/payment-method/promo-modal-question/promo-question/promo-question.vue +++ b/src/layouts/payment-method/promo-modal-question/promo-question/promo-question.vue @@ -43,7 +43,9 @@ export default { }, methods: { validateAlphanumeric() { - this.value = this.value.replace(ALPHANUMERIC_REGEX, ""); + setTimeout(() => { + this.value = this.value.replace(ALPHANUMERIC_REGEX, ""); + }, 0); }, }, components: { From 59355ff8d1e3d4e09ecd2c58325fc29f8986d8c7 Mon Sep 17 00:00:00 2001 From: Sneha Date: Tue, 9 Jan 2024 18:21:00 +0530 Subject: [PATCH 05/14] Update promo-question.vue --- .../promo-modal-question/promo-question/promo-question.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/layouts/payment-method/promo-modal-question/promo-question/promo-question.vue b/src/layouts/payment-method/promo-modal-question/promo-question/promo-question.vue index e840c5ace..0e71fdb9f 100644 --- a/src/layouts/payment-method/promo-modal-question/promo-question/promo-question.vue +++ b/src/layouts/payment-method/promo-modal-question/promo-question/promo-question.vue @@ -45,7 +45,7 @@ export default { validateAlphanumeric() { setTimeout(() => { this.value = this.value.replace(ALPHANUMERIC_REGEX, ""); - }, 0); + }); }, }, components: { From 5dcfcaef81f123c08ca8c24a84693578db7c7471 Mon Sep 17 00:00:00 2001 From: hiteshkumar87 Date: Tue, 9 Jan 2024 21:17:08 +0530 Subject: [PATCH 06/14] Update payment-method.vue change computed property to data field isPiaDisabled --- src/layouts/payment-method/payment-method.vue | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/src/layouts/payment-method/payment-method.vue b/src/layouts/payment-method/payment-method.vue index 96f2fda75..9e3910b40 100644 --- a/src/layouts/payment-method/payment-method.vue +++ b/src/layouts/payment-method/payment-method.vue @@ -307,6 +307,7 @@ export default { availableVaps: [], paymentMethodInternalModel: this.getPaymentMethodFromStore(), inactivePromos: this.getInactivePromosFromStore(), + isPiaDisabled: this.getPiaStatusFromStore(), }; }, methods: { @@ -499,6 +500,13 @@ export default { this.$route ); }, + getPiaStatusFromStore() { + const piaExperience = this.getSettingValue(experimentSettings.PIA_EXPERIENCE); + + const isEnabled = piaExperience === "PIA Optional" || piaExperience === "PIA Required"; + + return !isEnabled; + }, }, computed: { damageInfo() { @@ -519,13 +527,6 @@ export default { return null; } }, - isPiaDisabled() { - const piaExperience = this.getSettingValue(experimentSettings.PIA_EXPERIENCE); - - const isEnabled = piaExperience === "PIA Optional" || piaExperience === "PIA Required"; - - return !isEnabled; - }, paymentMethod() { if (this.isPiaDisabled) { return paymentMethods.LATER; From 429440aeb7739ad77327913bec8b3957416dd3d3 Mon Sep 17 00:00:00 2001 From: Chloe Herd Date: Tue, 9 Jan 2024 10:53:57 -0500 Subject: [PATCH 07/14] Change nature of alert --- src/layouts/payment-method/payment-method.vue | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/layouts/payment-method/payment-method.vue b/src/layouts/payment-method/payment-method.vue index 96f2fda75..3bde800bf 100644 --- a/src/layouts/payment-method/payment-method.vue +++ b/src/layouts/payment-method/payment-method.vue @@ -15,10 +15,6 @@ -

- {{ noPiaDisclaimer }} -

-
@@ -56,6 +52,13 @@ v-model="paymentMethodInternalModel" validationRules="option-required" /> + + Date: Tue, 9 Jan 2024 15:35:22 -0500 Subject: [PATCH 08/14] CSR-1910 fix background color of subtotal row. --- src/fmg-components/cart/cart.vue | 2 +- src/layouts/confirmation/confirmation.vue | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/fmg-components/cart/cart.vue b/src/fmg-components/cart/cart.vue index cd50a8fda..2d268e81a 100644 --- a/src/fmg-components/cart/cart.vue +++ b/src/fmg-components/cart/cart.vue @@ -834,7 +834,7 @@ export default { display: flex; justify-content: space-between; padding: 0.5rem 1.5rem; - &:nth-last-child(-n + 3) { + &:nth-last-child(-n + 4) { background-color: $green-100; } &:last-child { diff --git a/src/layouts/confirmation/confirmation.vue b/src/layouts/confirmation/confirmation.vue index 45c73f096..d9fe2e479 100644 --- a/src/layouts/confirmation/confirmation.vue +++ b/src/layouts/confirmation/confirmation.vue @@ -145,6 +145,8 @@ export default { computed: { ShowCart() { if (this.isPia && store.getters.submittedOrder.settledTenderAmount == 0) { + // settleTenderAmount always shows 0 via localhost or dev. + // Temporarily set return true to see cart in localhost or dev environment return false; } From d1eda98385a0ee66d24f027086f67c0f73337da0 Mon Sep 17 00:00:00 2001 From: Chloe Herd Date: Tue, 9 Jan 2024 17:34:48 -0500 Subject: [PATCH 09/14] Basic banner with cms content --- .../afterpay-modal-banner.vue | 103 ++++++++++++++++++ src/layouts/quote/quote.vue | 6 + 2 files changed, 109 insertions(+) create mode 100644 src/layouts/quote/afterpay-modal-banner/afterpay-modal-banner.vue diff --git a/src/layouts/quote/afterpay-modal-banner/afterpay-modal-banner.vue b/src/layouts/quote/afterpay-modal-banner/afterpay-modal-banner.vue new file mode 100644 index 000000000..b26b9f3c2 --- /dev/null +++ b/src/layouts/quote/afterpay-modal-banner/afterpay-modal-banner.vue @@ -0,0 +1,103 @@ + + + + + diff --git a/src/layouts/quote/quote.vue b/src/layouts/quote/quote.vue index e48e8fff8..73fc42266 100644 --- a/src/layouts/quote/quote.vue +++ b/src/layouts/quote/quote.vue @@ -34,6 +34,10 @@ validationRules="option-required" isRequired /> + + From a359d2773158955b4147317e1257332a96094445 Mon Sep 17 00:00:00 2001 From: Chloe Herd Date: Wed, 10 Jan 2024 11:24:10 -0500 Subject: [PATCH 10/14] Add afterpay script + modal --- .../afterpay-modal-banner/afterpay-modal-banner.vue | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/layouts/quote/afterpay-modal-banner/afterpay-modal-banner.vue b/src/layouts/quote/afterpay-modal-banner/afterpay-modal-banner.vue index b26b9f3c2..6eb8a5a87 100644 --- a/src/layouts/quote/afterpay-modal-banner/afterpay-modal-banner.vue +++ b/src/layouts/quote/afterpay-modal-banner/afterpay-modal-banner.vue @@ -1,5 +1,7 @@ @@ -96,7 +104,7 @@ export default { height: 1rem; } } - & p { + & .alert-heading { font-size: 0.875rem; } } From 356ffe6e455d8293768ac9cc7f92a4d3c3f2afd2 Mon Sep 17 00:00:00 2001 From: Chloe Herd Date: Wed, 10 Jan 2024 12:48:17 -0500 Subject: [PATCH 11/14] Only display if cash is selected --- src/layouts/quote/quote.vue | 1 + 1 file changed, 1 insertion(+) diff --git a/src/layouts/quote/quote.vue b/src/layouts/quote/quote.vue index 73fc42266..5c6b2d744 100644 --- a/src/layouts/quote/quote.vue +++ b/src/layouts/quote/quote.vue @@ -35,6 +35,7 @@ isRequired /> From e35fe3fb1b619d1bbff1426caf5d7c72ad79c42c Mon Sep 17 00:00:00 2001 From: Adam Caouette Date: Thu, 11 Jan 2024 07:48:49 -0500 Subject: [PATCH 12/14] CSR-1610: copy fix updates into other question pages --- .../capability-questions.vue | 7 ++- .../molding-questions/molding-questions.vue | 7 ++- src/layouts/part-questions/part-questions.vue | 6 +- src/mixins/vehicle-questions-mixin.js | 9 +++ src/mixins/vehicle-questions-mixin.spec.js | 55 +++++++++++++++++++ 5 files changed, 77 insertions(+), 7 deletions(-) diff --git a/src/layouts/capability-questions/capability-questions.vue b/src/layouts/capability-questions/capability-questions.vue index 717865e41..e02035804 100644 --- a/src/layouts/capability-questions/capability-questions.vue +++ b/src/layouts/capability-questions/capability-questions.vue @@ -5,11 +5,13 @@ :isMetaValid="meta.valid" :alertFewMoreQuestionsHeader="AlertFewMoreQuestionsHeader" :alertFewMoreQuestionsCopy="AlertFewMoreQuestionsCopy" + v-if="questionsData" :questionsData="questionsData" validationRules="questions-required" v-model="selectedAnswers" @forwardButtonAction="forwardButtonAction" @back-click="navigateBack" + :key="currentGlassIndex" :index="currentGlassIndex" /> @@ -55,7 +57,7 @@ export default { }, data() { return { - questionsData: [], + questionsData: null, selectedAnswers: {}, currentGlassIndex: 0, }; @@ -120,6 +122,9 @@ export default { return updatedGlass; }); + + // if no preanswered questions then make sure index starts with the correct value + this.currentGlassIndex = this.calculateQuestionIndex(this.currentGlassIndex, this.questionsData); }, async forwardButtonAction() { const questionAnswersArray = this.questionsData.map((glass) => { diff --git a/src/layouts/molding-questions/molding-questions.vue b/src/layouts/molding-questions/molding-questions.vue index ee1b33a9f..243919447 100644 --- a/src/layouts/molding-questions/molding-questions.vue +++ b/src/layouts/molding-questions/molding-questions.vue @@ -5,11 +5,13 @@ :isMetaValid="meta.valid" :alertFewMoreQuestionsHeader="AlertFewMoreQuestionsHeader" :alertFewMoreQuestionsCopy="AlertFewMoreQuestionsCopy" + v-if="questionsData" :questionsData="questionsData" validationRules="questions-required" v-model="selectedAnswers" @forwardButtonAction="forwardButtonAction" @back-click="navigateBack" + :key="currentGlassIndex" :index="currentGlassIndex" /> @@ -55,7 +57,7 @@ export default { }, data() { return { - questionsData: [], + questionsData: null, selectedAnswers: {}, currentGlassIndex: 0, }; @@ -119,6 +121,9 @@ export default { return updatedGlass; }); + + // if no preanswered questions then make sure index starts with the correct value + this.currentGlassIndex = this.calculateQuestionIndex(this.currentGlassIndex, this.questionsData); }, async forwardButtonAction() { const questionAnswersArray = this.questionsData.map((glass) => { diff --git a/src/layouts/part-questions/part-questions.vue b/src/layouts/part-questions/part-questions.vue index d9fbd369d..de3792d97 100644 --- a/src/layouts/part-questions/part-questions.vue +++ b/src/layouts/part-questions/part-questions.vue @@ -121,11 +121,7 @@ export default { }); // if no preanswered questions then make sure index starts with the correct value - if (this.currentGlassIndex === 0) { - this.currentGlassIndex = this.questionsData?.findIndex( - (glass) => glass.questions?.length > 0 - ); - } + this.currentGlassIndex = this.calculateQuestionIndex(this.currentGlassIndex, this.questionsData); }, async forwardButtonAction() { const questionAnswersArray = this.questionsData.map((glass) => { diff --git a/src/mixins/vehicle-questions-mixin.js b/src/mixins/vehicle-questions-mixin.js index d79e4f5b3..9614baf66 100644 --- a/src/mixins/vehicle-questions-mixin.js +++ b/src/mixins/vehicle-questions-mixin.js @@ -146,6 +146,15 @@ export default { return glass; }, + calculateQuestionIndex(currentGlassIndex, questionsData) { + // if no preanswered questions then make sure index starts with the correct value + if (currentGlassIndex === 0) { + return questionsData?.findIndex( + (glass) => glass.questions?.length > 0 + ); + } + return currentGlassIndex; + }, handleCompletedQuestionChainAnswers(answer, glassKey, vm) { // only runs when all questions in a question-chain have been answered // when selectedAnswers updates, user has completed this part's question chain and has a final answer diff --git a/src/mixins/vehicle-questions-mixin.spec.js b/src/mixins/vehicle-questions-mixin.spec.js index f87d7efdc..5d0153e7b 100644 --- a/src/mixins/vehicle-questions-mixin.spec.js +++ b/src/mixins/vehicle-questions-mixin.spec.js @@ -411,6 +411,61 @@ describe("vehicle-questions-mixin", () => { }); }); + describe("calculateQuestionIndex", () => { + describe("if currentGlassIndex is zero...", () => { + test("should return index of first glass piece with questions", () => { + // Arrange + const questionsData = [ + { + glassName: "Single", + glassLocation: "Windshield", + }, + { + glassName: "Front", + glassLocation: "Driver", + questions: [ + "example question" + ] + }, + ]; + const glassIndex = 0; + const { wrapper } = setupMocks({}); + + // Act + const returnedIndex = wrapper.vm.calculateQuestionIndex(glassIndex, questionsData); + + // Assert + expect(returnedIndex).toBe(1); + }); + }); + describe("if currentGlassIndex is NOT zero...", () => { + test("should return currentGlassIndex value", () => { + // Arrange + const questionsData = [ + { + glassName: "Single", + glassLocation: "Windshield", + }, + { + glassName: "Front", + glassLocation: "Driver", + questions: [ + "example question" + ] + }, + ]; + const glassIndex = 1; + const { wrapper } = setupMocks({}); + + // Act + const returnedIndex = wrapper.vm.calculateQuestionIndex(glassIndex, questionsData); + + // Assert + expect(returnedIndex).toBe(1); + }); + }); + }); + describe("handleCompletedQuestionChainAnswers", () => { describe("selectedAnswers", () => { test("should be cleared to be empty", () => { From 2fbc4e3bd589ed6046e1f59554041ae0b84dccf5 Mon Sep 17 00:00:00 2001 From: Adam Caouette Date: Thu, 11 Jan 2024 11:10:12 -0500 Subject: [PATCH 13/14] CSR-1610: prettier 'fixes' --- src/layouts/capability-questions/capability-questions.vue | 5 ++++- src/layouts/molding-questions/molding-questions.vue | 5 ++++- src/layouts/part-questions/part-questions.vue | 5 ++++- src/mixins/vehicle-questions-mixin.js | 4 +--- src/mixins/vehicle-questions-mixin.spec.js | 8 ++------ 5 files changed, 15 insertions(+), 12 deletions(-) diff --git a/src/layouts/capability-questions/capability-questions.vue b/src/layouts/capability-questions/capability-questions.vue index e02035804..e46629bf1 100644 --- a/src/layouts/capability-questions/capability-questions.vue +++ b/src/layouts/capability-questions/capability-questions.vue @@ -124,7 +124,10 @@ export default { }); // if no preanswered questions then make sure index starts with the correct value - this.currentGlassIndex = this.calculateQuestionIndex(this.currentGlassIndex, this.questionsData); + this.currentGlassIndex = this.calculateQuestionIndex( + this.currentGlassIndex, + this.questionsData + ); }, async forwardButtonAction() { const questionAnswersArray = this.questionsData.map((glass) => { diff --git a/src/layouts/molding-questions/molding-questions.vue b/src/layouts/molding-questions/molding-questions.vue index 243919447..b2d6804bc 100644 --- a/src/layouts/molding-questions/molding-questions.vue +++ b/src/layouts/molding-questions/molding-questions.vue @@ -123,7 +123,10 @@ export default { }); // if no preanswered questions then make sure index starts with the correct value - this.currentGlassIndex = this.calculateQuestionIndex(this.currentGlassIndex, this.questionsData); + this.currentGlassIndex = this.calculateQuestionIndex( + this.currentGlassIndex, + this.questionsData + ); }, async forwardButtonAction() { const questionAnswersArray = this.questionsData.map((glass) => { diff --git a/src/layouts/part-questions/part-questions.vue b/src/layouts/part-questions/part-questions.vue index de3792d97..9f4a13902 100644 --- a/src/layouts/part-questions/part-questions.vue +++ b/src/layouts/part-questions/part-questions.vue @@ -121,7 +121,10 @@ export default { }); // if no preanswered questions then make sure index starts with the correct value - this.currentGlassIndex = this.calculateQuestionIndex(this.currentGlassIndex, this.questionsData); + this.currentGlassIndex = this.calculateQuestionIndex( + this.currentGlassIndex, + this.questionsData + ); }, async forwardButtonAction() { const questionAnswersArray = this.questionsData.map((glass) => { diff --git a/src/mixins/vehicle-questions-mixin.js b/src/mixins/vehicle-questions-mixin.js index 9614baf66..d0fd9dd1b 100644 --- a/src/mixins/vehicle-questions-mixin.js +++ b/src/mixins/vehicle-questions-mixin.js @@ -149,9 +149,7 @@ export default { calculateQuestionIndex(currentGlassIndex, questionsData) { // if no preanswered questions then make sure index starts with the correct value if (currentGlassIndex === 0) { - return questionsData?.findIndex( - (glass) => glass.questions?.length > 0 - ); + return questionsData?.findIndex((glass) => glass.questions?.length > 0); } return currentGlassIndex; }, diff --git a/src/mixins/vehicle-questions-mixin.spec.js b/src/mixins/vehicle-questions-mixin.spec.js index 5d0153e7b..56f4425cc 100644 --- a/src/mixins/vehicle-questions-mixin.spec.js +++ b/src/mixins/vehicle-questions-mixin.spec.js @@ -423,9 +423,7 @@ describe("vehicle-questions-mixin", () => { { glassName: "Front", glassLocation: "Driver", - questions: [ - "example question" - ] + questions: ["example question"], }, ]; const glassIndex = 0; @@ -449,9 +447,7 @@ describe("vehicle-questions-mixin", () => { { glassName: "Front", glassLocation: "Driver", - questions: [ - "example question" - ] + questions: ["example question"], }, ]; const glassIndex = 1; From 5111bdb0613ddf26c5ac1481101dd9ea80a6529d Mon Sep 17 00:00:00 2001 From: Matt Caimi Date: Mon, 15 Jan 2024 10:13:09 -0500 Subject: [PATCH 14/14] CSR-1889 added last four to cc tokenization --- src/constants/query-strings.js | 1 + src/layouts/payment-pia-return/payment-pia-return.vue | 2 ++ src/store/index.js | 3 +++ src/store/store.spec.js | 1 + 4 files changed, 7 insertions(+) diff --git a/src/constants/query-strings.js b/src/constants/query-strings.js index 5c056c934..5e12b0d9d 100644 --- a/src/constants/query-strings.js +++ b/src/constants/query-strings.js @@ -19,6 +19,7 @@ const queryStrings = { AUTH_CODE: "auth_code", TRANSACTION_ID: "transaction_id", TRANS_REFERENCE_NUMBER: "auth_trans_ref_no", + LAST_FOUR: "last_four", DISPLAY_PIA_ALERT: "displayPiaAlert", }; diff --git a/src/layouts/payment-pia-return/payment-pia-return.vue b/src/layouts/payment-pia-return/payment-pia-return.vue index 5b007fffe..45a68d91b 100644 --- a/src/layouts/payment-pia-return/payment-pia-return.vue +++ b/src/layouts/payment-pia-return/payment-pia-return.vue @@ -106,6 +106,7 @@ export default { const transReferenceNumber = getQuerystringParameter( queryStrings.TRANS_REFERENCE_NUMBER ); + const lastFour = getQuerystringParameter(queryStrings.LAST_FOUR); var ccToken = { subscriptionId: subscriptionID, @@ -119,6 +120,7 @@ export default { authCode: authCode, transactionId: transactionId, transReferenceNumber: transReferenceNumber, + lastFour: lastFour, }; baseMixin.methods.dispatchStoreAction(storeActions.SAVE_CCTOKEN, ccToken, false); await this.saveAndSubmitWorkOrder(); diff --git a/src/store/index.js b/src/store/index.js index f023bd708..ce236d6b2 100644 --- a/src/store/index.js +++ b/src/store/index.js @@ -115,6 +115,7 @@ const getDefaultState = () => { authCode: null, transactionId: null, transReferenceNumber: null, + lastFour: null, }, }, schedule: { @@ -274,6 +275,7 @@ export const mutations = { state.order.payment.ccToken.authCode = ccToken.authCode; state.order.payment.ccToken.transactionId = ccToken.transactionId; state.order.payment.ccToken.transReferenceNumber = ccToken.transReferenceNumber; + state.order.payment.ccToken.lastFour = ccToken.lastFour; }, updatePaypalToken(state, ppToken) { state.order.payment.paypalToken = ppToken; @@ -1680,6 +1682,7 @@ export const actions = { authCode: order.payment.ccToken.authCode, transactionId: order.payment.ccToken.transactionId, transReferenceNumber: order.payment.ccToken.transReferenceNumber, + lastFour: order.payment.ccToken.lastFour, }, }, serviceLocation: { diff --git a/src/store/store.spec.js b/src/store/store.spec.js index 990e52f4f..81ef8f052 100644 --- a/src/store/store.spec.js +++ b/src/store/store.spec.js @@ -742,6 +742,7 @@ describe("Actions", () => { authCode: null, transactionId: null, transReferenceNumber: null, + lastFour: null, }, }, serviceLocation: {},