From 73969b4352db50fbbc4124171cf174f2475d5bfc Mon Sep 17 00:00:00 2001 From: Michaela Brydon Date: Wed, 10 Apr 2024 15:44:23 -0400 Subject: [PATCH 01/35] Initial changes --- .../cart-dropdown/cart-dropdown.vue | 9 +++++---- .../coverage-statement/coverage-statement.vue | 8 ++++---- src/layouts/entry-page/entry-page.vue | 4 ++++ src/layouts/payment-method/payment-method.vue | 16 ++++++++-------- src/layouts/tpa-submit/tpa-submit.vue | 3 ++- src/store/index.js | 11 ++++++----- 6 files changed, 29 insertions(+), 22 deletions(-) diff --git a/src/iss-components/cart-dropdown/cart-dropdown.vue b/src/iss-components/cart-dropdown/cart-dropdown.vue index 54031ec5..3e6c9cb0 100644 --- a/src/iss-components/cart-dropdown/cart-dropdown.vue +++ b/src/iss-components/cart-dropdown/cart-dropdown.vue @@ -207,8 +207,9 @@ export default { return getPriceOfLineItems(this.baseServiceLineItems); }, isUnverified() { - return !useMainStore().isNoComp && !useMainStore().policy.isITAC - && (this.deductible == null || !useMainStore().isVerifiedCoverageStatus); + return (useMainStore().isNoComp && !useMainStore().issConfig.enableNoCompQuote) + || (!useMainStore().isNoComp && !useMainStore().policy.isITAC + && (this.deductible == null || !useMainStore().isVerifiedCoverageStatus)); }, subTotal() { const basePrice = !useMainStore().isNoComp && !useMainStore().policy.isITAC @@ -350,8 +351,8 @@ export default { }, getDisplayed(amount) { return this.isUnverified - && !useMainStore().isNoComp - && !useMainStore().policy.isITAC + // && ((useMainStore().isNoComp && !useMainStore().issConfig.enableNoCompQuote) + // || (!useMainStore().isNoComp && !useMainStore().policy.isITAC)) ? VERIFYING_COVERAGE : formatAmountInDollars(amount); }, diff --git a/src/layouts/coverage-statement/coverage-statement.vue b/src/layouts/coverage-statement/coverage-statement.vue index bd1e0162..9f866e2f 100644 --- a/src/layouts/coverage-statement/coverage-statement.vue +++ b/src/layouts/coverage-statement/coverage-statement.vue @@ -208,11 +208,11 @@ export default { }, data() { const { isRepair } = useMainStore().damage; - const { policyLookupSuccessful, noCoverage } = useMainStore().policy; + const { policyLookupSuccessful } = useMainStore().policy; return { isRepair, policyLookupSuccessful, - isNoComp: noCoverage ?? false, + isNoComp: useMainStore().isNoComp, baseServiceLineItems: [], selectedProvider: '', deductibleText: 'Your deductible is', @@ -292,7 +292,7 @@ export default { return useMainStore().payment.insuranceCoverage.isVerified; }, verifiedNoComp() { - return this.policyLookupSuccessful && this.isNoComp; + return this.policyLookupSuccessful && this.isNoComp && useMainStore().issConfig.enableNoCompQuote; }, verifiedITAC() { return this.policyLookupSuccessful @@ -300,7 +300,7 @@ export default { && this.deductibleValue > this.totalServicePrice; }, coveredAndServicePriceAboveOrEqualDeductible() { - return !this.verifiedNoComp && this.totalServicePrice >= this.deductibleValue; + return !this.isNoComp && this.totalServicePrice >= this.deductibleValue; }, verifiedDeductible() { return useMainStore().isClaimRegistrationRequired diff --git a/src/layouts/entry-page/entry-page.vue b/src/layouts/entry-page/entry-page.vue index a060ab39..b2da8ab2 100644 --- a/src/layouts/entry-page/entry-page.vue +++ b/src/layouts/entry-page/entry-page.vue @@ -117,6 +117,10 @@ export default { if (clientFlags.ClaimRegistrationRequired) { this.mainStore.issConfig.isClaimRegistrationRequired = true; } + + if (clientFlags.EnableNoCompQuote) { + this.mainStore.issConfig.enableNoCompQuote = true; + } } } catch (e) { console.error(`Error parsing client flags: ${e}`); diff --git a/src/layouts/payment-method/payment-method.vue b/src/layouts/payment-method/payment-method.vue index c5014290..1fbd3d62 100644 --- a/src/layouts/payment-method/payment-method.vue +++ b/src/layouts/payment-method/payment-method.vue @@ -129,12 +129,10 @@ export default { let hasBailedOut = false; const pricedVaps = await useMainStore().getPriceOrderItems(unpricedVaps) .catch((err) => { - useMainStore().setBailout( - bailoutMessage.pricingResponseError( - unpricedVaps.map((li) => li.partNumber), - { code: err.code, message: err.message, data: err.data } - ) - ); + useMainStore().setBailout(bailoutMessage.pricingResponseError( + unpricedVaps.map((li) => li.partNumber), + { code: err.code, message: err.message, data: err.data } + )); hasBailedOut = true; next(`/?issPage=${issPageValues.BAILOUT_PAGE}`); }); @@ -182,8 +180,10 @@ export default { return !isEnabled || this.isUnverified; }, isUnverified() { - return !useMainStore().isNoComp && !useMainStore().isITAC - && (useMainStore().order.currentDeductible == null || !useMainStore().isVerifiedCoverageStatus); + return (useMainStore().isNoComp && !useMainStore().issConfig.enableNoCompQuote) + || (!useMainStore().isNoComp + && !useMainStore().isITAC + && (useMainStore().order.currentDeductible == null || !useMainStore().isVerifiedCoverageStatus)); }, paymentMethod() { return this.paymentMethodInternalModel; diff --git a/src/layouts/tpa-submit/tpa-submit.vue b/src/layouts/tpa-submit/tpa-submit.vue index 590a4645..dc19a8d8 100644 --- a/src/layouts/tpa-submit/tpa-submit.vue +++ b/src/layouts/tpa-submit/tpa-submit.vue @@ -192,7 +192,8 @@ export default { return this.getCmsContent(this.widget.footer, widgetFields.FOOTER_WIDGET.FORWARD_BUTTON_TEXT); }, isVerified() { - return useMainStore().order.payment.insuranceCoverage.isVerified; + return !(useMainStore().isNoComp && !useMainStore().enableNoCompQuote) + && useMainStore().order.payment.insuranceCoverage.isVerified; }, currentDeductible() { return useMainStore().order.currentDeductible; diff --git a/src/store/index.js b/src/store/index.js index e4e129ec..03d2f8f2 100644 --- a/src/store/index.js +++ b/src/store/index.js @@ -23,7 +23,7 @@ import { } from '@/helpers/policy-vehicle-helper'; import partTypeStrings from '@/constants/part-type-strings'; import bailoutMessage from '@/constants/bailoutMessage'; -import bailoutCode from "@/constants/bailoutCode"; +import bailoutCode from '@/constants/bailoutCode'; const storeId = 'main'; @@ -238,7 +238,8 @@ export const getDefaultState = () => ({ policyZipCode: null, dateOfLoss: null }, - siteType: null + siteType: null, + enableNoCompQuote: false } }); @@ -265,7 +266,7 @@ export const useMainStore = defineStore({ isClaimAlreadyRegistered: (state) => state.order.payment.insuranceCoverage.claimNumber !== null, isBailout: (state) => state.applicationUser.pageData[issPageValues.BAILOUT_PAGE] != null, bailoutCode: (state) => state.applicationUser.pageData[issPageValues.BAILOUT_PAGE]?.bailoutCode, - isNoComp: (state) => !!state.order.policy.noCoverage, + isNoComp: (s) => !!s.order.policy.noCoverage, isITAC: (state) => !!state.order.policy.isITAC, isVerifiedCoverageStatus: (state) => state.order.payment.insuranceCoverage.coverageStatus === coverageStatuses.VERIFIED, eventBusItem: (state) => (eventCategory, eventSubCategory) => { @@ -2262,13 +2263,13 @@ export const useMainStore = defineStore({ setBailout(bailoutData) { const params = new URL(document.location.toString()).searchParams; - const currentPage = params.get('issPage'); + const currentPage = params.get('issPage'); this.updatePageData({ page: issPageValues.BAILOUT_PAGE, data: { url: window.location.href, - page: currentPage || 'Unknown Page', + page: currentPage || 'Unknown Page', bailoutCode: bailoutData.code, errorMessage: bailoutData.message, submit: false From b2cb23ca18a13be8c15866aff18c6740c89f321d Mon Sep 17 00:00:00 2001 From: Michaela Brydon Date: Wed, 10 Apr 2024 17:35:21 -0400 Subject: [PATCH 02/35] Tidying coverage statement again --- .../coverage-statement-page-variations.js | 8 + .../cart-dropdown/cart-dropdown.vue | 7 +- .../coverage-statement.spec.js | 173 ++++++++++++------ .../coverage-statement/coverage-statement.vue | 156 +++++++++------- 4 files changed, 224 insertions(+), 120 deletions(-) create mode 100644 src/constants/coverage-statement-page-variations.js diff --git a/src/constants/coverage-statement-page-variations.js b/src/constants/coverage-statement-page-variations.js new file mode 100644 index 00000000..1f2039e2 --- /dev/null +++ b/src/constants/coverage-statement-page-variations.js @@ -0,0 +1,8 @@ +const coverageStatementPageVariations = Object.freeze({ + DEDUCTIBLE: 0, + ITAC: 1, + NO_COMP: 2, + UNVERIFIED: 3 +}); + +export default coverageStatementPageVariations; diff --git a/src/iss-components/cart-dropdown/cart-dropdown.vue b/src/iss-components/cart-dropdown/cart-dropdown.vue index e4a85022..11559fb3 100644 --- a/src/iss-components/cart-dropdown/cart-dropdown.vue +++ b/src/iss-components/cart-dropdown/cart-dropdown.vue @@ -212,6 +212,7 @@ export default { baseServicePrice() { return getPriceOfLineItems(this.baseServiceLineItems) ?? 0; }, + // TODO update tests isUnverified() { return (useMainStore().isNoComp && !useMainStore().issConfig.enableNoCompQuote) || (!useMainStore().isNoComp && !useMainStore().isITAC @@ -248,7 +249,7 @@ export default { let result = 0; - if (useMainStore().payment.insuranceCoverage.isVerified) { + if (!this.isUnverified) { if (useMainStore().isITAC || useMainStore().isNoComp) { result += sumTax(this.baseServiceLineItems); } else { @@ -413,10 +414,6 @@ export default { }, getDisplayed(amount) { return this.isUnverified - // && ((useMainStore().isNoComp && !useMainStore().issConfig.enableNoCompQuote) - // || (!useMainStore().isNoComp && !useMainStore().policy.isITAC)) - // && !useMainStore().isNoComp - // && !useMainStore().isITAC ? VERIFYING_COVERAGE : formatAmountInDollars(amount); }, diff --git a/src/layouts/coverage-statement/coverage-statement.spec.js b/src/layouts/coverage-statement/coverage-statement.spec.js index 91ac7ab7..8bbcde26 100644 --- a/src/layouts/coverage-statement/coverage-statement.spec.js +++ b/src/layouts/coverage-statement/coverage-statement.spec.js @@ -10,7 +10,7 @@ import navigationScenarios from '@/router/router-constants/navigation-scenarios. import { getRandomString, getRandomInt } from '@/helpers/data-generation.js'; import settleAllPromises from '@/helpers/layout-helper.js'; import { fetchCmsContentForPage } from '@/helpers/cms-content-helper'; -import { useMainStore } from '@/store/index.js'; +import { useMainStore, getDefaultState } from '@/store'; import getPriceOfLineItems from '@/helpers/price-calculator.js'; jest.mock('@/helpers/layout-helper.js', () => jest.fn()); @@ -90,6 +90,14 @@ function getMountedComponent(mainInitialState = {}, initialData = {}, methodToRu return { wrapper }; } +beforeEach(() => { + const store = useMainStore(); + const defaultState = getDefaultState(); + Object.keys(defaultState).forEach((key) => { + store[key] = defaultState[key]; + }); +}); + describe('coverageStatement.vue-working', () => { test('returns the initial data', () => { // Arrange @@ -164,43 +172,67 @@ describe('coverageStatement.vue-working', () => { }); describe('Computed', () => { describe('verifiedNoComp', () => { - test.each([true, false])('returns false when policyLookupSuccessful false', (isNoComp) => { - // Arrange - const mainInitialState = { - order: { - policy: { - noCoverage: isNoComp, - policyLookupSuccessful: false - } - } - }; - const { wrapper } = getMountedComponent(mainInitialState); + describe('isNoCompQuoteVisible true', () => { + const enableNoCompQuote = true; + test.each([true, false])('returns false when policyLookupSuccessful false', (isNoComp) => { + // Arrange + const mainInitialState = { + order: { + policy: { + noCoverage: isNoComp, + policyLookupSuccessful: false + } + }, + issConfig: { enableNoCompQuote } + }; + const { wrapper } = getMountedComponent(mainInitialState); - // Act - const result = wrapper.vm.verifiedNoComp; + // Act + const result = wrapper.vm.isNoCompQuoteVisible; - // Assert - expect(result).toBeFalsy(); + // Assert + expect(result).toBeFalsy(); + }); + test.each([true, false])('returns false when isNoComp false', (policyLookupSuccessful) => { + // Arrange + const mainInitialState = { + order: { + policy: { + noCoverage: false, + policyLookupSuccessful + } + }, + issConfig: { enableNoCompQuote } + }; + const { wrapper } = getMountedComponent(mainInitialState); + + // Act + const result = wrapper.vm.isNoCompQuoteVisible; + + // Assert + expect(result).toBeFalsy(); + }); + test('returns true when policyLookupSuccessful true, noCoverage true, and enableNoCompQuote true', () => { + // Arrange + const mainInitialState = { + order: { + policy: { + noCoverage: true, + policyLookupSuccessful: true + } + }, + issConfig: { enableNoCompQuote } + }; + const { wrapper } = getMountedComponent(mainInitialState); + + // Act + const result = wrapper.vm.isNoCompQuoteVisible; + + // Assert + expect(result).toBeTruthy(); + }); }); - test.each([true, false])('returns false when isNoComp false', (policyLookupSuccessful) => { - // Arrange - const mainInitialState = { - order: { - policy: { - noCoverage: false, - policyLookupSuccessful - } - } - }; - const { wrapper } = getMountedComponent(mainInitialState); - - // Act - const result = wrapper.vm.verifiedNoComp; - - // Assert - expect(result).toBeFalsy(); - }); - test('returns true when policyLookupSuccessful true and policyLookupSuccessful true', () => { + test('returns false when policyLookupSuccessful true, noCoverage true and enableNoCompQuote false', () => { // Arrange const mainInitialState = { order: { @@ -208,18 +240,21 @@ describe('coverageStatement.vue-working', () => { noCoverage: true, policyLookupSuccessful: true } + }, + issConfig: { + enableNoCompQuote: false } }; const { wrapper } = getMountedComponent(mainInitialState); // Act - const result = wrapper.vm.verifiedNoComp; + const result = wrapper.vm.isNoCompQuoteVisible; // Assert - expect(result).toBeTruthy(); + expect(result).toBeFalsy(); }); }); - describe('verifiedITAC', () => { + describe('isITACQuoteVisible', () => { const priceOfLineItems = 213; test.each([true, false])('returns false when policyLookupSuccessful false', (isNoComp) => { // Arrange @@ -236,7 +271,7 @@ describe('coverageStatement.vue-working', () => { const { wrapper } = getMountedComponent(mainInitialState); // Act - const result = wrapper.vm.verifiedITAC; + const result = wrapper.vm.isITACQuoteVisible; // Assert expect(result).toBeFalsy(); @@ -256,7 +291,7 @@ describe('coverageStatement.vue-working', () => { const { wrapper } = getMountedComponent(mainInitialState); // Act - const result = wrapper.vm.verifiedITAC; + const result = wrapper.vm.isITACQuoteVisible; // Assert expect(result).toBeFalsy(); @@ -281,7 +316,7 @@ describe('coverageStatement.vue-working', () => { const { wrapper } = getMountedComponent(mainInitialState); // Act - const result = wrapper.vm.verifiedITAC; + const result = wrapper.vm.isITACQuoteVisible; // Assert expect(result).toBeFalsy(); @@ -308,7 +343,7 @@ describe('coverageStatement.vue-working', () => { const { wrapper } = getMountedComponent(mainInitialState); // Act - const result = wrapper.vm.verifiedITAC; + const result = wrapper.vm.isITACQuoteVisible; // Assert expect(result).toBeFalsy(); @@ -329,13 +364,13 @@ describe('coverageStatement.vue-working', () => { const { wrapper } = getMountedComponent(mainInitialState); // Act - const result = wrapper.vm.verifiedITAC; + const result = wrapper.vm.isITACQuoteVisible; // Assert expect(result).toBeTruthy(); }); }); - describe('verifiedDeductible', () => { + describe('isDeductibleVisible', () => { const servicePrice = 123; describe('claim registration required', () => { const issConfig = { isClaimRegistrationRequired: true }; @@ -351,7 +386,7 @@ describe('coverageStatement.vue-working', () => { }, policy: { noCoverage: false, - policyLookupSuccessful: false + policyLookupSuccessful: true }, currentDeductible: servicePrice - 1 } @@ -365,7 +400,7 @@ describe('coverageStatement.vue-working', () => { const { wrapper } = getMountedComponent(mainInitialState); // Act - const result = wrapper.vm.verifiedDeductible; + const result = wrapper.vm.isDeductibleVisible; // Assert expect(result).toBeFalsy(); @@ -377,7 +412,7 @@ describe('coverageStatement.vue-working', () => { const { wrapper } = getMountedComponent(mainInitialState); // Act - const result = wrapper.vm.verifiedDeductible; + const result = wrapper.vm.isDeductibleVisible; // Assert expect(result).toBeFalsy(); @@ -387,7 +422,7 @@ describe('coverageStatement.vue-working', () => { const { wrapper } = getMountedComponent(verifiedDeductibleStoreState); // Act - const result = wrapper.vm.verifiedDeductible; + const result = wrapper.vm.isDeductibleVisible; // Assert expect(result).toBeTruthy(); @@ -420,7 +455,7 @@ describe('coverageStatement.vue-working', () => { const { wrapper } = getMountedComponent(mainInitialState); // Act - const result = wrapper.vm.verifiedDeductible; + const result = wrapper.vm.isDeductibleVisible; // Assert expect(result).toBeFalsy(); @@ -430,7 +465,7 @@ describe('coverageStatement.vue-working', () => { const { wrapper } = getMountedComponent(verifiedDeductibleStoreState); // Act - const result = wrapper.vm.verifiedDeductible; + const result = wrapper.vm.isDeductibleVisible; // Assert expect(result).toBeTruthy(); @@ -459,7 +494,7 @@ describe('coverageStatement.vue-working', () => { const { wrapper } = getMountedComponent(storeState); // Act - const result = wrapper.vm.verifiedDeductible; + const result = wrapper.vm.isDeductibleVisible; // Assert expect(result).toBeFalsy(); @@ -486,7 +521,7 @@ describe('coverageStatement.vue-working', () => { const { wrapper } = getMountedComponent(storeState); // Act - const result = wrapper.vm.verifiedDeductible; + const result = wrapper.vm.isDeductibleVisible; // Assert expect(result).toBeFalsy(); @@ -683,7 +718,7 @@ describe('coverageStatement.vue-working', () => { // Assert expect(result).toBeFalsy(); }); - test('returns true when isNoComp true', () => { + test('returns false when isNoComp true and enableNoCompQuote false', () => { // Arrange const mainInitialState = { order: { @@ -692,6 +727,32 @@ describe('coverageStatement.vue-working', () => { noCoverage: true }, currentDeductible: priceOfLineItems + }, + issConfig: { + enableNoCompQuote: false + } + }; + getPriceOfLineItems.mockImplementationOnce(() => priceOfLineItems); + const { wrapper } = getMountedComponent(mainInitialState); + + // Act + const result = wrapper.vm.isQuoteDisplayed; + + // Assert + expect(result).toBeFalsy(); + }); + test('returns true when isNoComp true and enableNoCompQuote true', () => { + // Arrange + const mainInitialState = { + order: { + policy: { + policyLookupSuccessful: true, + noCoverage: true + }, + currentDeductible: priceOfLineItems + }, + issConfig: { + enableNoCompQuote: true } }; getPriceOfLineItems.mockImplementationOnce(() => priceOfLineItems); @@ -1010,6 +1071,9 @@ describe('coverageStatement.vue-working', () => { noCoverage: true, policyLookupSuccessful: true } + }, + issConfig: { + enableNoCompQuote: true } }; const { wrapper } = getMountedComponent(mainInitialState); @@ -1038,6 +1102,9 @@ describe('coverageStatement.vue-working', () => { noCoverage: true, policyLookupSuccessful: true } + }, + issConfig: { + enableNoCompQuote: true } }; const { wrapper } = getMountedComponent(mainInitialState); diff --git a/src/layouts/coverage-statement/coverage-statement.vue b/src/layouts/coverage-statement/coverage-statement.vue index 9f866e2f..86162da5 100644 --- a/src/layouts/coverage-statement/coverage-statement.vue +++ b/src/layouts/coverage-statement/coverage-statement.vue @@ -33,23 +33,23 @@ v-html="secondaryText">
- {{ deductibleForDisplay }} + {{ formatAmountInDollars(deductibleValue) }}
- {{ servicePriceForDisplay }} + {{ formatAmountInDollars(totalServicePrice) }}
{{ deductibleText }}  - {{ deductibleForDisplay }} + {{ formatAmountInDollars(deductibleValue) }}
this.totalServicePrice) { + return pageVariations.ITAC; + } + + if (isClaimRegistrationRequired) { + if (registerClaimSuccessful) { + return pageVariations.DEDUCTIBLE; + } + return pageVariations.UNVERIFIED; + } + return pageVariations.DEDUCTIBLE; + }, coverageStatementSubHeader() { return this.getTextFromCmsWithCustomIfStatements( this.widget.subheader, @@ -249,10 +292,14 @@ export default { ); }, verifiedItacAlertBody() { + const itacCostSavings = this.deductibleValue - this.totalServicePrice; return this.getCmsContent( this.widget.verifiedItacAlert, widgetFields.ALERT_WIDGET.BODY_TEXT - )?.replaceAll('{custom:costSavings}', this.itacCostSavingsForDisplay); + )?.replaceAll( + '{custom:costSavings}', + formatAmountInDollars(itacCostSavings) + ); }, secondaryText() { return this.getTextFromCmsWithCustomIfStatements( @@ -285,50 +332,25 @@ export default { deductibleValue() { return useMainStore().order.currentDeductible; }, - deductibleForDisplay() { - return formatAmountInDollars(this.deductibleValue); + isNoCompQuoteVisible() { + return this.pageVariation === pageVariations.NO_COMP; }, - registerClaimSuccessful() { - return useMainStore().payment.insuranceCoverage.isVerified; + isITACQuoteVisible() { + return this.pageVariation === pageVariations.ITAC; }, - verifiedNoComp() { - return this.policyLookupSuccessful && this.isNoComp && useMainStore().issConfig.enableNoCompQuote; + isDeductibleVisible() { + return this.pageVariation === pageVariations.DEDUCTIBLE; }, - verifiedITAC() { - return this.policyLookupSuccessful - && !this.isNoComp - && this.deductibleValue > this.totalServicePrice; - }, - coveredAndServicePriceAboveOrEqualDeductible() { - return !this.isNoComp && this.totalServicePrice >= this.deductibleValue; - }, - verifiedDeductible() { - return useMainStore().isClaimRegistrationRequired - ? this.registerClaimSuccessful - && this.coveredAndServicePriceAboveOrEqualDeductible - && this.deductibleValue !== null - : this.policyLookupSuccessful - && this.coveredAndServicePriceAboveOrEqualDeductible; - }, - unverified() { - return !this.verifiedDeductible && !this.verifiedITAC && !this.verifiedNoComp; + isUnverifiedVisible() { + return this.pageVariation === pageVariations.UNVERIFIED; }, isADAS() { - const parts = useMainStore().order.lineItems.glassParts; - return parts !== null && !!parts.find((part) => part.requiresRecalibration); + const { glassParts } = useMainStore().order.lineItems; + return glassParts !== null && !!glassParts.find((part) => part.requiresRecalibration); }, totalServicePrice() { return getPriceOfLineItems(this.baseServiceLineItems); }, - servicePriceForDisplay() { - return formatAmountInDollars(this.totalServicePrice); - }, - itacCostSavings() { - return this.deductibleValue - this.totalServicePrice; - }, - itacCostSavingsForDisplay() { - return formatAmountInDollars(this.itacCostSavings); - }, serviceProviderQuestionText() { return this.getCmsContent( this.widget.serviceProviderQuestion, @@ -342,15 +364,23 @@ export default { ); }, isQuoteDisplayed() { - return this.verifiedITAC || this.verifiedNoComp; + return this.isITACQuoteVisible || this.isNoCompQuoteVisible; }, + // TODO can we simplify this shouldRegisterClaim() { - return this.policyLookupSuccessful - && useMainStore().vehicle.policyVehicleId != null - && useMainStore().vehicle.policyVehicleId >= 0 - && useMainStore().isClaimRegistrationRequired - && !useMainStore().isClaimAlreadyRegistered - && (this.coveredAndServicePriceAboveOrEqualDeductible || this.verifiedITAC); + const { + policy, + vehicle, + isClaimRegistrationRequired, + isClaimAlreadyRegistered + } = useMainStore(); + const { policyVehicleId } = vehicle; + return policy.policyLookupSuccessful + && policyVehicleId != null + && policyVehicleId >= 0 + && isClaimRegistrationRequired + && !isClaimAlreadyRegistered + && (this.isDeductibleVisible || this.isITACQuoteVisible); } }, watch: { @@ -373,8 +403,9 @@ export default { return !!useMainStore().vehicle.carId; }, async initializeComponent() { - useMainStore().updatePolicyITACFlag(this.verifiedITAC); - const coverageStatus = this.verifiedITAC || this.verifiedNoComp + useMainStore().updatePolicyITACFlag(this.isITACQuoteVisible); + // TODO how should coverage status be updated + const coverageStatus = this.isITACQuoteVisible || this.isNoCompQuoteVisible ? coverageStatuses.VERIFIED : coverageStatuses.PENDING; useMainStore().updateCoverageStatus(coverageStatus); @@ -384,10 +415,10 @@ export default { this.$refs.loadingModal.hideModal(); }, async navigateForward() { - if (this.unverified || this.verifiedDeductible) { + if (this.isUnverifiedVisible || this.isDeductibleVisible) { useMainStore().updateSupportingItems(this.supportingItems); this.navigateWithScenario(navigationScenarios.CLICKED_FORWARD); - } else if (this.verifiedITAC || this.verifiedNoComp) { + } else if (this.isITACQuoteVisible || this.isNoCompQuoteVisible) { useMainStore().updateIsSafeliteProvider(this.selectedProvider === SAFELITE_PROVIDER); if (this.selectedProvider === SAFELITE_PROVIDER) { useMainStore().updateSupportingItems(this.supportingItems); @@ -411,13 +442,13 @@ export default { getCustomValueFromString(str) { switch (str) { case 'coverageUnverified': - return this.unverified; + return this.isUnverifiedVisible; case 'verifiedDeductible': - return this.verifiedDeductible; + return this.isDeductibleVisible; case 'verifiedITAC': - return this.verifiedITAC; + return this.isITACQuoteVisible; case 'verifiedNoComp': - return this.verifiedNoComp; + return this.isNoCompQuoteVisible; case 'ADASReplace': return !this.isRepair && this.isADAS; case 'nonADASReplace': @@ -425,9 +456,9 @@ export default { case 'nonADASRepair': return this.isRepair; case 'deductibleOverZero': - return this.verifiedDeductible && this.deductibleValue !== 0; // TODO what if deductible is negative? + return this.isDeductibleVisible && this.deductibleValue !== 0; // TODO what if deductible is negative? case 'isDeductibleZero': - return this.verifiedDeductible && this.deductibleValue === 0; + return this.isDeductibleVisible && this.deductibleValue === 0; default: return null; } @@ -437,7 +468,8 @@ export default { }, setBaseServiceLineItems(lineItems) { this.baseServiceLineItems = lineItems; - } + }, + formatAmountInDollars } }; From 954a08972108ca6bdc641be8b164327cd6a9ed99 Mon Sep 17 00:00:00 2001 From: Michaela Brydon Date: Thu, 11 Apr 2024 14:52:17 -0400 Subject: [PATCH 03/35] Removing unnecessary --- .../coverage-statement/coverage-statement.vue | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/src/layouts/coverage-statement/coverage-statement.vue b/src/layouts/coverage-statement/coverage-statement.vue index 86162da5..697bc088 100644 --- a/src/layouts/coverage-statement/coverage-statement.vue +++ b/src/layouts/coverage-statement/coverage-statement.vue @@ -181,7 +181,8 @@ export default { let hasBailedOut = false; let pricingResults = []; - if (useMainStore().policy.policyLookupSuccessful && useMainStore().vehicle.policyVehicleId >= 0) { + const { policy, vehicle } = useMainStore(); + if (policy.policyLookupSuccessful && vehicle.policyVehicleId >= 0) { await useMainStore().getFinalDeductible(); pricingResults = await useMainStore().getPriceOrderItems(availableLineItems) .catch((err) => { @@ -210,12 +211,7 @@ export default { } }, data() { - const { isRepair } = useMainStore().damage; - // const { policyLookupSuccessful } = useMainStore().policy; return { - isRepair, - // policyLookupSuccessful, - isNoComp: useMainStore().isNoComp, baseServiceLineItems: [], selectedProvider: '', deductibleText: 'Your deductible is', @@ -440,6 +436,7 @@ export default { return processIfStatements(rawText, 'custom', this.getCustomValueFromString); }, getCustomValueFromString(str) { + const { isRepair } = useMainStore().damage; switch (str) { case 'coverageUnverified': return this.isUnverifiedVisible; @@ -450,11 +447,11 @@ export default { case 'verifiedNoComp': return this.isNoCompQuoteVisible; case 'ADASReplace': - return !this.isRepair && this.isADAS; + return !isRepair && this.isADAS; case 'nonADASReplace': - return !this.isRepair && !this.isADAS; + return !isRepair && !this.isADAS; case 'nonADASRepair': - return this.isRepair; + return isRepair; case 'deductibleOverZero': return this.isDeductibleVisible && this.deductibleValue !== 0; // TODO what if deductible is negative? case 'isDeductibleZero': From beadf916a2eff6efaba77eec1137397788de7120 Mon Sep 17 00:00:00 2001 From: Michaela Brydon Date: Thu, 11 Apr 2024 15:28:30 -0400 Subject: [PATCH 04/35] Adding is unverified to store --- .../cart-dropdown/cart-dropdown.vue | 10 ++-------- src/layouts/payment-method/payment-method.vue | 8 +------- src/layouts/tpa-submit/tpa-submit.vue | 3 +-- src/store/index.js | 18 ++++++++++++++++++ 4 files changed, 22 insertions(+), 17 deletions(-) diff --git a/src/iss-components/cart-dropdown/cart-dropdown.vue b/src/iss-components/cart-dropdown/cart-dropdown.vue index 11559fb3..fea8ad4c 100644 --- a/src/iss-components/cart-dropdown/cart-dropdown.vue +++ b/src/iss-components/cart-dropdown/cart-dropdown.vue @@ -212,12 +212,6 @@ export default { baseServicePrice() { return getPriceOfLineItems(this.baseServiceLineItems) ?? 0; }, - // TODO update tests - isUnverified() { - return (useMainStore().isNoComp && !useMainStore().issConfig.enableNoCompQuote) - || (!useMainStore().isNoComp && !useMainStore().isITAC - && (this.deductible == null || !useMainStore().isVerifiedCoverageStatus)); - }, subTotal() { const { supportingItems, glassParts, otherParts, vaps, mobileFee } = useMainStore().lineItems; const allLineItems = [ @@ -249,7 +243,7 @@ export default { let result = 0; - if (!this.isUnverified) { + if (!useMainStore().isUnverified) { if (useMainStore().isITAC || useMainStore().isNoComp) { result += sumTax(this.baseServiceLineItems); } else { @@ -413,7 +407,7 @@ export default { this.isExpanded = !this.isExpanded; }, getDisplayed(amount) { - return this.isUnverified + return useMainStore().isUnverified ? VERIFYING_COVERAGE : formatAmountInDollars(amount); }, diff --git a/src/layouts/payment-method/payment-method.vue b/src/layouts/payment-method/payment-method.vue index 1fbd3d62..a743b180 100644 --- a/src/layouts/payment-method/payment-method.vue +++ b/src/layouts/payment-method/payment-method.vue @@ -177,13 +177,7 @@ export default { const piaExperience = this.getSettingValue(experimentSettings.ISS_DISPLAY_PAY_IN_ADVANCE); const isEnabled = piaExperience === 'true'; - return !isEnabled || this.isUnverified; - }, - isUnverified() { - return (useMainStore().isNoComp && !useMainStore().issConfig.enableNoCompQuote) - || (!useMainStore().isNoComp - && !useMainStore().isITAC - && (useMainStore().order.currentDeductible == null || !useMainStore().isVerifiedCoverageStatus)); + return !isEnabled || useMainStore().isUnverified; }, paymentMethod() { return this.paymentMethodInternalModel; diff --git a/src/layouts/tpa-submit/tpa-submit.vue b/src/layouts/tpa-submit/tpa-submit.vue index dc19a8d8..590a4645 100644 --- a/src/layouts/tpa-submit/tpa-submit.vue +++ b/src/layouts/tpa-submit/tpa-submit.vue @@ -192,8 +192,7 @@ export default { return this.getCmsContent(this.widget.footer, widgetFields.FOOTER_WIDGET.FORWARD_BUTTON_TEXT); }, isVerified() { - return !(useMainStore().isNoComp && !useMainStore().enableNoCompQuote) - && useMainStore().order.payment.insuranceCoverage.isVerified; + return useMainStore().order.payment.insuranceCoverage.isVerified; }, currentDeductible() { return useMainStore().order.currentDeductible; diff --git a/src/store/index.js b/src/store/index.js index 03d2f8f2..3fd9dd4c 100644 --- a/src/store/index.js +++ b/src/store/index.js @@ -268,6 +268,24 @@ export const useMainStore = defineStore({ bailoutCode: (state) => state.applicationUser.pageData[issPageValues.BAILOUT_PAGE]?.bailoutCode, isNoComp: (s) => !!s.order.policy.noCoverage, isITAC: (state) => !!state.order.policy.isITAC, + isUnverified: (s) => { + const { policyLookupSuccessful, payment, currentDeductible } = s.order; + const registerClaimSuccessful = payment.insuranceCoverage.isVerified; + if (!policyLookupSuccessful) { + return true; + } + if (s.isNoComp && !s.issConfig.enableNoCompQuote) { + return true; + } + if (!s.isNoComp && currentDeductible == null) { + return true; + } + if (s.isClaimRegistrationRequired && !registerClaimSuccessful) { + return true; + } + return false; + }, + // TODO condense verification logic isVerifiedCoverageStatus: (state) => state.order.payment.insuranceCoverage.coverageStatus === coverageStatuses.VERIFIED, eventBusItem: (state) => (eventCategory, eventSubCategory) => { const matchedEvent = state.applicationUser.eventBus.find(({ category, subCategory }) => category === eventCategory && subCategory === eventSubCategory); From 4747165e16aba6b6fae57d6793c575a6c7057bbe Mon Sep 17 00:00:00 2001 From: Michaela Brydon Date: Thu, 11 Apr 2024 15:36:25 -0400 Subject: [PATCH 05/35] Reverting --- src/iss-components/cart-dropdown/cart-dropdown.vue | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/iss-components/cart-dropdown/cart-dropdown.vue b/src/iss-components/cart-dropdown/cart-dropdown.vue index fea8ad4c..5d1505e0 100644 --- a/src/iss-components/cart-dropdown/cart-dropdown.vue +++ b/src/iss-components/cart-dropdown/cart-dropdown.vue @@ -408,6 +408,8 @@ export default { }, getDisplayed(amount) { return useMainStore().isUnverified + && !useMainStore().isNoComp + && !useMainStore().isITAC ? VERIFYING_COVERAGE : formatAmountInDollars(amount); }, From e3cb1ef37abb8f28432c578b841536577c7a0d56 Mon Sep 17 00:00:00 2001 From: Michaela Brydon Date: Thu, 11 Apr 2024 15:43:12 -0400 Subject: [PATCH 06/35] Removing comment --- src/layouts/entry-page/entry-page.vue | 1 - 1 file changed, 1 deletion(-) diff --git a/src/layouts/entry-page/entry-page.vue b/src/layouts/entry-page/entry-page.vue index 5443ee37..b2da8ab2 100644 --- a/src/layouts/entry-page/entry-page.vue +++ b/src/layouts/entry-page/entry-page.vue @@ -105,7 +105,6 @@ export default { try { if (data.clientFlags) { const clientFlags = JSON.parse(data.clientFlags); - console.log(clientFlags); if (clientFlags.TPAEnabled) { this.mainStore.issConfig.enableTPAFlow = true; From e3852f2b7b85f828f34db36fa4d170fa83295016 Mon Sep 17 00:00:00 2001 From: Michaela Brydon Date: Thu, 11 Apr 2024 16:26:33 -0400 Subject: [PATCH 07/35] Updating shouldRegisterClaim tests --- src/layouts/coverage-statement/coverage-statement.spec.js | 6 +++++- src/layouts/coverage-statement/coverage-statement.vue | 1 - 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/layouts/coverage-statement/coverage-statement.spec.js b/src/layouts/coverage-statement/coverage-statement.spec.js index 8bbcde26..36dde95e 100644 --- a/src/layouts/coverage-statement/coverage-statement.spec.js +++ b/src/layouts/coverage-statement/coverage-statement.spec.js @@ -773,7 +773,10 @@ describe('coverageStatement.vue-working', () => { shouldRegisterClaimStoreStateItac = { order: { payment: { - insuranceCoverage: { claimNumber: null } + insuranceCoverage: { + claimNumber: null, + isVerified: true // Added + } }, policy: { policyLookupSuccessful: true, @@ -862,6 +865,7 @@ describe('coverageStatement.vue-working', () => { // Assert expect(result).toBeFalsy(); }); + test('returns false when insuranceCoverage not verified', () => {}); describe('returns true when policy lookup success, vehicleId set to %p, claim reg req, claim not yet reg', () => { test('and itac', () => { // Arrange diff --git a/src/layouts/coverage-statement/coverage-statement.vue b/src/layouts/coverage-statement/coverage-statement.vue index 697bc088..d63bc50b 100644 --- a/src/layouts/coverage-statement/coverage-statement.vue +++ b/src/layouts/coverage-statement/coverage-statement.vue @@ -362,7 +362,6 @@ export default { isQuoteDisplayed() { return this.isITACQuoteVisible || this.isNoCompQuoteVisible; }, - // TODO can we simplify this shouldRegisterClaim() { const { policy, From 5e3fe3341463bd6092239f2b8b48a87862358bb1 Mon Sep 17 00:00:00 2001 From: Katie Kroell Date: Thu, 11 Apr 2024 16:34:04 -0400 Subject: [PATCH 08/35] order-confirmation cart WIP --- .../cart-dropdown/cart-dropdown.vue | 113 +++++++++++++++++- .../order-confirmation/order-confirmation.vue | 34 +++++- 2 files changed, 140 insertions(+), 7 deletions(-) diff --git a/src/iss-components/cart-dropdown/cart-dropdown.vue b/src/iss-components/cart-dropdown/cart-dropdown.vue index c1d148bd..4e7163b1 100644 --- a/src/iss-components/cart-dropdown/cart-dropdown.vue +++ b/src/iss-components/cart-dropdown/cart-dropdown.vue @@ -171,6 +171,11 @@ export default { recyclingModalCmsWidgetName: String, availableVaps: Array }, + setup() { + const mainStore = useMainStore(); + const { submittedOrder } = mainStore; + return { mainStore, submittedOrder }; + }, data() { return { isExpanded: false, @@ -191,16 +196,35 @@ export default { computed: { deductible() { // Note: added as computed so it can be used in the template. + if (this.submittedOrder) { + return this.submittedOrder.currentDeductible; + } return useMainStore().order.currentDeductible; }, showDeductibleCartItem() { + if (this.submittedOrder) { + return this.submittedOrder.policy.noCoverage === false && this.submittedOrder.policy.isITAC === false; + } return !useMainStore().isNoComp && !useMainStore().isITAC; }, recycleFeeLineItem() { + if (this.submittedOrder) { + return this.submittedOrder.lineItems.supportingItems + ?.find((lineItem) => lineItem.partNumber === partNumberStrings.RECYCLE_FEE); + } return useMainStore().lineItems.supportingItems ?.find((lineItem) => lineItem.partNumber === partNumberStrings.RECYCLE_FEE); }, baseServiceLineItems() { + if (this.submittedOrder) { + const { supportingItems, glassParts, otherParts } = this.submittedOrder.lineItems; + const parts = [ + ...(supportingItems ?? []), + ...(glassParts ?? []), + ...(otherParts ?? []) + ]; + return parts.filter((part) => part !== this.recycleFeeLineItem); + } const { supportingItems, glassParts, otherParts } = useMainStore().lineItems; const parts = [ ...(supportingItems ?? []), @@ -213,10 +237,27 @@ export default { return getPriceOfLineItems(this.baseServiceLineItems) ?? 0; }, isUnverified() { - return !useMainStore().isNoComp && !useMainStore().isITAC - && (this.deductible == null || !useMainStore().isVerifiedCoverageStatus); + if (this.submittedOrder) { + return this.submittedOrder.policy.noCoverage === false && this.submittedOrder.policy.isITAC === false + && (this.submittedOrder.currentDeductible == null || this.submittedOrder.payment.isVerified === false); + } return !useMainStore().isNoComp && !useMainStore().isITAC + && (this.deductible == null || !useMainStore().isVerifiedCoverageStatus); }, subTotal() { + if (this.submittedOrder) { + const { supportingItems, glassParts, otherParts, vaps, mobileFee } = this.submittedOrder.lineItems; + const allLineItems = [ + ...(supportingItems ?? []), + ...(glassParts ?? []), + ...(otherParts ?? []), + ...(vaps ?? []), + mobileFee + ]; + return this.submittedOrder.policy.noCoverage === false && this.submittedOrder.policy.isITAC === false + ? this.deductible + getPriceOfLineItems([...this.feeLineItems, ...(vaps ?? [])]) + : getPriceOfLineItems(allLineItems); + } + const { supportingItems, glassParts, otherParts, vaps, mobileFee } = useMainStore().lineItems; const allLineItems = [ ...(supportingItems ?? []), @@ -230,6 +271,17 @@ export default { : getPriceOfLineItems(allLineItems); }, feeLineItems() { + if (this.submittedOrder) { + const { mobileFee } = this.submittedOrder.lineItems; + const result = []; + if (mobileFee) { + result.push(mobileFee); + } + if (this.recycleFeeLineItem) { + result.push(this.recycleFeeLineItem); + } + return result; + } const { mobileFee } = useMainStore().lineItems; const result = []; if (mobileFee) { @@ -247,6 +299,19 @@ export default { let result = 0; + if (this.submittedOrder) { + if (this.submittedOrder.payment.insuranceCoverage.isVerified) { + if (this.submittedOrder.policy.isITAC || this.submittedOrder.policy.noCoverage) { + result += sumTax(this.baseServiceLineItems); + } else { + // deductible-case need to show tax for Recycle Fee + result += this.recycleFeeLineItem?.salesTax ?? 0; + } + } + result += sumTax(this.submittedOrder.lineItems.vaps ?? []); + + return result; + } if (useMainStore().payment.insuranceCoverage.isVerified) { if (useMainStore().isITAC || useMainStore().isNoComp) { result += sumTax(this.baseServiceLineItems); @@ -266,6 +331,19 @@ export default { : this.subTotal + this.salesTax; }, availableLineItems() { + if (this.submittedOrder) { + const { supportingItems, glassParts, otherParts, mobileFee } = this.submittedOrder.lineItems; + const result = [ + ...(supportingItems ?? []), + ...(glassParts ?? []), + ...(otherParts ?? []), + ...(this.availableVaps ?? []) + ]; + if (mobileFee) { + result.push(mobileFee); + } + return result; + } const { supportingItems, glassParts, otherParts, mobileFee } = useMainStore().lineItems; const result = [ ...(supportingItems ?? []), @@ -279,6 +357,16 @@ export default { return result; }, servicePackageTier() { + if (this.submittedOrder) { + const { glassToReplace, isRepair } = this.submittedOrder.damage; + const { vaps } = this.submittedOrder.lineItems; + return getHighestFullySatisfiedTier( + glassToReplace ?? [], + this.availableLineItems, + isRepair, + vaps ?? [] + ); + } const { glassToReplace, isRepair } = useMainStore().damage; const { vaps } = useMainStore().lineItems; return getHighestFullySatisfiedTier( @@ -367,10 +455,16 @@ export default { return this.getCmsContent(this.widget.salesTax, widgetFields.TEXT_BLOCK_WIDGET.TEXT); }, servicePackageNames() { - return this.getCmsContent( + const test = this.getCmsContent( this.widget.servicePackage, widgetFields.INPUT_QUESTION_WIDGET.ANSWERS ); + console.log(test); + return test; + // return this.getCmsContent( + // this.widget.servicePackage, + // widgetFields.INPUT_QUESTION_WIDGET.ANSWERS + // ); }, servicePackageLabelWidget() { if (!this.servicePackageNames) { @@ -411,6 +505,13 @@ export default { this.isExpanded = !this.isExpanded; }, getDisplayed(amount) { + if (this.submittedOrder) { + return this.isUnverified + && this.submittedOrder.policy.noCoverage === false + && this.submittedOrder.policy.isITAC === false + ? VERIFYING_COVERAGE + : formatAmountInDollars(amount); + } return this.isUnverified && !useMainStore().isNoComp && !useMainStore().isITAC @@ -436,6 +537,12 @@ export default { return cartItem; }, getCartItemForVapsPart(partType) { + if (this.submittedOrder) { + const label = this.getCmsContentForVapsType(partType); + const lineItems = this.submittedOrder.lineItems.vaps + ?.filter((vapsLineItem) => vapsLineItem.partType === partType) ?? []; + return this.getCartItem(label, lineItems, cartItemType.VAP, partType); + } const label = this.getCmsContentForVapsType(partType); const lineItems = useMainStore().lineItems.vaps ?.filter((vapsLineItem) => vapsLineItem.partType === partType) ?? []; diff --git a/src/layouts/order-confirmation/order-confirmation.vue b/src/layouts/order-confirmation/order-confirmation.vue index c045f651..573ba695 100644 --- a/src/layouts/order-confirmation/order-confirmation.vue +++ b/src/layouts/order-confirmation/order-confirmation.vue @@ -47,6 +47,14 @@ v-html="appointmentWordingText2"> +
+ +
@@ -327,6 +327,12 @@ export default { }, displayServiceableMobileOnly() { return this.isServiceableMobile && !this.isServiceableInshop; + }, + navigateBackScenario() { + const { isNoComp, isITAC } = useMainStore(); + return isNoComp || isITAC + ? this.navigationScenarios.CLICKED_BACK_CANNOT_REACH_TPA_FLOW + : this.navigationScenarios.CLICKED_BACK_CAN_REACH_TPA_FLOW; } }, methods: { diff --git a/src/mixins/base-mixin.js b/src/mixins/base-mixin.js index 53f316ee..78869119 100644 --- a/src/mixins/base-mixin.js +++ b/src/mixins/base-mixin.js @@ -28,10 +28,10 @@ export default { const footerInfoBox = document.querySelector('.footer#infoBox'); return footerInfoBox ? footerInfoBox.offsetHeight : 0; }, - navigateBack(vm) { + navigateBack(vm, scenario = this.navigationScenarios.CLICKED_BACK) { const self = vm ?? this; - self.$router.navigateWithSpinner(this.navigationScenarios.CLICKED_BACK, self.$route); + self.$router.navigateWithSpinner(scenario, self.$route); }, savePageDataToStore(page, data) { useMainStore().updatePageData({ page, data }); diff --git a/src/router/router-constants/navigation-scenarios.js b/src/router/router-constants/navigation-scenarios.js index bd079640..8bc295df 100644 --- a/src/router/router-constants/navigation-scenarios.js +++ b/src/router/router-constants/navigation-scenarios.js @@ -80,6 +80,10 @@ const navigationScenarios = Object.freeze({ EDIT_PREFERRED_SHOP: 'EDIT_PREFERRED_SHOP', EDIT_CONTACT_DETAILS: 'EDIT_CONTACT_DETAILS', + // Service location + CLICKED_BACK_CANNOT_REACH_TPA_FLOW: 'CLICKED_BACK_CANNOT_REACH_TPA_FLOW', + CLICKED_BACK_CAN_REACH_TPA_FLOW: 'CLICKED_BACK_CAN_REACH_TPA_FLOW', + // Provider Preference CLICKED_FORWARD_WITH_SAFELITE: 'CLICKED_FORWARD_WITH_SAFELITE', CLICKED_FORWARD_WITH_TPA_ENABLED: 'CLICKED_FORWARD_WITH_TPA_ENABLED', diff --git a/src/router/router-constants/routing-table.js b/src/router/router-constants/routing-table.js index 405eceea..a005582f 100644 --- a/src/router/router-constants/routing-table.js +++ b/src/router/router-constants/routing-table.js @@ -559,7 +559,11 @@ const routingTable = () => [ issPageValue: issPageValues.SERVICE_LOCATION, maps: [ { - scenario: navigationScenarios.CLICKED_BACK, + scenario: navigationScenarios.CLICKED_BACK_CANNOT_REACH_TPA_FLOW, + destinationIssPageValue: issPageValues.COVERAGE_STATEMENT + }, + { + scenario: navigationScenarios.CLICKED_BACK_CAN_REACH_TPA_FLOW, destinationIssPageValue: issPageValues.PROVIDER_PREFERENCE }, { From f68421a65fef9ff27a972cb0ede0844c1fc39dc9 Mon Sep 17 00:00:00 2001 From: Katie Kroell Date: Tue, 16 Apr 2024 10:14:04 -0400 Subject: [PATCH 19/35] add prop --- src/iss-components/cart-dropdown/cart-dropdown.vue | 8 ++------ src/layouts/order-confirmation/order-confirmation.vue | 5 ++--- 2 files changed, 4 insertions(+), 9 deletions(-) diff --git a/src/iss-components/cart-dropdown/cart-dropdown.vue b/src/iss-components/cart-dropdown/cart-dropdown.vue index 24d585f3..aa422d5f 100644 --- a/src/iss-components/cart-dropdown/cart-dropdown.vue +++ b/src/iss-components/cart-dropdown/cart-dropdown.vue @@ -169,12 +169,8 @@ export default { showAsPaid: Boolean, readOnly: Boolean, recyclingModalCmsWidgetName: String, - availableVaps: Array - }, - setup() { - const mainStore = useMainStore(); - const { submittedOrder } = mainStore; - return { mainStore, submittedOrder }; + availableVaps: Array, + submittedOrder: Object }, data() { return { diff --git a/src/layouts/order-confirmation/order-confirmation.vue b/src/layouts/order-confirmation/order-confirmation.vue index be6db578..853e4193 100644 --- a/src/layouts/order-confirmation/order-confirmation.vue +++ b/src/layouts/order-confirmation/order-confirmation.vue @@ -53,7 +53,8 @@ :readOnly="true" recyclingModalCmsWidgetName="RecycleModal" servicePackageTitleWidgetName="ServicePackageTitle" - :availableVaps="selectedVaps" /> + :availableVaps="selectedVaps" + :submittedOrder="submittedOrder" />