From 3c22e2cb4e93d01f3a68824abfd2dd0b7d1326fb Mon Sep 17 00:00:00 2001 From: Bryan Mauger Date: Wed, 13 Jul 2022 17:33:50 -0400 Subject: [PATCH] Updates to remove vin-lookup from PR. --- jest.config.js | 1 + .../button-question/button-question.vue | 6 +- src/layouts/quote/quote.vue | 116 +++++++++- src/router/index.js | 8 + src/router/router-constants/fmgPage-values.js | 1 + src/router/router-constants/routing-table.js | 9 +- .../list-button-horizontal.vue | 200 +++++++++++++----- 7 files changed, 275 insertions(+), 66 deletions(-) diff --git a/jest.config.js b/jest.config.js index 0a063507d..27656cd80 100644 --- a/jest.config.js +++ b/jest.config.js @@ -16,6 +16,7 @@ module.exports = { "!src/layouts/reveal/**/*.vue", "!src/ux-components/text-link/**/*.vue", "!src/common-components/question-chain/**/*.vue", + "!src/layouts/quote/**/*.vue", // END ], // ! means exclude from coverage. testMatch: ["**/*.spec.(js|jsx|ts|tsx)|**/__tests__/*.(js|jsx|ts|tsx)"], diff --git a/src/common-components/button-question/button-question.vue b/src/common-components/button-question/button-question.vue index 2ea6d1c3a..b1d026023 100644 --- a/src/common-components/button-question/button-question.vue +++ b/src/common-components/button-question/button-question.vue @@ -25,6 +25,7 @@ :loaderColor="loaderColor" :loaderPosition="loaderPosition" :isWide=isWide + :isCashOrInsurance=isCashOrInsurance :isRequired=isRequired :buttonImage="answer.AnswerImageUrl" :buttonImageId="answer.ImageId" @@ -34,10 +35,10 @@ :selectedValues="selectedValues" data-test="button" :validationRules="validationRules" - :class="[suppressError ? 'alertError' : '']" + :class="[suppressError ? 'alertError' : '' , isCashOrInsurance ? 'radio-fancy' : '']" :clearOnUnmount="clearOnUnmount" /> - +
@@ -87,6 +88,7 @@ export default { isRequired: Boolean, isOverflowScrollable: Boolean, isWide: Boolean, + isCashOrInsurance: Boolean, modelValue: [Array, String], validationRules: String, suppressError: Boolean, diff --git a/src/layouts/quote/quote.vue b/src/layouts/quote/quote.vue index 158150baf..d2274cc24 100644 --- a/src/layouts/quote/quote.vue +++ b/src/layouts/quote/quote.vue @@ -1,10 +1,120 @@ + +--> + + \ No newline at end of file + }, + computed: { + years() { + return ["2011", "2012"]; + }, + answersFromCms() { + return ["Pay on my own", "Pay with insurance"]; + }, + selectedChipCountValues: { + get: function() { + return this.modelValue; + }, + set: function(newValue) { + this.$emit("update:modelValue", newValue); + } + }, + }, + components: { + funnelHeader, + funnelFooter, + vehicleBanner, + funnelSubHeader, + Form, + buttonQuestion + }, + +}; + diff --git a/src/router/index.js b/src/router/index.js index 8b9328db0..0bc9825a4 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -19,7 +19,15 @@ import eventBus from "@/helpers/event-bus/event-bus"; import store from "@/store"; import analyticsMixin from "@/mixins/analytics-mixin"; +// Components +import quote from "@/layouts/quote/quote.vue"; + const routes = [ + { + path: "/quote", // This is a temporary route for testing. + name: "quote", + component: quote, + }, { path: "/", name: "root", diff --git a/src/router/router-constants/fmgPage-values.js b/src/router/router-constants/fmgPage-values.js index d067895ee..58054b06b 100644 --- a/src/router/router-constants/fmgPage-values.js +++ b/src/router/router-constants/fmgPage-values.js @@ -1,4 +1,5 @@ const fmgPageValues = { + QUOTE: "quote", VEHICLE_YEAR: "vehicle-year", VEHICLE_MAKE: "vehicle-make", VEHICLE_MODEL: "vehicle-model", diff --git a/src/router/router-constants/routing-table.js b/src/router/router-constants/routing-table.js index 515465385..da76e73cc 100644 --- a/src/router/router-constants/routing-table.js +++ b/src/router/router-constants/routing-table.js @@ -114,12 +114,13 @@ const routingTable = [ }, { scenario: navigationScenarios.SELECTED_VIN_WITH_PART_QUESTIONS, - destinationFmgPageValue: fmgPageValues.PART_QUESTIONS + //destinationFmgPageValue: fmgPageValues.PART_QUESTIONS + destinationFmgPageValue: fmgPageValues.QUOTE, }, { scenario: navigationScenarios.SELECTED_VIN_WITH_MULTIPLE_PARTS, destinationFmgPageValue: fmgPageValues.VEHICLE_PARTS - } + }, ], }, { @@ -178,7 +179,7 @@ const routingTable = [ { scenario: navigationScenarios.CLICKED_FORWARD, destinationFmgPageValue: fmgPageValues.VEHICLE_DAMAGE, - }, + }, { scenario: navigationScenarios.SELECTED_VIN_WITH_PART_QUESTIONS, destinationFmgPageValue: fmgPageValues.PART_QUESTIONS @@ -186,7 +187,7 @@ const routingTable = [ { scenario: navigationScenarios.SELECTED_VIN_WITH_MULTIPLE_PARTS, destinationFmgPageValue: fmgPageValues.VEHICLE_PARTS - } + } ], }, { diff --git a/src/ux-components/list-button-horizontal/list-button-horizontal.vue b/src/ux-components/list-button-horizontal/list-button-horizontal.vue index 49978aa1e..afb048f09 100644 --- a/src/ux-components/list-button-horizontal/list-button-horizontal.vue +++ b/src/ux-components/list-button-horizontal/list-button-horizontal.vue @@ -1,54 +1,54 @@