From 7711842ae45f13f2e299930864938eb02fb5709f Mon Sep 17 00:00:00 2001 From: Sneha Date: Wed, 10 May 2023 19:36:38 +0530 Subject: [PATCH 1/2] SSR-418 Vehicle selection --- src/constants/error-messages.js | 7 +- .../make-question/make-question.vue | 76 ++++++++ .../model-question/model-question.vue | 77 ++++++++ .../style-question/style-question.vue | 76 ++++++++ .../vehicle-selection/vehicle-selection.vue | 183 ++++++++++++++++++ .../year-question/year-question.vue | 63 ++++++ src/router/router-constants/issPage-values.js | 1 + src/router/router-constants/routing-table.js | 17 +- 8 files changed, 497 insertions(+), 3 deletions(-) create mode 100644 src/layouts/vehicle-selection/make-question/make-question.vue create mode 100644 src/layouts/vehicle-selection/model-question/model-question.vue create mode 100644 src/layouts/vehicle-selection/style-question/style-question.vue create mode 100644 src/layouts/vehicle-selection/vehicle-selection.vue create mode 100644 src/layouts/vehicle-selection/year-question/year-question.vue diff --git a/src/constants/error-messages.js b/src/constants/error-messages.js index 3fcd5848..11e1d050 100644 --- a/src/constants/error-messages.js +++ b/src/constants/error-messages.js @@ -37,7 +37,12 @@ const errorMessages = { POLICYHOLDER_FIRST_NAME_REQUIRED: "Please enter the policyholder first name", POLICYHOLDER_LAST_NAME_REQUIRED: "Please enter the policyholder last name", - ACKNOWLEDGEMENT_REQUIRED: "You must agree to the terms to continue" + ACKNOWLEDGEMENT_REQUIRED: "You must agree to the terms to continue", + + YEAR_REQUIRED: "Please select your vehicle year", + MAKE_REQUIRED: "Please select your vehicle make", + MODEL_REQUIRED: "Please select your vehicle model", + STYLE_REQUIRED: "Please select your vehicle style" }; diff --git a/src/layouts/vehicle-selection/make-question/make-question.vue b/src/layouts/vehicle-selection/make-question/make-question.vue new file mode 100644 index 00000000..1ab0e45d --- /dev/null +++ b/src/layouts/vehicle-selection/make-question/make-question.vue @@ -0,0 +1,76 @@ + + + diff --git a/src/layouts/vehicle-selection/model-question/model-question.vue b/src/layouts/vehicle-selection/model-question/model-question.vue new file mode 100644 index 00000000..e1cb2a75 --- /dev/null +++ b/src/layouts/vehicle-selection/model-question/model-question.vue @@ -0,0 +1,77 @@ + + + diff --git a/src/layouts/vehicle-selection/style-question/style-question.vue b/src/layouts/vehicle-selection/style-question/style-question.vue new file mode 100644 index 00000000..b957d923 --- /dev/null +++ b/src/layouts/vehicle-selection/style-question/style-question.vue @@ -0,0 +1,76 @@ + + + diff --git a/src/layouts/vehicle-selection/vehicle-selection.vue b/src/layouts/vehicle-selection/vehicle-selection.vue new file mode 100644 index 00000000..cb53c2ea --- /dev/null +++ b/src/layouts/vehicle-selection/vehicle-selection.vue @@ -0,0 +1,183 @@ + + + diff --git a/src/layouts/vehicle-selection/year-question/year-question.vue b/src/layouts/vehicle-selection/year-question/year-question.vue new file mode 100644 index 00000000..97ba0090 --- /dev/null +++ b/src/layouts/vehicle-selection/year-question/year-question.vue @@ -0,0 +1,63 @@ + + + \ No newline at end of file diff --git a/src/router/router-constants/issPage-values.js b/src/router/router-constants/issPage-values.js index 9cbbdfbc..763994ac 100644 --- a/src/router/router-constants/issPage-values.js +++ b/src/router/router-constants/issPage-values.js @@ -29,6 +29,7 @@ export const issPageValues = { VEHICLE_PARTS: 'vehicle-parts', VEHICLE_STYLE: 'vehicle-style', VEHICLE_YEAR: 'vehicle-year', + VEHICLE_SELECTION: 'vehicle-selection', VIN_LOOKUP: 'vin-lookup', TPA_SUBMIT: 'tpa-submit', BAILOUT_PAGE: 'bailout-page', diff --git a/src/router/router-constants/routing-table.js b/src/router/router-constants/routing-table.js index e6c25ae6..d9df9162 100644 --- a/src/router/router-constants/routing-table.js +++ b/src/router/router-constants/routing-table.js @@ -4,6 +4,19 @@ import { navigationScenarios } from '@/router/router-constants/navigation-scenar // Get store from router/index.js instead of importing it here to get updated values const routingTable = function(store) { return [ + { + issPageValue: issPageValues.VEHICLE_SELECTION, + maps: [ + { + scenario: navigationScenarios.CLICKED_BACK, + destinationIssPageValue: issPageValues.POLICY_HOLDER_DETAILS + }, + { + scenario: navigationScenarios.CLICKED_FORWARD, + destinationIssPageValue: issPageValues.VEHICLE_DAMAGE + } + ] + }, { issPageValue: issPageValues.VEHICLE_YEAR, maps: [ @@ -61,7 +74,7 @@ const routingTable = function(store) { maps: [ { scenario: navigationScenarios.CLICKED_BACK, - destinationIssPageValue: issPageValues.VEHICLE_STYLE + destinationIssPageValue: issPageValues.VEHICLE_SELECTION }, { scenario: navigationScenarios.CLICKED_FORWARD_WITH_REPAIR, @@ -389,7 +402,7 @@ const routingTable = function(store) { }, { scenario: navigationScenarios.CLICKED_FORWARD_POLICY_UNVERIFIED, - destinationIssPageValue: issPageValues.VEHICLE_YEAR + destinationIssPageValue: issPageValues.VEHICLE_SELECTION }, { scenario: navigationScenarios.CLICKED_FORWARD_POLICY_VERIFIED, From ca2181c2da036a56eaacf45d13bc006c61c39056 Mon Sep 17 00:00:00 2001 From: Sneha Date: Wed, 10 May 2023 20:02:18 +0530 Subject: [PATCH 2/2] Update routing-table.js --- src/router/router-constants/routing-table.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/router/router-constants/routing-table.js b/src/router/router-constants/routing-table.js index d9df9162..65dcf571 100644 --- a/src/router/router-constants/routing-table.js +++ b/src/router/router-constants/routing-table.js @@ -74,7 +74,7 @@ const routingTable = function(store) { maps: [ { scenario: navigationScenarios.CLICKED_BACK, - destinationIssPageValue: issPageValues.VEHICLE_SELECTION + destinationIssPageValue: issPageValues.VEHICLE_STYLE }, { scenario: navigationScenarios.CLICKED_FORWARD_WITH_REPAIR, @@ -402,7 +402,7 @@ const routingTable = function(store) { }, { scenario: navigationScenarios.CLICKED_FORWARD_POLICY_UNVERIFIED, - destinationIssPageValue: issPageValues.VEHICLE_SELECTION + destinationIssPageValue: issPageValues.VEHICLE_YEAR }, { scenario: navigationScenarios.CLICKED_FORWARD_POLICY_VERIFIED,