From 89e852f3d1795c2f56c165ae395d6e0a5dd0f806 Mon Sep 17 00:00:00 2001 From: brydon1 Date: Thu, 14 Sep 2023 16:19:56 -0400 Subject: [PATCH] Adding dupe check to iss flow --- .../site-sub-header/site-sub-header.vue | 2 +- .../contact-details/contact-details.vue | 1 - .../duplicate-check/duplicate-check.spec.js | 0 .../duplicate-check/duplicate-check.vue | 169 ++++++++++++++++++ src/layouts/welcome-page/welcome-page.vue | 1 + src/router/router-constants/issPage-values.js | 1 + src/router/router-constants/routing-table.js | 28 +++ src/store/index.js | 3 +- 8 files changed, 202 insertions(+), 3 deletions(-) create mode 100644 src/layouts/duplicate-check/duplicate-check.spec.js create mode 100644 src/layouts/duplicate-check/duplicate-check.vue diff --git a/src/iss-components/site-sub-header/site-sub-header.vue b/src/iss-components/site-sub-header/site-sub-header.vue index 4cd0af1d..5c604cae 100644 --- a/src/iss-components/site-sub-header/site-sub-header.vue +++ b/src/iss-components/site-sub-header/site-sub-header.vue @@ -16,7 +16,7 @@
+ :class="justifySubheader ">

diff --git a/src/layouts/contact-details/contact-details.vue b/src/layouts/contact-details/contact-details.vue index 6967c2db..184a0a8d 100644 --- a/src/layouts/contact-details/contact-details.vue +++ b/src/layouts/contact-details/contact-details.vue @@ -13,7 +13,6 @@ +

+
+
+ +
+ + + + + +
+
+
+
+ + + + + \ No newline at end of file diff --git a/src/layouts/welcome-page/welcome-page.vue b/src/layouts/welcome-page/welcome-page.vue index c1964c7f..4de1f64d 100644 --- a/src/layouts/welcome-page/welcome-page.vue +++ b/src/layouts/welcome-page/welcome-page.vue @@ -337,6 +337,7 @@ export default { this.mainStore.order.serviceLocation.zipCode = policy.insureds?.[0]?.zipCode; // populate vehicles + this.mainStore.order.policy.vehicles = policy.vehicles; this.vehiclesFound = policy.vehicles; } return this.navigateForward(policy); diff --git a/src/router/router-constants/issPage-values.js b/src/router/router-constants/issPage-values.js index d79f748f..7f511089 100644 --- a/src/router/router-constants/issPage-values.js +++ b/src/router/router-constants/issPage-values.js @@ -9,6 +9,7 @@ const issPageValues = Object.freeze({ CAPABILITY_QUESTIONS: 'capability-questions', CONTACT_CONFIRMATION: 'contact-confirmation', CONTACT_DETAILS: 'contact-details', + DUPLICATE_CHECK: 'duplicate-check', ESTIMATE: 'estimate', COVERAGE_STATEMENT: 'coverage-statement', LICENSE_PLATE_LOOKUP: 'license-plate-lookup', diff --git a/src/router/router-constants/routing-table.js b/src/router/router-constants/routing-table.js index 0d999da5..df2b492f 100644 --- a/src/router/router-constants/routing-table.js +++ b/src/router/router-constants/routing-table.js @@ -370,6 +370,34 @@ const routingTable = () => [ } ] }, + { + issPageValue: issPageValues.DUPLICATE_CHECK, + maps: [ + { + scenario: navigationScenarios.CLICKED_BACK, + destinationIssPageValue: issPageValues.WELCOME_PAGE + }, + // TODO confirm all listed scenarios work + { + scenario: navigationScenarios.CLICKED_FORWARD_POLICY_UNVERIFIED, + destinationIssPageValue: issPageValues.POLICY_HOLDER_DETAILS + }, + { + scenario: navigationScenarios.CLICKED_FORWARD_POLICY_VERIFIED_NO_VEHICLES, + destinationIssPageValue: issPageValues.VEHICLE_SELECTION + }, + { + scenario: navigationScenarios.CLICKED_FORWARD_POLICY_VERIFIED_WITH_VEHICLES, + destinationIssPageValue: issPageValues.POLICY_VEHICLES + }, + // if previous claim selected + // unverified => policyholder details + // verified => policy-vehicle page + // new claim + // lookup fails => policyholder details + // lookup succeeds => policy-vehicle page + ] + }, { issPageValue: issPageValues.POLICY_HOLDER_DETAILS, maps: [ diff --git a/src/store/index.js b/src/store/index.js index a2bfbcd7..4c0871da 100644 --- a/src/store/index.js +++ b/src/store/index.js @@ -58,7 +58,8 @@ const getDefaultState = () => ({ deductible: { repair: null, // numerical value; how much customer owes on deductible in repair case replace: null // numerical value; how much customer owes on deductible in replace case, - } + }, + vehicles: [] }, customer: { address: {