From d2b926f2f9a8698f1307a573955be184d3f93bdb Mon Sep 17 00:00:00 2001 From: Leah Schumann Date: Mon, 10 Apr 2023 08:38:52 -0400 Subject: [PATCH 01/75] Initial check-in --- .../shop-question/shop-question.spec.js | 1 + .../shop-question/shop-question.vue | 82 +++++++++++++++++++ 2 files changed, 83 insertions(+) create mode 100644 src/layouts/service-location/shop-question/shop-question.spec.js create mode 100644 src/layouts/service-location/shop-question/shop-question.vue diff --git a/src/layouts/service-location/shop-question/shop-question.spec.js b/src/layouts/service-location/shop-question/shop-question.spec.js new file mode 100644 index 000000000..66012402c --- /dev/null +++ b/src/layouts/service-location/shop-question/shop-question.spec.js @@ -0,0 +1 @@ +test.todo("some test to be written in the future"); \ No newline at end of file diff --git a/src/layouts/service-location/shop-question/shop-question.vue b/src/layouts/service-location/shop-question/shop-question.vue new file mode 100644 index 000000000..87f5349a8 --- /dev/null +++ b/src/layouts/service-location/shop-question/shop-question.vue @@ -0,0 +1,82 @@ + + + + + From b1e160310d04ee22024dd18ebbcd0c6f220e626e Mon Sep 17 00:00:00 2001 From: Sravan Gopathi Date: Mon, 10 Apr 2023 08:44:39 -0400 Subject: [PATCH 02/75] Implemented Front End changes as per the card#1204 --- .../service-location-helper.js | 2 +- .../service-location/service-location.spec.js | 1 + src/store/index.js | 14 ++++++++++++++ 3 files changed, 16 insertions(+), 1 deletion(-) diff --git a/src/layouts/service-location/helpers/service-location-helper/service-location-helper.js b/src/layouts/service-location/helpers/service-location-helper/service-location-helper.js index 157c28f2b..24be20fc8 100644 --- a/src/layouts/service-location/helpers/service-location-helper/service-location-helper.js +++ b/src/layouts/service-location/helpers/service-location-helper/service-location-helper.js @@ -35,7 +35,7 @@ export async function getServiceabilityDetails(serviceZipCode, lineItems) { storeActions.GET_SERVICEABILITY_DETAILS, { serviceZipCode: serviceZipCode, - lineItems: lineItems, + lineItems: lineItems }, false ); diff --git a/src/layouts/service-location/service-location.spec.js b/src/layouts/service-location/service-location.spec.js index aad61b630..d7f5348b9 100644 --- a/src/layouts/service-location/service-location.spec.js +++ b/src/layouts/service-location/service-location.spec.js @@ -39,6 +39,7 @@ const mockGetServiceabilityDetails = (mockServiceZipCode) => { isRecalibrationServiceableInshop: true, isGlassServiceableMobile: true, isRecalibrationServiceableMobile: true, + IsServiceability:true, }; return Promise.resolve(serviceabilityDetails); diff --git a/src/store/index.js b/src/store/index.js index 6da7550a2..0549ed8c4 100644 --- a/src/store/index.js +++ b/src/store/index.js @@ -941,6 +941,20 @@ export const actions = { // const lineItems = context.getters.order.lineItems; // const lineItemsToSend = [...lineItems.supportingItems]; // const encodedLineItems = encodeURIComponent(JSON.stringify(lineItemsToSend)); + + //TODO: Restore this when CSR-1204 is 100% complete. Line# 958 to 961 should be removed Begin + // const vehicle = context.getters.vehicle; + // const carId = vehicle.carId; + // const damage = context.getters.damage; + // const glassArray = damage.glassToReplace; + // // create a new array to avoid mutating state + // const glassArrayForPayload = convertGlassPieceNamingForApi(glassArray); + // return globalMethods.callHttpClient({ + // method: endpoints.GetServiceabilityDetails.method, + // endpoint: `${endpoints.GetServiceabilityDetails.url}?zip=${serviceZipCode}&lineItems=${encodedLineItems}&carId=${carId}&glassPieces=${glassArrayForPayload}`, + // }); + //TODO: Restore this when CSR-1204 is 100% complete End + // return globalMethods.callHttpClient({ // method: endpoints.GetServiceabilityDetails.method, // endpoint: `${endpoints.GetServiceabilityDetails.url}?zip=${serviceZipCode}&lineItems=${encodedLineItems}`, From 96133bc8ec1eea0a5d143aa07cb3ffb9a2438236 Mon Sep 17 00:00:00 2001 From: Leah Schumann Date: Tue, 11 Apr 2023 12:41:56 -0400 Subject: [PATCH 03/75] WIP --- .../shop-question/shop-question.vue | 95 +++++++++++++++++-- 1 file changed, 85 insertions(+), 10 deletions(-) diff --git a/src/layouts/service-location/shop-question/shop-question.vue b/src/layouts/service-location/shop-question/shop-question.vue index 87f5349a8..f5cbdba98 100644 --- a/src/layouts/service-location/shop-question/shop-question.vue +++ b/src/layouts/service-location/shop-question/shop-question.vue @@ -1,12 +1,18 @@ @@ -36,6 +45,7 @@ import { defineRule } from "vee-validate"; import { required } from "@/helpers/validation-rules"; import { errorMessages } from "@/constants/error-messages"; import baseMixin from "@/mixins/base-mixin.js"; +import textLink from '@/ux-components/text-link/text-link'; defineRule("option-required", required(errorMessages.OPTION_REQUIRED)); @@ -46,6 +56,9 @@ export default { return { shops: [], shopListButton: shopListButton, + availability: "high", + answers: [], + shopIndex: 0, }; }, props: { @@ -58,6 +71,7 @@ export default { components: { alert, buttonQuestion, + textLink, }, computed: { questionText() { @@ -71,23 +85,12 @@ export default { this.$emit("update:modelValue", newValue); }, }, - answers() { - // Map API result data - const mappedData = this.shops.map((shop) => { - return { - Name: shop.providerNumber, - buttonLabel: shop.city, - buttonLabelSubCopy: `${shop.distance} mi`, - buttonBodyCopy: `${shop.streetAddress}, ${shop.city}, ${shop.state} ${shop.zipCode}`, - buttonAuxillaryCopy: `foo` - }; - }); - - return mappedData; - }, displayDropoffInformation() { return this.isDropoff; }, + showMoreShopsLinkText() { + return this.getCmsContent("ShowMoreShopsLinkWidget", "Text"); + }, }, methods: { loadInitialData() { @@ -97,6 +100,7 @@ export default { }, initializeComponent(initialData) { this.shops = initialData; + this.getNextShopsFromList(); }, async updateShopList() { const result = await this.dispatchStoreAction(storeActions.GET_PROVIDER_LOCATIONS, { @@ -104,6 +108,38 @@ export default { }); return result.data; }, + shopIterator(array, n){ + let l = array.length; + return () => { + var end = this.shopIndex + n; + var part = array.slice(this.shopIndex, end); + this.shopIndex = end < l ? end : this.shopIndex.length - 1; + return part; + }; + }, + getNextShopsFromList() { + const nextShop = this.shopIterator(this.shops, 3); + + // Map API result data + const mappedData = nextShop().map((shop) => { + return { + Name: shop.providerNumber, + buttonLabel: shop.city, + buttonLabelSubCopy: `${shop.distance} mi`, + buttonBodyCopy: `${shop.streetAddress}, ${shop.city}, ${shop.state} ${shop.zipCode}`, + buttonAuxillaryCopy: `foo`, + }; + }); + + if (this.answers.length === 0) { + this.answers = mappedData; + } else { + mappedData.forEach(shop => { + this.answers.push(shop); + }) + } + + } }, watch: { serviceZipCode: { @@ -124,30 +160,70 @@ export default { } .button-content { - .button-label-copy { + .row-one { display: flex; - font-weight: 500; - line-height: 1.5rem; align-items: center; margin-bottom: 0.25rem !important; + .button-label-copy { + flex-grow: 0; + line-height: 1.5rem; + font-weight: 500; + } + .button-label-sub-copy { - margin-bottom: 0rem !important; + flex-grow: 1; + line-height: 1.25rem !important; + font-weight: 400; + font-size: 0.75rem; color: #727676; padding-left: 0.25rem; - font-weight: 400; - line-height: 1.25rem; - font-size: 0.75rem; } - .button-auxillary-copy { - display: flex; - align-items: right; + .availability-indicator { + display: none; + flex-direction: row; + justify-content: center; + align-items: center; + padding: 0.125rem 1.5rem; + gap: 0.25rem; + background: #E3F2EA; + border-radius: 4.5rem; + + .button-auxillary-copy { + justify-content: right; + line-height: 1.25rem !important; + font-weight: 400; + font-size: 0.75rem; + } + + .green { + color: #006A36; + background: #E3F2EA; + } + + .red { + color: #AC160B; + background: #E3F2EA; + } + + } + } - - } + + // .button-question-overflow { + // height: 60vh; //calc(100vh - 274px); + + // // .overflow-scroll { + // // // Height will be determined by overall height of content above list + // // height: calc(100% - 314px); + // // overflow-x: hidden !important; + // // -webkit-overflow-scrolling: touch; + // // } + // } + } .drop-off-alert { diff --git a/src/store/index.js b/src/store/index.js index ca9aa4741..2fafa9214 100644 --- a/src/store/index.js +++ b/src/store/index.js @@ -941,7 +941,7 @@ export const actions = { return globalMethods.callMockHttpClient({ method: endpoints.GetProviderLocations.method, //TODO: Remove Mocky Endpoints - endpoint: "https://run.mocky.io/v3/2a82baf7-c6e8-40ac-8e2e-9d91800c7f9b", + endpoint: "https://run.mocky.io/v3/062bfed7-29a7-4001-b5e8-6135ec10494f", }); }, From 32d90ba74dc08b8db566b9a5a7b05c4754c37447 Mon Sep 17 00:00:00 2001 From: Leah Schumann Date: Fri, 14 Apr 2023 07:44:17 -0400 Subject: [PATCH 06/75] WIP --- .../shop-list-button/shop-list-button.vue | 62 ++++++++- .../shop-question/shop-question.vue | 120 +++++++----------- src/store/index.js | 2 +- 3 files changed, 102 insertions(+), 82 deletions(-) diff --git a/src/layouts/service-location/shop-question/shop-list-button/shop-list-button.vue b/src/layouts/service-location/shop-question/shop-list-button/shop-list-button.vue index 898194951..2fa1b1392 100644 --- a/src/layouts/service-location/shop-question/shop-list-button/shop-list-button.vue +++ b/src/layouts/service-location/shop-question/shop-list-button/shop-list-button.vue @@ -8,10 +8,14 @@ class="button-content list-button-content d-flex flex-column justify-content-center py-3 px-4">
{{ buttonLabel }} - {{ buttonLabelSubCopy }} -
- {{ buttonAuxillaryCopy }} -
+ {{ + buttonLabelSubCopy + }} +
+ {{ buttonAuxillaryCopy }} +
diff --git a/src/layouts/service-location/shop-question/shop-question.vue b/src/layouts/service-location/shop-question/shop-question.vue index c8066eb2f..5d6eaba7f 100644 --- a/src/layouts/service-location/shop-question/shop-question.vue +++ b/src/layouts/service-location/shop-question/shop-question.vue @@ -12,7 +12,6 @@ buttonTypeString="shopListButton" :buttonTypeObject="shopListButton" class="radioQuestion" - isOverflowScrollable :questionText="questionText" :answers="answers" groupName="ChooseShop" @@ -21,6 +20,7 @@ isRequired /> { var end = this.shopIndex + n; var part = array.slice(this.shopIndex, end); this.shopIndex = end < l ? end : this.shopIndex.length - 1; return part; - }; + }; }, - getNextShopsFromList() { + async getNextShopsFromList() { const nextShop = this.shopIterator(this.shops, 3); // Map API result data @@ -134,12 +134,18 @@ export default { if (this.answers.length === 0) { this.answers = mappedData; } else { - mappedData.forEach(shop => { + mappedData.forEach((shop) => { this.answers.push(shop); - }) + }); } - - } + + await this.$nextTick(); + window.scrollTo(0,document.body.scrollHeight); + + // const shopQuestion = document.getElementsByClassName("shop-question")[0]; + + // shopQuestion.scrollIntoView({ behavior: "smooth", block: "end", inline: "end"}); + }, }, watch: { serviceZipCode: { @@ -154,78 +160,38 @@ export default { From 86d7760d771e5432b78200d560695e980da66be5 Mon Sep 17 00:00:00 2001 From: Leah Schumann Date: Fri, 14 Apr 2023 15:57:49 -0400 Subject: [PATCH 09/75] Functionality mostly complete, need Bryan to take a stab at remaining styling --- .../service-location/service-location.vue | 4 +- .../shop-list-button/shop-list-button.vue | 60 ++++++++++--------- .../shop-question/shop-question.vue | 21 ++++--- 3 files changed, 44 insertions(+), 41 deletions(-) diff --git a/src/layouts/service-location/service-location.vue b/src/layouts/service-location/service-location.vue index c5525ec54..422f5ba2f 100644 --- a/src/layouts/service-location/service-location.vue +++ b/src/layouts/service-location/service-location.vue @@ -66,7 +66,9 @@ modalWidgetName="MobileLocationModalWidget" /> - -
-
- {{ buttonLabel }} - {{ - buttonLabelSubCopy - }} -
- {{ buttonAuxillaryCopy }} + + +
+
+ {{ buttonLabel }} + {{ + buttonLabelSubCopy + }} +
+ {{ buttonAuxillaryCopy }} +
+ + + {{ screenReaderOnlyText }} + +
- - - {{ screenReaderOnlyText }} - - -
- + + @@ -176,7 +177,6 @@ export default { .question-text { margin-top: 0.5rem !important; } - } } @@ -191,5 +191,4 @@ export default { padding-left: 1.5rem !important; padding-right: 0.5rem !important; } - From 4def7c421e48f454076512111a20fda95346fda0 Mon Sep 17 00:00:00 2001 From: Leah Schumann Date: Mon, 17 Apr 2023 10:50:55 -0400 Subject: [PATCH 10/75] Working unit tests --- .../service-location/service-location.spec.js | 60 +++++++++++++++++++ .../shop-list-button/shop-list-button.vue | 4 +- .../shop-question/shop-question.vue | 28 +++++++-- 3 files changed, 86 insertions(+), 6 deletions(-) diff --git a/src/layouts/service-location/service-location.spec.js b/src/layouts/service-location/service-location.spec.js index 6f2443a49..95842e0c2 100644 --- a/src/layouts/service-location/service-location.spec.js +++ b/src/layouts/service-location/service-location.spec.js @@ -190,6 +190,8 @@ describe("service-location.vue", () => { // Arrange const { wrapper } = setupMocks({}); + wrapper.vm.$refs.shopQuestion.initializeComponent = jest.fn(); + const mobileFeePart = { partNumber: "MOBILE FEE", description: "MOBILE FEE", @@ -584,6 +586,8 @@ describe("service-location.vue", () => { ); const { wrapper } = setupMocks({}); + + wrapper.vm.$refs.shopQuestion.initializeComponent = jest.fn(); // Act await serviceLocation.beforeRouteEnter.call( @@ -611,6 +615,8 @@ describe("service-location.vue", () => { const { wrapper } = setupMocks({}); + wrapper.vm.$refs.shopQuestion.initializeComponent = jest.fn(); + // Act await serviceLocation.beforeRouteEnter.call( wrapper.vm, @@ -637,6 +643,8 @@ describe("service-location.vue", () => { const { wrapper } = setupMocks({}); + wrapper.vm.$refs.shopQuestion.initializeComponent = jest.fn(); + // Act await serviceLocation.beforeRouteEnter.call( wrapper.vm, @@ -663,6 +671,8 @@ describe("service-location.vue", () => { const { wrapper } = setupMocks({}); + wrapper.vm.$refs.shopQuestion.initializeComponent = jest.fn(); + // Act await serviceLocation.beforeRouteEnter.call( wrapper.vm, @@ -689,6 +699,8 @@ describe("service-location.vue", () => { const { wrapper } = setupMocks({}); + wrapper.vm.$refs.shopQuestion.initializeComponent = jest.fn(); + // Act await serviceLocation.beforeRouteEnter.call( wrapper.vm, @@ -716,6 +728,8 @@ describe("service-location.vue", () => { const { wrapper } = setupMocks({}); + wrapper.vm.$refs.shopQuestion.initializeComponent = jest.fn(); + // Act await serviceLocation.beforeRouteEnter.call( wrapper.vm, @@ -743,6 +757,8 @@ describe("service-location.vue", () => { const { wrapper } = setupMocks({}); + wrapper.vm.$refs.shopQuestion.initializeComponent = jest.fn(); + // Act await serviceLocation.beforeRouteEnter.call( wrapper.vm, @@ -770,6 +786,8 @@ describe("service-location.vue", () => { const { wrapper } = setupMocks({}); + wrapper.vm.$refs.shopQuestion.initializeComponent = jest.fn(); + // Act await serviceLocation.beforeRouteEnter.call( wrapper.vm, @@ -797,6 +815,8 @@ describe("service-location.vue", () => { const { wrapper } = setupMocks({}); + wrapper.vm.$refs.shopQuestion.initializeComponent = jest.fn(); + // Act await serviceLocation.beforeRouteEnter.call( wrapper.vm, @@ -824,6 +844,8 @@ describe("service-location.vue", () => { const { wrapper } = setupMocks({}); + wrapper.vm.$refs.shopQuestion.initializeComponent = jest.fn(); + // Act await serviceLocation.beforeRouteEnter.call( wrapper.vm, @@ -851,6 +873,8 @@ describe("service-location.vue", () => { const { wrapper } = setupMocks({}); + wrapper.vm.$refs.shopQuestion.initializeComponent = jest.fn(); + // Act await serviceLocation.beforeRouteEnter.call( wrapper.vm, @@ -878,6 +902,8 @@ describe("service-location.vue", () => { const { wrapper } = setupMocks({}); + wrapper.vm.$refs.shopQuestion.initializeComponent = jest.fn(); + // Act await serviceLocation.beforeRouteEnter.call( wrapper.vm, @@ -905,6 +931,8 @@ describe("service-location.vue", () => { const { wrapper } = setupMocks({}); + wrapper.vm.$refs.shopQuestion.initializeComponent = jest.fn(); + // Act await serviceLocation.beforeRouteEnter.call( wrapper.vm, @@ -932,6 +960,8 @@ describe("service-location.vue", () => { const { wrapper } = setupMocks({}); + wrapper.vm.$refs.shopQuestion.initializeComponent = jest.fn(); + // Act await serviceLocation.beforeRouteEnter.call( wrapper.vm, @@ -959,6 +989,8 @@ describe("service-location.vue", () => { const { wrapper } = setupMocks({}); + wrapper.vm.$refs.shopQuestion.initializeComponent = jest.fn(); + // Act await serviceLocation.beforeRouteEnter.call( wrapper.vm, @@ -989,6 +1021,8 @@ describe("service-location.vue", () => { const { wrapper } = setupMocks({}); + wrapper.vm.$refs.shopQuestion.initializeComponent = jest.fn(); + // Act await serviceLocation.beforeRouteEnter.call( wrapper.vm, @@ -1015,6 +1049,8 @@ describe("service-location.vue", () => { const { wrapper } = setupMocks({}); + wrapper.vm.$refs.shopQuestion.initializeComponent = jest.fn(); + // Act await serviceLocation.beforeRouteEnter.call( wrapper.vm, @@ -1041,6 +1077,8 @@ describe("service-location.vue", () => { const { wrapper } = setupMocks({}); + wrapper.vm.$refs.shopQuestion.initializeComponent = jest.fn(); + // Act await serviceLocation.beforeRouteEnter.call( wrapper.vm, @@ -1068,6 +1106,8 @@ describe("service-location.vue", () => { const { wrapper } = setupMocks({}); + wrapper.vm.$refs.shopQuestion.initializeComponent = jest.fn(); + // Act await serviceLocation.beforeRouteEnter.call( wrapper.vm, @@ -1095,6 +1135,8 @@ describe("service-location.vue", () => { const { wrapper } = setupMocks({}); + wrapper.vm.$refs.shopQuestion.initializeComponent = jest.fn(); + // Act await serviceLocation.beforeRouteEnter.call( wrapper.vm, @@ -1122,6 +1164,8 @@ describe("service-location.vue", () => { const { wrapper } = setupMocks({}); + wrapper.vm.$refs.shopQuestion.initializeComponent = jest.fn(); + // Act await serviceLocation.beforeRouteEnter.call( wrapper.vm, @@ -1151,6 +1195,8 @@ describe("service-location.vue", () => { const { wrapper } = setupMocks({}); + wrapper.vm.$refs.shopQuestion.initializeComponent = jest.fn(); + // Act await serviceLocation.beforeRouteEnter.call( wrapper.vm, @@ -1178,6 +1224,8 @@ describe("service-location.vue", () => { const { wrapper } = setupMocks({}); + wrapper.vm.$refs.shopQuestion.initializeComponent = jest.fn(); + // Act await serviceLocation.beforeRouteEnter.call( wrapper.vm, @@ -1205,6 +1253,8 @@ describe("service-location.vue", () => { const { wrapper } = setupMocks({}); + wrapper.vm.$refs.shopQuestion.initializeComponent = jest.fn(); + // Act await serviceLocation.beforeRouteEnter.call( wrapper.vm, @@ -1232,6 +1282,8 @@ describe("service-location.vue", () => { const { wrapper } = setupMocks({}); + wrapper.vm.$refs.shopQuestion.initializeComponent = jest.fn(); + // Act await serviceLocation.beforeRouteEnter.call( wrapper.vm, @@ -1259,6 +1311,8 @@ describe("service-location.vue", () => { const { wrapper } = setupMocks({}); + wrapper.vm.$refs.shopQuestion.initializeComponent = jest.fn(); + // Act await serviceLocation.beforeRouteEnter.call( wrapper.vm, @@ -1286,6 +1340,8 @@ describe("service-location.vue", () => { const { wrapper } = setupMocks({}); + wrapper.vm.$refs.shopQuestion.initializeComponent = jest.fn(); + // Act await serviceLocation.beforeRouteEnter.call( wrapper.vm, @@ -1313,6 +1369,8 @@ describe("service-location.vue", () => { const { wrapper } = setupMocks({}); + wrapper.vm.$refs.shopQuestion.initializeComponent = jest.fn(); + // Act await serviceLocation.beforeRouteEnter.call( wrapper.vm, @@ -1342,6 +1400,8 @@ describe("service-location.vue", () => { const { wrapper } = setupMocks({}); + wrapper.vm.$refs.shopQuestion.initializeComponent = jest.fn(); + // Act await serviceLocation.beforeRouteEnter.call( wrapper.vm, diff --git a/src/layouts/service-location/shop-question/shop-list-button/shop-list-button.vue b/src/layouts/service-location/shop-question/shop-list-button/shop-list-button.vue index 45a18280f..b8003148f 100644 --- a/src/layouts/service-location/shop-question/shop-list-button/shop-list-button.vue +++ b/src/layouts/service-location/shop-question/shop-list-button/shop-list-button.vue @@ -8,7 +8,9 @@ :aria-label="buttonLabel" class="button-content list-button-content d-flex flex-column justify-content-center py-3 px-4">
- {{ buttonLabel }} + {{ + buttonLabel + }} {{ buttonLabelSubCopy }} diff --git a/src/layouts/service-location/shop-question/shop-question.vue b/src/layouts/service-location/shop-question/shop-question.vue index 96d7debd8..c7dba4a5d 100644 --- a/src/layouts/service-location/shop-question/shop-question.vue +++ b/src/layouts/service-location/shop-question/shop-question.vue @@ -17,8 +17,9 @@ groupName="ChooseShop" textPosition="text-start" v-model="selectedValue" - isRequired /> - + + :aria-label="showMoreShopsLinkText" />
@@ -59,6 +60,7 @@ export default { availability: "high", answers: [], shopIndex: 0, + displaySeeMoreLocationsLink: true, }; }, props: { @@ -107,6 +109,9 @@ export default { const result = await this.dispatchStoreAction(storeActions.GET_PROVIDER_LOCATIONS, { serviceZipCode: this.serviceZipCode, }); + + this.resetShopList(); + return result.data; }, shopIterator(array, n) { @@ -114,7 +119,7 @@ export default { return () => { var end = this.shopIndex + n; var part = array.slice(this.shopIndex, end); - this.shopIndex = end < l ? end : this.shopIndex.length - 1; + this.shopIndex = end < l ? end : this.shops.length; return part; }; }, @@ -145,6 +150,18 @@ export default { const container = document.getElementsByClassName("page-container-grouped-styles")[0]; container.scrollTo({ top: container.scrollHeight, left: 0, behavior: "smooth" }); + + if (this.shopIndex == this.shops.length) { + this.displaySeeMoreLocationsLink = false; + } + }, + resetShopList() { + this.answers = []; + this.shopIndex = 0; + this.getNextShopsFromList(); + + this.displaySeeMoreLocationsLink = true; + }, }, watch: { @@ -160,8 +177,9 @@ export default { const container = document.getElementsByClassName( "page-container-grouped-styles" )[0]; - console.log(container.scrollHeight + 200); container.scrollTo({ top: container.scrollHeight, left: 0, behavior: "smooth" }); + + this.resetShopList(); }, }, }, From d2ed91e9199cc0ed2eccc7571e2fd4d7d01f90af Mon Sep 17 00:00:00 2001 From: Leah Schumann Date: Tue, 18 Apr 2023 08:32:43 -0400 Subject: [PATCH 11/75] Just needs styling tweaks and de-mocked --- .../service-location/service-location.spec.js | 2 +- .../service-location/service-location.vue | 34 +++++++++++------ .../shop-question/shop-question.vue | 37 +++++++++++++------ 3 files changed, 49 insertions(+), 24 deletions(-) diff --git a/src/layouts/service-location/service-location.spec.js b/src/layouts/service-location/service-location.spec.js index 95842e0c2..52239462c 100644 --- a/src/layouts/service-location/service-location.spec.js +++ b/src/layouts/service-location/service-location.spec.js @@ -586,7 +586,7 @@ describe("service-location.vue", () => { ); const { wrapper } = setupMocks({}); - + wrapper.vm.$refs.shopQuestion.initializeComponent = jest.fn(); // Act diff --git a/src/layouts/service-location/service-location.vue b/src/layouts/service-location/service-location.vue index 422f5ba2f..56cb88d80 100644 --- a/src/layouts/service-location/service-location.vue +++ b/src/layouts/service-location/service-location.vue @@ -66,12 +66,12 @@ modalWidgetName="MobileLocationModalWidget" /> item.partNumber === "RECAL STATIC" || item.partNumber === "RECAL DUAL" + // Specifically check for isRecalibrationServiceableMobile === false, not null or true. + requiresInshopRecalibration() { + return ( + this.isServiceableInshop && + this.isGlassServiceableMobile && + this.isRecalibrationServiceableMobile === false ); }, displayRecalibrationWarning() { - return this.isDualOrStaticRecalibration; + return this.requiresInshopRecalibration; }, displayServiceableInshopOnly() { return ( @@ -293,6 +296,9 @@ export default { isDropoff() { return this.selectedAppointmentType === "Dropoff"; }, + isMobile() { + return this.selectedAppointmentType === "Mobile"; + }, }, methods: { arePagePrerequisitesValid() { @@ -302,7 +308,7 @@ export default { store.getters.payment.isInsurance !== null ); }, - setData(zipCodeData, serviceabilityDetails, mobileFeePart) { + setData(zipCodeData, serviceabilityDetails, mobileFeePart, shopQuestionInitialData) { if (zipCodeData) { this.zipContainsMilitaryBase = zipCodeData.containsMilitaryBase; } @@ -314,6 +320,10 @@ export default { if (mobileFeePart) { this.mobileFeePart = mobileFeePart; } + + if (shopQuestionInitialData) { + this.shopQuestionInitialData = shopQuestionInitialData; + } }, setContainsMilitaryBase(val) { if (this.zipContainsMilitaryBase !== val) { diff --git a/src/layouts/service-location/shop-question/shop-question.vue b/src/layouts/service-location/shop-question/shop-question.vue index c7dba4a5d..ec6c0c18f 100644 --- a/src/layouts/service-location/shop-question/shop-question.vue +++ b/src/layouts/service-location/shop-question/shop-question.vue @@ -9,17 +9,19 @@ alertClass="alert-info" v-bind:isDismissible="false" /> - + Date: Tue, 18 Apr 2023 08:40:41 -0400 Subject: [PATCH 12/75] Small refactor --- .../service-location/shop-question/shop-question.vue | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/layouts/service-location/shop-question/shop-question.vue b/src/layouts/service-location/shop-question/shop-question.vue index ec6c0c18f..34441440d 100644 --- a/src/layouts/service-location/shop-question/shop-question.vue +++ b/src/layouts/service-location/shop-question/shop-question.vue @@ -162,7 +162,9 @@ export default { this.shopIndex = 0; this.getNextShopsFromList(); - this.displaySeeMoreLocationsLink = true; + this.displaySeeMoreLocationsLink = true; + this.selectedValue = ""; + this.$refs.buttonQuestion.resetField(); }, }, @@ -189,11 +191,6 @@ export default { container.scrollTo({ top: container.scrollHeight, left: 0, behavior: "smooth" }); this.resetShopList(); - - this.selectedValue = ""; - - this.$refs.buttonQuestion.resetField(); - }, immediate: true, }, From 2b5dc365d054291855b9b8f18e5fe6458f24d029 Mon Sep 17 00:00:00 2001 From: CarlNation Date: Thu, 20 Apr 2023 09:00:16 -0400 Subject: [PATCH 13/75] CSR-1337 Address look up option restrict to only zips that are able to look up address --- src/layouts/estimate/estimate.vue | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/src/layouts/estimate/estimate.vue b/src/layouts/estimate/estimate.vue index cfec5923d..b9929813a 100644 --- a/src/layouts/estimate/estimate.vue +++ b/src/layouts/estimate/estimate.vue @@ -149,11 +149,17 @@ export default { const queryString = window.location.search; const urlParams = new URLSearchParams(queryString); - const hasZip = urlParams.has(queryStrings.ZIP_CODE); - const zip = urlParams.get(queryStrings.ZIP_CODE); + const lowerCaseParams = new URLSearchParams(); + for (const [name, value] of urlParams) { + lowerCaseParams.append(name.toLowerCase(), value); + } + + const zip = lowerCaseParams.get(queryStrings.ZIP_CODE) + ? lowerCaseParams.get(queryStrings.ZIP_CODE) + : store.getters.order.serviceLocation.zipCode; var vinByAddressPromise; - if (hasZip) { + if (zip) { vinByAddressPromise = baseMixin.methods.dispatchStoreAction( storeActions.IS_VIN_BY_ADDRESS_PERMISSIBLE, zip, @@ -193,7 +199,7 @@ export default { } } - if (zip && resultMap.vinByAddress === false) { + if (!zip || resultMap.vinByAddress === false) { var indexToRemove = resultMap.cmsContent.VinLookupMethod.Answers.findIndex( (answer) => answer.Name === "HomeAddress" ); @@ -201,6 +207,7 @@ export default { resultMap.cmsContent.VinLookupMethod.Answers.splice(indexToRemove, 1); } } + vm.setCmsContent(resultMap.cmsContent); }); }, From 0a4645c605a0b4d606f254e696fab5e3df8c1b4f Mon Sep 17 00:00:00 2001 From: CarlNation Date: Thu, 20 Apr 2023 10:16:51 -0400 Subject: [PATCH 14/75] CSR-1337 --- src/layouts/estimate/estimate.spec.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/layouts/estimate/estimate.spec.js b/src/layouts/estimate/estimate.spec.js index 4a0a3f434..462287851 100644 --- a/src/layouts/estimate/estimate.spec.js +++ b/src/layouts/estimate/estimate.spec.js @@ -101,6 +101,9 @@ describe("estimate.vue", () => { //Arrange const { wrapper } = setupMocks({}); + delete window.location; + window.location = { search: "?fmgPage=estimate&zipcode=43015" }; + //Act estimate.beforeRouteEnter.call( wrapper.vm, From 7d0e2513be6cce80dca09c92a1729d119e872c07 Mon Sep 17 00:00:00 2001 From: Leah Schumann Date: Fri, 21 Apr 2023 07:12:26 -0400 Subject: [PATCH 15/75] WIP --- .../appointment-type-question.vue | 2 -- .../service-location/service-location.vue | 20 +++++++++---------- .../shop-question/shop-question.vue | 16 +++++++++------ 3 files changed, 20 insertions(+), 18 deletions(-) diff --git a/src/layouts/service-location/appointment-type-question/appointment-type-question.vue b/src/layouts/service-location/appointment-type-question/appointment-type-question.vue index 6260df9d1..dc846f377 100644 --- a/src/layouts/service-location/appointment-type-question/appointment-type-question.vue +++ b/src/layouts/service-location/appointment-type-question/appointment-type-question.vue @@ -70,8 +70,6 @@ export default { handler(newValue) { if (newValue) { this.selectedValues = "Mobile"; - } else { - this.selectedValues = null; } }, }, diff --git a/src/layouts/service-location/service-location.vue b/src/layouts/service-location/service-location.vue index 56cb88d80..6dce8e985 100644 --- a/src/layouts/service-location/service-location.vue +++ b/src/layouts/service-location/service-location.vue @@ -71,7 +71,7 @@ :isDropoff="isDropoff" :serviceZipCode="zipCode" :selectedAppointmentType="selectedAppointmentType" - :shopQuestionInitialData="shopQuestionInitialData" + :shopQuestionData="shopQuestionData" cmsWidgetName="ShopQuestionWidget" /> Date: Fri, 21 Apr 2023 10:14:35 -0400 Subject: [PATCH 16/75] CSR-1338 If there is no windshield selected then do not require a vin lookup --- src/helpers/damage-helper.js | 6 ++++++ src/helpers/heritage-integration/navigation-helper.js | 7 ++++--- src/helpers/heritage-integration/navigation-helper.spec.js | 4 ++-- 3 files changed, 12 insertions(+), 5 deletions(-) diff --git a/src/helpers/damage-helper.js b/src/helpers/damage-helper.js index 22e312939..91546c3e2 100644 --- a/src/helpers/damage-helper.js +++ b/src/helpers/damage-helper.js @@ -1,6 +1,7 @@ import store from "@/store"; import baseMixin from "@/mixins/base-mixin.js"; import { storeActions } from "@/constants/store-actions"; +import { damageLocationsSelected as glassLocations } from "@/constants/damage-locations-selected"; export function getDamageString() { // If it's a repair it's always a windshield. @@ -45,6 +46,11 @@ export function getIsWindshieldOnly() { return returnString; } +export function hasWindshield() { + const windshieldMatches = store.getters.order.damage.glassToReplace?.filter((glassToReplace) => glassToReplace.glassLocation === glassLocations.WINDSHIELD) ?? []; + return windshieldMatches.length > 0; +} + export async function isGlassAvailableForCarId(carId) { const newGlassOptions = await baseMixin.methods.dispatchStoreAction( storeActions.GET_DAMAGE_OPTIONS, diff --git a/src/helpers/heritage-integration/navigation-helper.js b/src/helpers/heritage-integration/navigation-helper.js index 0e756a8a4..6cbed862b 100644 --- a/src/helpers/heritage-integration/navigation-helper.js +++ b/src/helpers/heritage-integration/navigation-helper.js @@ -7,6 +7,7 @@ import { storeActions } from "@/constants/store-actions.js"; import { settleAllPromises } from "@/helpers/layout-helper"; import experimentMixin from "@/mixins/experiment-mixin"; import { experimentSettings } from "@/constants/experiments"; +import { hasWindshield } from "@/helpers/damage-helper"; import store from "@/store"; import router from "@/router"; @@ -72,7 +73,7 @@ export async function skipVinLookup() { return ( store.getters.damage.isRepair || - isVinOptionalVehicle || + isVinOptionalVehicle || !hasWindshield() || experimentMixin.methods.hasSettingEqualTo(experimentSettings.SUPPRESS_VIN_CAPTURE, "true") ); } @@ -83,8 +84,8 @@ export async function skipVinLookupNotRepair() { : false; return ( - !store.getters.damage.isRepair && - (isVinOptionalVehicle || + !store.getters.damage.isRepair && + (isVinOptionalVehicle || !hasWindshield() || experimentMixin.methods.hasSettingEqualTo( experimentSettings.SUPPRESS_VIN_CAPTURE, "true" diff --git a/src/helpers/heritage-integration/navigation-helper.spec.js b/src/helpers/heritage-integration/navigation-helper.spec.js index f9b3b1017..0322631f3 100644 --- a/src/helpers/heritage-integration/navigation-helper.spec.js +++ b/src/helpers/heritage-integration/navigation-helper.spec.js @@ -135,7 +135,7 @@ describe("getPageToRouteExistingOrderTo", () => { expect(result).toBe(fmgPageValues.VEHICLE_DAMAGE); }); - test("user has YMMS and no vehicle questions > should return vin-lookup", async () => { + test("user has YMMS and no vehicle questions > should return estimate", async () => { // Arrange const toRoute = { query: {}, @@ -172,7 +172,7 @@ describe("getPageToRouteExistingOrderTo", () => { const result = await getPageToRouteExistingOrderTo(toRoute, false); //Assert - expect(result).toBe(fmgPageValues.VIN_LOOKUP); + expect(result).toBe(fmgPageValues.ESTIMATE); }); test("user has YMMS but no questions or carId > should return estimate", async () => { From 553338e56f674948bd7a5872bb5bc76290d4fa6c Mon Sep 17 00:00:00 2001 From: CarlNation Date: Fri, 21 Apr 2023 10:30:58 -0400 Subject: [PATCH 17/75] CSR-1338 prettier --- src/helpers/damage-helper.js | 5 ++++- src/helpers/heritage-integration/navigation-helper.js | 8 +++++--- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/src/helpers/damage-helper.js b/src/helpers/damage-helper.js index 91546c3e2..0c4735b6c 100644 --- a/src/helpers/damage-helper.js +++ b/src/helpers/damage-helper.js @@ -47,7 +47,10 @@ export function getIsWindshieldOnly() { } export function hasWindshield() { - const windshieldMatches = store.getters.order.damage.glassToReplace?.filter((glassToReplace) => glassToReplace.glassLocation === glassLocations.WINDSHIELD) ?? []; + const windshieldMatches = + store.getters.order.damage.glassToReplace?.filter( + (glassToReplace) => glassToReplace.glassLocation === glassLocations.WINDSHIELD + ) ?? []; return windshieldMatches.length > 0; } diff --git a/src/helpers/heritage-integration/navigation-helper.js b/src/helpers/heritage-integration/navigation-helper.js index 6cbed862b..e7010cfa9 100644 --- a/src/helpers/heritage-integration/navigation-helper.js +++ b/src/helpers/heritage-integration/navigation-helper.js @@ -73,7 +73,8 @@ export async function skipVinLookup() { return ( store.getters.damage.isRepair || - isVinOptionalVehicle || !hasWindshield() || + isVinOptionalVehicle || + !hasWindshield() || experimentMixin.methods.hasSettingEqualTo(experimentSettings.SUPPRESS_VIN_CAPTURE, "true") ); } @@ -84,8 +85,9 @@ export async function skipVinLookupNotRepair() { : false; return ( - !store.getters.damage.isRepair && - (isVinOptionalVehicle || !hasWindshield() || + !store.getters.damage.isRepair && + (isVinOptionalVehicle || + !hasWindshield() || experimentMixin.methods.hasSettingEqualTo( experimentSettings.SUPPRESS_VIN_CAPTURE, "true" From 8b824d9ec137395e2db291e758b09a93dd3d73ae Mon Sep 17 00:00:00 2001 From: CarlNation Date: Fri, 21 Apr 2023 13:42:32 -0400 Subject: [PATCH 18/75] CSR-1338 rename hasWindshield to includesWindshieldReplacement --- src/helpers/damage-helper.js | 2 +- src/helpers/heritage-integration/navigation-helper.js | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/helpers/damage-helper.js b/src/helpers/damage-helper.js index 0c4735b6c..727825d9d 100644 --- a/src/helpers/damage-helper.js +++ b/src/helpers/damage-helper.js @@ -46,7 +46,7 @@ export function getIsWindshieldOnly() { return returnString; } -export function hasWindshield() { +export function includesWindshieldReplacement() { const windshieldMatches = store.getters.order.damage.glassToReplace?.filter( (glassToReplace) => glassToReplace.glassLocation === glassLocations.WINDSHIELD diff --git a/src/helpers/heritage-integration/navigation-helper.js b/src/helpers/heritage-integration/navigation-helper.js index e7010cfa9..913fbcb1b 100644 --- a/src/helpers/heritage-integration/navigation-helper.js +++ b/src/helpers/heritage-integration/navigation-helper.js @@ -7,7 +7,7 @@ import { storeActions } from "@/constants/store-actions.js"; import { settleAllPromises } from "@/helpers/layout-helper"; import experimentMixin from "@/mixins/experiment-mixin"; import { experimentSettings } from "@/constants/experiments"; -import { hasWindshield } from "@/helpers/damage-helper"; +import { includesWindshieldReplacement } from "@/helpers/damage-helper"; import store from "@/store"; import router from "@/router"; @@ -74,7 +74,7 @@ export async function skipVinLookup() { return ( store.getters.damage.isRepair || isVinOptionalVehicle || - !hasWindshield() || + !includesWindshieldReplacement() || experimentMixin.methods.hasSettingEqualTo(experimentSettings.SUPPRESS_VIN_CAPTURE, "true") ); } @@ -87,7 +87,7 @@ export async function skipVinLookupNotRepair() { return ( !store.getters.damage.isRepair && (isVinOptionalVehicle || - !hasWindshield() || + !includesWindshieldReplacement() || experimentMixin.methods.hasSettingEqualTo( experimentSettings.SUPPRESS_VIN_CAPTURE, "true" From 5933a44bc89bebdbe940ffd626225c95745d8471 Mon Sep 17 00:00:00 2001 From: Leah Schumann Date: Mon, 24 Apr 2023 11:02:00 -0400 Subject: [PATCH 19/75] wip --- .../service-location/service-location.vue | 2 +- .../shop-question/shop-question.vue | 31 +++++++++++++------ 2 files changed, 23 insertions(+), 10 deletions(-) diff --git a/src/layouts/service-location/service-location.vue b/src/layouts/service-location/service-location.vue index 43f580efe..b17a91878 100644 --- a/src/layouts/service-location/service-location.vue +++ b/src/layouts/service-location/service-location.vue @@ -67,7 +67,7 @@ modalWidgetName="MobileLocationModalWidget" /> From 43954352a0b757ba1e6a3896e2fc648b471797ff Mon Sep 17 00:00:00 2001 From: CarlNation Date: Tue, 25 Apr 2023 09:18:56 -0400 Subject: [PATCH 20/75] CSR-1339 Allow site to function when analytic service calls fail --- src/mixins/analytics-mixin.js | 10 +++++----- src/store/index.js | 24 +++++++++++++++++++++--- 2 files changed, 26 insertions(+), 8 deletions(-) diff --git a/src/mixins/analytics-mixin.js b/src/mixins/analytics-mixin.js index 3fbc9501d..29eb76c3d 100644 --- a/src/mixins/analytics-mixin.js +++ b/src/mixins/analytics-mixin.js @@ -146,18 +146,18 @@ export default { false ); - if (response.data) { - if (response.data.sessionKey && skey === 0) { + if (response?.data) { + if (response?.data.sessionKey && skey === 0) { setCookieProperties( - { [cookieNames.SESSION_KEY]: response.data.sessionKey }, + { [cookieNames.SESSION_KEY]: response?.data.sessionKey }, { useDefaultFunnelCookieAttributes: false, } ); } - if (response.data.sessionId && sid === "00000000-0000-0000-0000-000000000000") { + if (response?.data.sessionId && sid === "00000000-0000-0000-0000-000000000000") { setCookieProperties( - { [cookieNames.SESSION_ID]: response.data.sessionId }, + { [cookieNames.SESSION_ID]: response?.data.sessionId }, { maxAge: 60 * 30, // 30 minutes } diff --git a/src/store/index.js b/src/store/index.js index f42a950ea..70f6cf3a2 100644 --- a/src/store/index.js +++ b/src/store/index.js @@ -720,7 +720,13 @@ export const actions = { endpoint: endpoints.LogPageView.url, payload: payload, logApiCall: false, - }); + }).then((response) => { + return response; + }, + (error) => { + console.log("Analytics Service Error: " + error.data); + } + ); }, logCustomEvent( context, @@ -756,7 +762,13 @@ export const actions = { endpoint: endpoints.LogCustomEvent.url, payload: payload, logApiCall: false, - }); + }).then((response) => { + return response; + }, + (error) => { + console.log("Analytics Service Error: " + error.data); + } + ); }, initializeSession(context, { userId, sessionId, userAgent, referrer }) { var payload = { @@ -775,7 +787,13 @@ export const actions = { endpoint: endpoints.InitializeSession.url, payload: payload, logApiCall: false, - }); + }).then((response) => { + return response; + }, + (error) => { + console.log("Analytics Service Error: " + error.data); + } + ); }, // Misc Actions From f18e00caedbda0ff9319882fc8668cb3af08aa20 Mon Sep 17 00:00:00 2001 From: CarlNation Date: Tue, 25 Apr 2023 09:26:41 -0400 Subject: [PATCH 21/75] CSR-1339 Add GA event to show what button options displayed --- .../button-question/button-question.vue | 25 ++++++ src/constants/analytics.js | 1 + src/layouts/estimate/estimate.vue | 3 +- src/store/index.js | 81 ++++++++++--------- 4 files changed, 73 insertions(+), 37 deletions(-) diff --git a/src/common-components/button-question/button-question.vue b/src/common-components/button-question/button-question.vue index 646b244be..b96b99bb4 100644 --- a/src/common-components/button-question/button-question.vue +++ b/src/common-components/button-question/button-question.vue @@ -79,6 +79,7 @@ import listButtonHorizontal from "@/ux-components/list-button-horizontal/list-bu import listCard from "@/ux-components/list-card/list-card"; import radio from "@/ux-components/radio/radio"; import { ErrorMessage } from "vee-validate"; +import { queryStrings } from "@/constants/query-strings"; export default { name: "buttonQuestion", @@ -119,6 +120,10 @@ export default { useTextForValue: Boolean, valueToLogType: String, additionalButtonStyling: String, + logDisplayedValuesEvent: { + type: Boolean, + default: false, + }, }, beforeMount() { if (this.buttonTypeObject) { @@ -130,6 +135,26 @@ export default { lastValuePushedToGa: null, }; }, + watch: { + answers() { + //once we get the answers to display from parent, see if we need a GA event to log what we showed + if (this.logDisplayedValuesEvent && this.answers.length > 0) { + var eventLabel = ""; + //build comma separated list of all items in button list that we are going to display on page + this.answers.forEach((item) => { + eventLabel += item.Name + ","; + }); + + eventLabel = eventLabel.slice(0, -1); //remove the last comma + this.pushEventToGA( + this.$route.query[queryStrings.FMG_PAGE], + this.GaActions.DISPLAYED, + eventLabel, + true + ); + } + }, + }, computed: { getFieldSetClasses() { if (this.isOverflowScrollable) { diff --git a/src/constants/analytics.js b/src/constants/analytics.js index eed7da2fe..b5b24660d 100644 --- a/src/constants/analytics.js +++ b/src/constants/analytics.js @@ -19,6 +19,7 @@ const GaActions = { CLICKED: "Clicked", VIF: "vif", SUBMITTED: "Submitted", + DISPLAYED: "Displayed", }; const GaLabels = { diff --git a/src/layouts/estimate/estimate.vue b/src/layouts/estimate/estimate.vue index b9929813a..17135b1aa 100644 --- a/src/layouts/estimate/estimate.vue +++ b/src/layouts/estimate/estimate.vue @@ -18,7 +18,8 @@ buttonTypeString="listButton" v-model="selectedVinLookupMethod" isRequired - validationRules="option-required" /> + validationRules="option-required" + :logDisplayedValuesEvent="true" />
{ - return response; - }, - (error) => { - console.log("Analytics Service Error: " + error.data); - } - ); + return globalMethods + .callHttpClient({ + method: endpoints.LogPageView.method, + endpoint: endpoints.LogPageView.url, + payload: payload, + logApiCall: false, + }) + .then( + (response) => { + return response; + }, + (error) => { + console.log("Analytics Service Error: " + error.data); + } + ); }, logCustomEvent( context, @@ -757,18 +760,21 @@ export const actions = { experimentsForUser: experimentsForUser, }; - return globalMethods.callHttpClient({ - method: endpoints.LogCustomEvent.method, - endpoint: endpoints.LogCustomEvent.url, - payload: payload, - logApiCall: false, - }).then((response) => { - return response; - }, - (error) => { - console.log("Analytics Service Error: " + error.data); - } - ); + return globalMethods + .callHttpClient({ + method: endpoints.LogCustomEvent.method, + endpoint: endpoints.LogCustomEvent.url, + payload: payload, + logApiCall: false, + }) + .then( + (response) => { + return response; + }, + (error) => { + console.log("Analytics Service Error: " + error.data); + } + ); }, initializeSession(context, { userId, sessionId, userAgent, referrer }) { var payload = { @@ -782,18 +788,21 @@ export const actions = { referrer: referrer, }; - return globalMethods.callHttpClient({ - method: endpoints.InitializeSession.method, - endpoint: endpoints.InitializeSession.url, - payload: payload, - logApiCall: false, - }).then((response) => { - return response; - }, - (error) => { - console.log("Analytics Service Error: " + error.data); - } - ); + return globalMethods + .callHttpClient({ + method: endpoints.InitializeSession.method, + endpoint: endpoints.InitializeSession.url, + payload: payload, + logApiCall: false, + }) + .then( + (response) => { + return response; + }, + (error) => { + console.log("Analytics Service Error: " + error.data); + } + ); }, // Misc Actions From 57d6dd278478fca5e4333c8219d809c7f22a3b1a Mon Sep 17 00:00:00 2001 From: CarlNation Date: Tue, 25 Apr 2023 10:50:11 -0400 Subject: [PATCH 22/75] merge prettier --- src/digital-components/button-question/button-question.vue | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/digital-components/button-question/button-question.vue b/src/digital-components/button-question/button-question.vue index d1fe5b434..1d577a315 100644 --- a/src/digital-components/button-question/button-question.vue +++ b/src/digital-components/button-question/button-question.vue @@ -166,7 +166,7 @@ export default { return { lastValuePushedToGa: null, }; - }, + }, computed: { getFieldSetClasses() { const baseClasses = this.isOverflowScrollable @@ -276,7 +276,7 @@ export default { ); } }, - }, + }, components: { listButton, listButtonHorizontal, @@ -312,7 +312,7 @@ export default { margin-bottom: 1rem; font-size: 1rem; line-height: 1.625rem; - + & > span { text-align: center; } From 77ebdf1a7e0256556c6915196e5274451cf0e332 Mon Sep 17 00:00:00 2001 From: Leah Schumann Date: Tue, 25 Apr 2023 13:04:02 -0400 Subject: [PATCH 23/75] Checkpoint - needs additional testing / debugging --- .../service-location/service-location.vue | 38 +++--- .../shop-question/shop-question.vue | 124 ++++++++---------- src/mixins/analytics-mixin.js | 55 ++++---- 3 files changed, 104 insertions(+), 113 deletions(-) diff --git a/src/layouts/service-location/service-location.vue b/src/layouts/service-location/service-location.vue index b17a91878..42a8b92ad 100644 --- a/src/layouts/service-location/service-location.vue +++ b/src/layouts/service-location/service-location.vue @@ -46,7 +46,7 @@ alertClass="alert-warning" /> { - var end = this.shopIndex + n; - var part = array.slice(this.shopIndex, end); - this.shopIndex = end < l ? end : this.shops.length; - return part; + getNextShopsFromList(numberToGet = 3) { + const shopIterator = (array, n) => { + let l = array.length; + return () => { + var end = this.shopIndex + n; + var part = array.slice(this.shopIndex, end); + this.shopIndex = end < l ? end : this.shops.length; + return part; + }; }; - }, - async getNextShopsFromList() { - const nextShop = this.shopIterator(this.shops, 3); + + const nextShop = shopIterator(this.shops, numberToGet); // Map API result data const mappedData = nextShop().map((shop) => { @@ -147,70 +137,68 @@ export default { }); } - await this.$nextTick(); - - if (this.shopIndex == this.shops.length) { - this.displaySeeMoreLocationsLink = false; - } else { - this.displaySeeMoreLocationsLink = true; - } - - await this.$nextTick(); - - const container = document.getElementsByClassName("page-container-grouped-styles")[0]; - - container.scrollTo({ top: container.scrollHeight, left: 0, behavior: "smooth" }); - + this.$nextTick().then(() => { + if (this.shopIndex == this.shops.length) { + this.displaySeeMoreLocationsLink = false; + } else { + this.displaySeeMoreLocationsLink = true; + } + this.$nextTick().then(() => { + this.scrollToBottom(); + }); + }); }, resetShopList() { this.answers = []; this.shopIndex = 0; - this.getNextShopsFromList(); this.displaySeeMoreLocationsLink = true; this.selectedValue = ""; this.$refs.buttonQuestion.resetField(); }, + scrollToBottom() { + const container = document.getElementsByClassName("page-container-grouped-styles")[0]; + container.scrollTo({ top: container.scrollHeight, left: 0, behavior: "smooth" }); + }, }, - // mounted() { - // console.log(this.shopQuestionData); - // this.shops = this.shopQuestionData; - // this.getNextShopsFromList(); - // console.log(this.shops); - // }, watch: { serviceZipCode: { - async handler() { - this.shops = await this.updateShopList(); + handler(newValue) { + this.loadInitialData(newValue).then((result) => { + this.initializeComponent(result.data); + this.resetShopList(); + }); }, }, selectedAppointmentType: { - async handler(newValue, oldValue) { - if (oldValue == undefined) { - this.shops = this.shopQuestionData; - this.getNextShopsFromList(); - this.displaySeeMoreLocationsLink = true; - return; + handler(newValue) { + // If the validation has been previously triggered, clear it before displaying the component + this.$refs.buttonQuestion.resetField(); + + if (newValue != null) { + this.$nextTick().then(() => { + this.scrollToBottom(); + }); } - - await this.$nextTick(); - - const container = document.getElementsByClassName( - "page-container-grouped-styles" - )[0]; - container.scrollTo({ top: container.scrollHeight, left: 0, behavior: "smooth" }); - - this.resetShopList(); }, }, - shopQuestionData: { + shops: { handler(newValue) { - console.log(newValue) - this.shops = newValue; - this.getNextShopsFromList(); + this.$refs.buttonQuestion.resetField(); + const selectedShopIndex = newValue.findIndex((provider) => provider.providerNumber == this.modelValue); + if (selectedShopIndex >= 3) { + this.getNextShopsFromList(selectedShopIndex + 1); + } else { + this.getNextShopsFromList(); + } }, - } + }, + }, + components: { + alert, + buttonQuestion, + textLink, }, }; diff --git a/src/mixins/analytics-mixin.js b/src/mixins/analytics-mixin.js index 3fbc9501d..3779b06c5 100644 --- a/src/mixins/analytics-mixin.js +++ b/src/mixins/analytics-mixin.js @@ -24,38 +24,35 @@ import { applicationConfig } from "../constants/application-config"; export default { methods: { logPageView(pageEvent) { - const currentPageName = getPageNameByQueryString(); - var payload = { - userId: getDeviceIdValue(), - sessionKey: getSessionKeyValue(), - pageName: currentPageName, - sessionId: getSessionIdValue(), - action: "", - event: pageEvent, - shouldUseSessionId: false, - experimentsForUser: store.getters.applicationUser.experiments, - }; - - baseMixin.methods.dispatchStoreAction(storeActions.LOG_PAGE_VIEW, payload, false); + // const currentPageName = getPageNameByQueryString(); + // var payload = { + // userId: getDeviceIdValue(), + // sessionKey: getSessionKeyValue(), + // pageName: currentPageName, + // sessionId: getSessionIdValue(), + // action: "", + // event: pageEvent, + // shouldUseSessionId: false, + // experimentsForUser: store.getters.applicationUser.experiments, + // }; + // baseMixin.methods.dispatchStoreAction(storeActions.LOG_PAGE_VIEW, payload, false); }, logCustomEvent(category, action, label, value) { - const currentPageName = getPageNameByQueryString(); - - var payload = { - userId: getDeviceIdValue(), - sessionKey: getSessionKeyValue(), - pageName: currentPageName, - sessionId: getSessionIdValue(), - category: category, - action: action, - label: label, - value: value, - shouldUseSessionId: false, - experimentsForUser: store.getters.applicationUser.experiments, - }; - - baseMixin.methods.dispatchStoreAction(storeActions.LOG_CUSTOM_EVENT, payload, false); + // const currentPageName = getPageNameByQueryString(); + // var payload = { + // userId: getDeviceIdValue(), + // sessionKey: getSessionKeyValue(), + // pageName: currentPageName, + // sessionId: getSessionIdValue(), + // category: category, + // action: action, + // label: label, + // value: value, + // shouldUseSessionId: false, + // experimentsForUser: store.getters.applicationUser.experiments, + // }; + // baseMixin.methods.dispatchStoreAction(storeActions.LOG_CUSTOM_EVENT, payload, false); }, pushEventToGA(category, action, label, pushToLogApp = false, valueToLogType = null) { From 97a9cfb37ffd5e3a499e2c18819090d1b0c1ea84 Mon Sep 17 00:00:00 2001 From: Bryan Mauger Date: Tue, 25 Apr 2023 13:57:49 -0400 Subject: [PATCH 24/75] Add to button group. --- src/layouts/service-location/service-location.vue | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/layouts/service-location/service-location.vue b/src/layouts/service-location/service-location.vue index 42a8b92ad..2e4584c03 100644 --- a/src/layouts/service-location/service-location.vue +++ b/src/layouts/service-location/service-location.vue @@ -65,17 +65,17 @@ ref="mobileLocationQuestions" linkWidgetName="MobileLocationLinkWidget" modalWidgetName="MobileLocationModalWidget" /> + + Date: Tue, 25 Apr 2023 14:26:27 -0400 Subject: [PATCH 25/75] Checking in to work on defects --- .../service-location/service-location.vue | 25 +++++++++++-------- .../shop-question/shop-question.vue | 9 ++++--- 2 files changed, 21 insertions(+), 13 deletions(-) diff --git a/src/layouts/service-location/service-location.vue b/src/layouts/service-location/service-location.vue index 2e4584c03..63ed541e5 100644 --- a/src/layouts/service-location/service-location.vue +++ b/src/layouts/service-location/service-location.vue @@ -65,16 +65,19 @@ ref="mobileLocationQuestions" linkWidgetName="MobileLocationLinkWidget" modalWidgetName="MobileLocationModalWidget" /> - - + + { this.scrollToBottom(); }); @@ -186,7 +187,9 @@ export default { shops: { handler(newValue) { this.$refs.buttonQuestion.resetField(); - const selectedShopIndex = newValue.findIndex((provider) => provider.providerNumber == this.modelValue); + const selectedShopIndex = newValue.findIndex( + (provider) => provider.providerNumber == this.modelValue + ); if (selectedShopIndex >= 3) { this.getNextShopsFromList(selectedShopIndex + 1); } else { From 9bc189b63922f41af2e4829774d350ceb0015a65 Mon Sep 17 00:00:00 2001 From: Leah Schumann Date: Tue, 25 Apr 2023 14:29:24 -0400 Subject: [PATCH 26/75] Fixed placement of error message --- .../mobile-location-modal-questions.vue | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/layouts/service-location/mobile-location-modal-questions/mobile-location-modal-questions.vue b/src/layouts/service-location/mobile-location-modal-questions/mobile-location-modal-questions.vue index 4b0a4a1ac..f1dbd2291 100644 --- a/src/layouts/service-location/mobile-location-modal-questions/mobile-location-modal-questions.vue +++ b/src/layouts/service-location/mobile-location-modal-questions/mobile-location-modal-questions.vue @@ -17,15 +17,15 @@ @click-event="openModal" aria-label="Modal window" />
-
{{ errorMessage }}
+
Date: Tue, 25 Apr 2023 14:55:59 -0400 Subject: [PATCH 27/75] CSR-1306 fix spacing issues. --- src/layouts/license-plate-lookup/license-plate-lookup.vue | 6 +++--- src/layouts/vin-lookup/vin-information/vin-information.vue | 2 +- src/layouts/vin-lookup/vin-lookup.vue | 6 +++--- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/layouts/license-plate-lookup/license-plate-lookup.vue b/src/layouts/license-plate-lookup/license-plate-lookup.vue index efda89c97..03b56a4cb 100644 --- a/src/layouts/license-plate-lookup/license-plate-lookup.vue +++ b/src/layouts/license-plate-lookup/license-plate-lookup.vue @@ -7,7 +7,7 @@ :displayGenericVehicleImage="false" />
-
+
-
+
-
+
-
+
diff --git a/src/layouts/vin-lookup/vin-lookup.vue b/src/layouts/vin-lookup/vin-lookup.vue index 7d3211f08..578f3f72d 100644 --- a/src/layouts/vin-lookup/vin-lookup.vue +++ b/src/layouts/vin-lookup/vin-lookup.vue @@ -36,12 +36,12 @@ alertClass="alert-danger" />
-
+
-
+
-
+
Date: Tue, 25 Apr 2023 15:25:48 -0400 Subject: [PATCH 28/75] CSR-1399 Not all cms answers use name field --- src/common-components/button-question/button-question.vue | 7 ++++++- .../service-package-question/service-package-question.vue | 3 ++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/src/common-components/button-question/button-question.vue b/src/common-components/button-question/button-question.vue index b96b99bb4..a9f7e5f86 100644 --- a/src/common-components/button-question/button-question.vue +++ b/src/common-components/button-question/button-question.vue @@ -142,7 +142,12 @@ export default { var eventLabel = ""; //build comma separated list of all items in button list that we are going to display on page this.answers.forEach((item) => { - eventLabel += item.Name + ","; + if (item.Name){ + eventLabel += item.Name + ","; + } + if (item.buttonLabel) { + eventLabel += item.buttonLabel + ","; + } }); eventLabel = eventLabel.slice(0, -1); //remove the last comma diff --git a/src/layouts/quote/service-package-question/service-package-question.vue b/src/layouts/quote/service-package-question/service-package-question.vue index 1d9235374..783e55de2 100644 --- a/src/layouts/quote/service-package-question/service-package-question.vue +++ b/src/layouts/quote/service-package-question/service-package-question.vue @@ -6,7 +6,8 @@ :buttonTypeObject="servicePackageRadio" v-model="selectedPackageName" :validationRules="validationRules" - :isRequired="isRequired" /> + :isRequired="isRequired" + :logDisplayedValuesEvent="true" /> diff --git a/src/store/index.js b/src/store/index.js index 1548dd702..a61df90d6 100644 --- a/src/store/index.js +++ b/src/store/index.js @@ -681,6 +681,15 @@ export const actions = { }); }, + // Location API Actions + getAlertReasonsByCtu(context, { ctu }) { + return globalMethods.callHttpClient({ + method: endpoints.GetAlertReasons.method, + endpoint: `${endpoints.GetAlertReasons.url}/${ctu}`, + payload: {}, + }); + }, + // Misc Actions updateStoreWithSaveSessionResponse( context, From 8a55e1dbdd52b21eb655393c355a544b10e21e2c Mon Sep 17 00:00:00 2001 From: Bill Richardson Date: Tue, 9 May 2023 14:09:50 -0400 Subject: [PATCH 49/75] more inline with other page patterns --- .../schedule/helpers/schedule-helper.js | 13 ++++++ src/layouts/schedule/schedule.vue | 45 ++++++++++++------- 2 files changed, 42 insertions(+), 16 deletions(-) create mode 100644 src/layouts/schedule/helpers/schedule-helper.js diff --git a/src/layouts/schedule/helpers/schedule-helper.js b/src/layouts/schedule/helpers/schedule-helper.js new file mode 100644 index 000000000..1b743d8ac --- /dev/null +++ b/src/layouts/schedule/helpers/schedule-helper.js @@ -0,0 +1,13 @@ +import { storeActions } from "@/constants/store-actions"; +import baseMixin from "@/mixins/base-mixin.js"; + +export async function getAlertReasons(ctu) { + const alertReasons = await baseMixin.methods.dispatchStoreAction( + storeActions.GET_ALERT_REASONS_BY_CTU, + { + ctu: ctu, + } + ) + + return Promise.resolve(alertReasons); +} \ No newline at end of file diff --git a/src/layouts/schedule/schedule.vue b/src/layouts/schedule/schedule.vue index e3eb56525..bc980553d 100644 --- a/src/layouts/schedule/schedule.vue +++ b/src/layouts/schedule/schedule.vue @@ -57,6 +57,9 @@ import datePicker from "@/digital-components/date-picker/date-picker"; import { fetchCmsContentForPage } from "@/helpers/cms-content-helper"; import { settleAllPromises } from "@/helpers/layout-helper"; import { navigateToHeritageFunnel } from "@/helpers/heritage-integration/navigation-helper"; +import { + getAlertReasons, +} from "@/layouts/schedule/helpers/schedule-helper"; import { doesCopyContainRouterLink, splitCopyOnCMSPlaceHolder, @@ -75,6 +78,7 @@ export default { data() { return { selectedDate: null, + alertReasons: [], weatherAlerts: [], mockSelectableDatesData: [ { year: 2023, month: 4, date: 13 }, @@ -94,19 +98,26 @@ export default { // Call APIs const cmsContentPromise = fetchCmsContentForPage(to.query.fmgPage); + const alertReasonsPromise = getAlertReasons(store.getters.order.serviceLocation.zipCodeCtu); + // Settle promises and get results const promiseResultMap = [ { resultKey: "cmsContent", promise: cmsContentPromise, }, + { + resultKey: "alertReasons", + promise: alertReasonsPromise, + }, ]; const resultMap = await settleAllPromises(promiseResultMap); - + // Call the "next" function to complete the transition to this page. next((vm) => { vm.setCmsContent(resultMap.cmsContent); + vm.setData(resultMap.alertReasons); }); }, computed: { @@ -130,25 +141,28 @@ export default { return true; // NEED TODO - WHAT ARE PAGE REQ'S FOR THIS PAGE? }, + setData(alertReasonsData) { + if (alertReasonsData) { + this.convertReasonsToCmsAlerts(alertReasonsData); + } + }, cmsHeadlineTextFound(widgetName) { return this.getCmsContent(widgetName, "HeadlineText") !== "" }, - async getAlertReasons(ctu) { - await this.dispatchStoreAction( - storeActions.GET_ALERT_REASONS_BY_CTU, - { - ctu: ctu, - } - ) + convertReasonsToCmsAlerts(data) { + this.weatherAlerts = data.reduce((newObj, alert) => { + newObj.push({ + cmsWidgetName: `LocationAlert-${alert}`, + alertReason: alert, + }); + return newObj; + }, []); + }, + async getWeatherAlertReasons(ctu) { + await getAlertReasons(ctu) .then((response) => { if (response.data) { - this.weatherAlerts = response.data.reduce((newObj, alert) => { - newObj.push({ - cmsWidgetName: `LocationAlert-${alert}`, - alertReason: alert, - }); - return newObj; - }, []); + this.convertReasonsToCmsAlerts(response.data); } }) .catch(() => { @@ -178,7 +192,6 @@ export default { datePicker, }, mounted() { - this.getAlertReasons(this.getServiceZipCtuCodeFromStore()); }, }; From 166d52467e22dc7d3082ed796becb5b532f35260 Mon Sep 17 00:00:00 2001 From: Bill Richardson Date: Tue, 9 May 2023 15:39:48 -0400 Subject: [PATCH 50/75] remove unused import --- src/layouts/schedule/schedule.vue | 1 - 1 file changed, 1 deletion(-) diff --git a/src/layouts/schedule/schedule.vue b/src/layouts/schedule/schedule.vue index bc980553d..c4aeff7eb 100644 --- a/src/layouts/schedule/schedule.vue +++ b/src/layouts/schedule/schedule.vue @@ -68,7 +68,6 @@ import { } from "@/helpers/cms-content-helper"; import { errorMessages } from "@/constants/error-messages"; import { required } from "@/helpers/validation-rules"; -import { storeActions } from "@/constants/store-actions"; import store from "@/store"; defineRule("date-required", required(errorMessages.DATE_REQUIRED)); From 0307ab1c0ac549cefe3f43139fa92b118ee884ff Mon Sep 17 00:00:00 2001 From: Bill Richardson Date: Wed, 10 May 2023 10:56:08 -0400 Subject: [PATCH 51/75] unneeded variable --- src/layouts/schedule/schedule.vue | 1 - 1 file changed, 1 deletion(-) diff --git a/src/layouts/schedule/schedule.vue b/src/layouts/schedule/schedule.vue index c4aeff7eb..b2e8b0a05 100644 --- a/src/layouts/schedule/schedule.vue +++ b/src/layouts/schedule/schedule.vue @@ -77,7 +77,6 @@ export default { data() { return { selectedDate: null, - alertReasons: [], weatherAlerts: [], mockSelectableDatesData: [ { year: 2023, month: 4, date: 13 }, From 78ec13b7febee20a0f4e1a140d7ad93ed6935711 Mon Sep 17 00:00:00 2001 From: Bill Richardson Date: Wed, 10 May 2023 11:07:49 -0400 Subject: [PATCH 52/75] prettier'd --- .../schedule/helpers/schedule-helper.js | 16 +++++------ src/layouts/schedule/schedule.vue | 27 +++++++++---------- 2 files changed, 20 insertions(+), 23 deletions(-) diff --git a/src/layouts/schedule/helpers/schedule-helper.js b/src/layouts/schedule/helpers/schedule-helper.js index 1b743d8ac..005bd4b19 100644 --- a/src/layouts/schedule/helpers/schedule-helper.js +++ b/src/layouts/schedule/helpers/schedule-helper.js @@ -2,12 +2,12 @@ import { storeActions } from "@/constants/store-actions"; import baseMixin from "@/mixins/base-mixin.js"; export async function getAlertReasons(ctu) { - const alertReasons = await baseMixin.methods.dispatchStoreAction( - storeActions.GET_ALERT_REASONS_BY_CTU, - { - ctu: ctu, - } - ) + const alertReasons = await baseMixin.methods.dispatchStoreAction( + storeActions.GET_ALERT_REASONS_BY_CTU, + { + ctu: ctu, + } + ); - return Promise.resolve(alertReasons); -} \ No newline at end of file + return Promise.resolve(alertReasons); +} diff --git a/src/layouts/schedule/schedule.vue b/src/layouts/schedule/schedule.vue index b2e8b0a05..83c3562bf 100644 --- a/src/layouts/schedule/schedule.vue +++ b/src/layouts/schedule/schedule.vue @@ -57,9 +57,7 @@ import datePicker from "@/digital-components/date-picker/date-picker"; import { fetchCmsContentForPage } from "@/helpers/cms-content-helper"; import { settleAllPromises } from "@/helpers/layout-helper"; import { navigateToHeritageFunnel } from "@/helpers/heritage-integration/navigation-helper"; -import { - getAlertReasons, -} from "@/layouts/schedule/helpers/schedule-helper"; +import { getAlertReasons } from "@/layouts/schedule/helpers/schedule-helper"; import { doesCopyContainRouterLink, splitCopyOnCMSPlaceHolder, @@ -111,7 +109,7 @@ export default { ]; const resultMap = await settleAllPromises(promiseResultMap); - + // Call the "next" function to complete the transition to this page. next((vm) => { vm.setCmsContent(resultMap.cmsContent); @@ -145,7 +143,7 @@ export default { } }, cmsHeadlineTextFound(widgetName) { - return this.getCmsContent(widgetName, "HeadlineText") !== "" + return this.getCmsContent(widgetName, "HeadlineText") !== ""; }, convertReasonsToCmsAlerts(data) { this.weatherAlerts = data.reduce((newObj, alert) => { @@ -158,14 +156,14 @@ export default { }, async getWeatherAlertReasons(ctu) { await getAlertReasons(ctu) - .then((response) => { - if (response.data) { - this.convertReasonsToCmsAlerts(response.data); - } - }) - .catch(() => { - console.log("error fetching alert reasons.."); - }); + .then((response) => { + if (response.data) { + this.convertReasonsToCmsAlerts(response.data); + } + }) + .catch(() => { + console.log("error fetching alert reasons.."); + }); }, getAvailableDates(startDate, endDate) { return this.mockSelectableDatesData; @@ -189,8 +187,7 @@ export default { loadingModal, datePicker, }, - mounted() { - }, + mounted() {}, }; From 8586d6d35ab2124614fd8252a60526ec57bed7fe Mon Sep 17 00:00:00 2001 From: Leah Schumann Date: Wed, 10 May 2023 13:58:30 -0400 Subject: [PATCH 53/75] WIP --- .../shop-question/shop-question.spec.js | 8 ++--- .../shop-question/shop-question.vue | 34 +++++++++---------- 2 files changed, 21 insertions(+), 21 deletions(-) diff --git a/src/layouts/service-location/shop-question/shop-question.spec.js b/src/layouts/service-location/shop-question/shop-question.spec.js index 3053834a9..92bb88f21 100644 --- a/src/layouts/service-location/shop-question/shop-question.spec.js +++ b/src/layouts/service-location/shop-question/shop-question.spec.js @@ -171,7 +171,7 @@ describe("shop-question.vue", () => { serviceZipCode: "43081", selectedAppointmentType: "Dropoff", cmsWidgetName: cmsWidgetName, - isDisplayed: true + isDisplayed: true, }, mountOptions: { attachTo: document.body, @@ -227,7 +227,7 @@ describe("shop-question.vue", () => { serviceZipCode: "43081", selectedAppointmentType: "Dropoff", cmsWidgetName: cmsWidgetName, - isDisplayed: true + isDisplayed: true, }, mountOptions: { attachTo: document.body, @@ -306,7 +306,7 @@ describe("shop-question.vue", () => { serviceZipCode: "43081", selectedAppointmentType: "Dropoff", cmsWidgetName: cmsWidgetName, - isDisplayed: true + isDisplayed: true, }, mountOptions: { attachTo: document.body, @@ -365,7 +365,7 @@ describe("shop-question.vue", () => { serviceZipCode: "43081", selectedAppointmentType: "Dropoff", cmsWidgetName: cmsWidgetName, - isDisplayed: true + isDisplayed: true, }, mountOptions: { attachTo: document.body, diff --git a/src/layouts/service-location/shop-question/shop-question.vue b/src/layouts/service-location/shop-question/shop-question.vue index 90efb7f26..434c46d2e 100644 --- a/src/layouts/service-location/shop-question/shop-question.vue +++ b/src/layouts/service-location/shop-question/shop-question.vue @@ -193,25 +193,25 @@ export default { } }, }, - shopProviders: { - async handler(newValue) { - this.resetAnswers(); - - await this.$nextTick(); + // shopProviders: { + // async handler(newValue) { + // this.resetAnswers(); - if (this.selectedAppointmentType) { - const selectedShopIndex = newValue.findIndex( - (provider) => provider.providerNumber == this.modelValue?.providerNumber - ); + // await this.$nextTick(); - if (selectedShopIndex >= 3) { - await this.getNextShopsFromList(selectedShopIndex + 1); - } else { - await this.getNextShopsFromList(); - } - } - }, - } + // if (this.selectedAppointmentType) { + // const selectedShopIndex = newValue.findIndex( + // (provider) => provider.providerNumber == this.modelValue?.providerNumber + // ); + + // if (selectedShopIndex >= 3) { + // await this.getNextShopsFromList(selectedShopIndex + 1); + // } else { + // await this.getNextShopsFromList(); + // } + // } + // }, + // }, }, components: { alert, From 7d6973107c2b52e9afba3f57a021185d0be00999 Mon Sep 17 00:00:00 2001 From: Leah Schumann Date: Thu, 11 May 2023 13:01:02 -0400 Subject: [PATCH 54/75] CSR-1112 with fix for serviceability call --- .../shop-question/shop-question.vue | 32 +++++++++---------- src/store/index.js | 17 ++++------ 2 files changed, 23 insertions(+), 26 deletions(-) diff --git a/src/layouts/service-location/shop-question/shop-question.vue b/src/layouts/service-location/shop-question/shop-question.vue index 434c46d2e..10c1595b2 100644 --- a/src/layouts/service-location/shop-question/shop-question.vue +++ b/src/layouts/service-location/shop-question/shop-question.vue @@ -193,25 +193,25 @@ export default { } }, }, - // shopProviders: { - // async handler(newValue) { - // this.resetAnswers(); + shopProviders: { + async handler(newValue) { + //this.resetAnswers(); - // await this.$nextTick(); + await this.$nextTick(); - // if (this.selectedAppointmentType) { - // const selectedShopIndex = newValue.findIndex( - // (provider) => provider.providerNumber == this.modelValue?.providerNumber - // ); + if (this.selectedAppointmentType) { + const selectedShopIndex = newValue.findIndex( + (provider) => provider.providerNumber == this.modelValue + ); - // if (selectedShopIndex >= 3) { - // await this.getNextShopsFromList(selectedShopIndex + 1); - // } else { - // await this.getNextShopsFromList(); - // } - // } - // }, - // }, + if (selectedShopIndex >= 3) { + await this.getNextShopsFromList(selectedShopIndex + 1); + } else { + await this.getNextShopsFromList(); + } + } + }, + }, }, components: { alert, diff --git a/src/store/index.js b/src/store/index.js index c1fbf0e82..d68cee329 100644 --- a/src/store/index.js +++ b/src/store/index.js @@ -970,24 +970,21 @@ export const actions = { partNumber: lineItem.partNumber, }) ); - const lineItemsToSend = buildQueryStringParameterFromArrayOfComplexObjects( + const lineItems = buildQueryStringParameterFromArrayOfComplexObjects( lineItemsWithOnlyPartNumbers, "lineItems" ); + const vehicle = context.getters.vehicle; const carId = vehicle.carId; const damage = context.getters.damage; - const glassArray = damage.glassToReplace; - const glassArrayForPayload = convertGlassPieceNamingForApi(glassArray); + const glassArray = convertGlassPieceNamingForApi(damage.glassToReplace); + + const glassPieces = buildQueryStringParameterFromArrayOfComplexObjects(glassArray, "glassPieces") + return globalMethods.callHttpClient({ method: endpoints.GetServiceabilityDetails.method, - endpoint: endpoints.GetServiceabilityDetails.url, - payload: { - zip: serviceZipCode, - lineItems: lineItemsToSend, - carId: carId, - glassPieces: glassArrayForPayload, - }, + endpoint: `${endpoints.GetServiceabilityDetails.url}?zip=${serviceZipCode}&carId=${carId}&${lineItems}&${glassPieces}`, }); }, From 1869d86973c39d2587cba3f716948be06c71805b Mon Sep 17 00:00:00 2001 From: Leah Schumann Date: Thu, 11 May 2023 14:53:49 -0400 Subject: [PATCH 55/75] Commented out broken unit test for now --- .../shop-question/shop-question.spec.js | 64 +++++++++---------- 1 file changed, 32 insertions(+), 32 deletions(-) diff --git a/src/layouts/service-location/shop-question/shop-question.spec.js b/src/layouts/service-location/shop-question/shop-question.spec.js index 92bb88f21..75ec50fc5 100644 --- a/src/layouts/service-location/shop-question/shop-question.spec.js +++ b/src/layouts/service-location/shop-question/shop-question.spec.js @@ -435,41 +435,41 @@ describe("shop-question.vue", () => { ]); }); - it("Should display the number of shops necessary to show a previously selected shop", async () => { - // Arrange - const { wrapper } = setupMocks({ - mixins: [mockMixin], - props: { - modelValue: { - address: { - city: "POWELL", - country: "US", - state: "OH", - streetAddress: "3938 POWELL RD", - zipCode: "43065", - }, - distanceInMiles: 16.2690495685233, - providerNumber: "003341", - }, - serviceZipCode: "43081", - selectedAppointmentType: "Dropoff", - cmsWidgetName: cmsWidgetName, - }, - mountOptions: { - attachTo: document.body, - }, - }); + // it("Should display the number of shops necessary to show a previously selected shop", async () => { + // // Arrange + // const { wrapper } = setupMocks({ + // mixins: [mockMixin], + // props: { + // modelValue: { + // address: { + // city: "POWELL", + // country: "US", + // state: "OH", + // streetAddress: "3938 POWELL RD", + // zipCode: "43065", + // }, + // distanceInMiles: 16.2690495685233, + // providerNumber: "003341", + // }, + // serviceZipCode: "43081", + // selectedAppointmentType: "Dropoff", + // cmsWidgetName: cmsWidgetName, + // }, + // mountOptions: { + // attachTo: document.body, + // }, + // }); - // Act - wrapper.vm.initializeComponent(shopQuestionInitialData); + // // Act + // wrapper.vm.initializeComponent(shopQuestionInitialData); - await wrapper.vm.$nextTick(); - await wrapper.vm.$nextTick(); - await wrapper.vm.$nextTick(); + // await wrapper.vm.$nextTick(); + // await wrapper.vm.$nextTick(); + // await wrapper.vm.$nextTick(); - // Assert - expect(wrapper.vm.answers.length).toEqual(5); - }); + // // Assert + // expect(wrapper.vm.answers.length).toEqual(5); + // }); it("Should reset the answers when the selected appointment type changes", async () => { // Arrange From e13739aeabfcdb5da3ae772a5ac6ec7530b3adbf Mon Sep 17 00:00:00 2001 From: Leah Schumann Date: Thu, 11 May 2023 15:03:25 -0400 Subject: [PATCH 56/75] Prettyfied --- src/store/index.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/store/index.js b/src/store/index.js index 222abe2ca..ea3521a3b 100644 --- a/src/store/index.js +++ b/src/store/index.js @@ -989,7 +989,10 @@ export const actions = { const damage = context.getters.damage; const glassArray = convertGlassPieceNamingForApi(damage.glassToReplace); - const glassPieces = buildQueryStringParameterFromArrayOfComplexObjects(glassArray, "glassPieces") + const glassPieces = buildQueryStringParameterFromArrayOfComplexObjects( + glassArray, + "glassPieces" + ); return globalMethods.callHttpClient({ method: endpoints.GetServiceabilityDetails.method, From 8a6dbe7b0cd0dd3dff7846115a47888d61a6dde3 Mon Sep 17 00:00:00 2001 From: Leah Schumann Date: Fri, 12 May 2023 07:33:17 -0400 Subject: [PATCH 57/75] Fixed validation issue when switching between appointment types and fixed broken unit test --- .../shop-question/shop-question.spec.js | 54 ++++++++----------- .../shop-question/shop-question.vue | 4 ++ 2 files changed, 26 insertions(+), 32 deletions(-) diff --git a/src/layouts/service-location/shop-question/shop-question.spec.js b/src/layouts/service-location/shop-question/shop-question.spec.js index 75ec50fc5..1a1e0af98 100644 --- a/src/layouts/service-location/shop-question/shop-question.spec.js +++ b/src/layouts/service-location/shop-question/shop-question.spec.js @@ -435,41 +435,31 @@ describe("shop-question.vue", () => { ]); }); - // it("Should display the number of shops necessary to show a previously selected shop", async () => { - // // Arrange - // const { wrapper } = setupMocks({ - // mixins: [mockMixin], - // props: { - // modelValue: { - // address: { - // city: "POWELL", - // country: "US", - // state: "OH", - // streetAddress: "3938 POWELL RD", - // zipCode: "43065", - // }, - // distanceInMiles: 16.2690495685233, - // providerNumber: "003341", - // }, - // serviceZipCode: "43081", - // selectedAppointmentType: "Dropoff", - // cmsWidgetName: cmsWidgetName, - // }, - // mountOptions: { - // attachTo: document.body, - // }, - // }); + it("Should display the number of shops necessary to show a previously selected shop", async () => { + // Arrange + const { wrapper } = setupMocks({ + mixins: [mockMixin], + props: { + modelValue: "003341", + serviceZipCode: "43081", + selectedAppointmentType: "Dropoff", + cmsWidgetName: cmsWidgetName, + }, + mountOptions: { + attachTo: document.body, + }, + }); - // // Act - // wrapper.vm.initializeComponent(shopQuestionInitialData); + // Act + wrapper.vm.initializeComponent(shopQuestionInitialData); - // await wrapper.vm.$nextTick(); - // await wrapper.vm.$nextTick(); - // await wrapper.vm.$nextTick(); + await wrapper.vm.$nextTick(); + await wrapper.vm.$nextTick(); + await wrapper.vm.$nextTick(); - // // Assert - // expect(wrapper.vm.answers.length).toEqual(5); - // }); + // Assert + expect(wrapper.vm.answers.length).toEqual(5); + }); it("Should reset the answers when the selected appointment type changes", async () => { // Arrange diff --git a/src/layouts/service-location/shop-question/shop-question.vue b/src/layouts/service-location/shop-question/shop-question.vue index 10c1595b2..d64a2e55e 100644 --- a/src/layouts/service-location/shop-question/shop-question.vue +++ b/src/layouts/service-location/shop-question/shop-question.vue @@ -170,6 +170,10 @@ export default { this.answers = []; this.shopIndex = 0; this.selectedValue = ""; + + if (this.$refs.buttonQuestion) { + this.$refs.buttonQuestion.resetField(); + } }, async reloadShopData(serviceZipCode) { const result = await this.loadData(serviceZipCode); From e115b2a5c11264e07479a057a4909adbb3ff5924 Mon Sep 17 00:00:00 2001 From: Leah Schumann Date: Fri, 12 May 2023 10:07:23 -0400 Subject: [PATCH 58/75] Added separate emit for the full provider object when a button is clicked --- .../service-location/service-location.vue | 31 ++++++++++++++++--- .../shop-question/shop-question.spec.js | 18 ++++------- .../shop-question/shop-question.vue | 3 +- 3 files changed, 35 insertions(+), 17 deletions(-) diff --git a/src/layouts/service-location/service-location.vue b/src/layouts/service-location/service-location.vue index 2f2d3a5a7..c5b7b0f3c 100644 --- a/src/layouts/service-location/service-location.vue +++ b/src/layouts/service-location/service-location.vue @@ -71,7 +71,8 @@ { return true; }); +const defaultProvider = { + providerNumber: null, + address: null, + city: null, + state: null, + zip: null, +}; + export default { name: "service-location", data() { @@ -148,7 +157,8 @@ export default { isGlassServiceableMobile: null, isRecalibrationServiceableMobile: null, selectedAppointmentType: null, - selectedProvider: null, + selectedProvider: this.getSelectedProvider(), + selectedProviderNumber: this.getSelectedProvider().providerNumber, mobileFeePart: null, zipContainsMilitaryBase: false, }; @@ -215,7 +225,7 @@ export default { if (newValue.zipCode !== this.zipCode) { this.resetMobileLocation(); this.selectedAppointmentType = null; - this.selectedProvider = null; + this.selectedProvider = defaultProvider; } this.state = newValue.state; @@ -250,7 +260,7 @@ export default { if (!this.selectedAppointmentType == "Mobile") { this.selectedAppointmentType = null; } - this.selectedProvider = null; + this.selectedProvider = defaultProvider; } }, }, @@ -340,6 +350,9 @@ export default { getServiceZipCodeFromStore() { return store.getters.order.serviceLocation.zipCode; }, + getSelectedProvider() { + return store.getters.order.serviceLocation.provider ?? defaultProvider; + }, setMobileFeePart(mobileFeePart) { this.mobileFeePart = mobileFeePart; }, @@ -373,6 +386,16 @@ export default { async reloadShopData() { await this.$refs.shopQuestion.reloadShopData(this.zipCode); }, + onProviderSelected(selectedProvider) { + this.selectedProvider = selectedProvider; + }, + }, + watch: { + selectedProvider: { + handler(newValue) { + console.log(newValue); + }, + }, }, components: { alert, diff --git a/src/layouts/service-location/shop-question/shop-question.spec.js b/src/layouts/service-location/shop-question/shop-question.spec.js index 1a1e0af98..70a158f0a 100644 --- a/src/layouts/service-location/shop-question/shop-question.spec.js +++ b/src/layouts/service-location/shop-question/shop-question.spec.js @@ -157,17 +157,7 @@ describe("shop-question.vue", () => { const { wrapper } = setupMocks({ mixins: [mockMixin], props: { - modelValue: { - address: { - city: "POWELL", - country: "US", - state: "OH", - streetAddress: "3938 POWELL RD", - zipCode: "43065", - }, - distanceInMiles: 16.2690495685233, - providerNumber: null, - }, + modelValue: null, serviceZipCode: "43081", selectedAppointmentType: "Dropoff", cmsWidgetName: cmsWidgetName, @@ -437,10 +427,14 @@ describe("shop-question.vue", () => { it("Should display the number of shops necessary to show a previously selected shop", async () => { // Arrange + const selectedProvider = { + providerNumber: "003341", + }; + const { wrapper } = setupMocks({ mixins: [mockMixin], props: { - modelValue: "003341", + modelValue: selectedProvider.providerNumber, serviceZipCode: "43081", selectedAppointmentType: "Dropoff", cmsWidgetName: cmsWidgetName, diff --git a/src/layouts/service-location/shop-question/shop-question.vue b/src/layouts/service-location/shop-question/shop-question.vue index d64a2e55e..f12319d8d 100644 --- a/src/layouts/service-location/shop-question/shop-question.vue +++ b/src/layouts/service-location/shop-question/shop-question.vue @@ -89,7 +89,8 @@ export default { (provider) => provider.providerNumber == newValue ); - this.$emit("update:modelValue", provider); + this.$emit("update:modelValue", newValue); + this.$emit("providerSelected", provider); }, }, displayDropoffInformation() { From 63fa093de933afc953d42c7d14c179b44843b8fc Mon Sep 17 00:00:00 2001 From: Leah Schumann Date: Fri, 12 May 2023 10:10:13 -0400 Subject: [PATCH 59/75] Removed testing watch --- src/layouts/service-location/service-location.vue | 7 ------- 1 file changed, 7 deletions(-) diff --git a/src/layouts/service-location/service-location.vue b/src/layouts/service-location/service-location.vue index c5b7b0f3c..69eef0d8b 100644 --- a/src/layouts/service-location/service-location.vue +++ b/src/layouts/service-location/service-location.vue @@ -390,13 +390,6 @@ export default { this.selectedProvider = selectedProvider; }, }, - watch: { - selectedProvider: { - handler(newValue) { - console.log(newValue); - }, - }, - }, components: { alert, serviceZipModalQuestion, From bb0dee96ff9bc052b778600dbe9f66906f2ffd34 Mon Sep 17 00:00:00 2001 From: Leah Schumann Date: Fri, 12 May 2023 10:33:53 -0400 Subject: [PATCH 60/75] renamed resetShopList in reloadShopData to resetAnswers --- src/layouts/service-location/shop-question/shop-question.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/layouts/service-location/shop-question/shop-question.vue b/src/layouts/service-location/shop-question/shop-question.vue index f12319d8d..2b7e41742 100644 --- a/src/layouts/service-location/shop-question/shop-question.vue +++ b/src/layouts/service-location/shop-question/shop-question.vue @@ -180,7 +180,7 @@ export default { const result = await this.loadData(serviceZipCode); this.initializeComponent(result.data); - this.resetShopList(); + this.resetAnswers(); await nextTick(); await this.getNextShopsFromList(); From 91d723b3eb5fb5cdbac588761d4dee06013bcdd8 Mon Sep 17 00:00:00 2001 From: Leah Schumann Date: Fri, 12 May 2023 13:08:03 -0400 Subject: [PATCH 61/75] Added getSelectedAppointmentType method --- src/layouts/service-location/service-location.vue | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/layouts/service-location/service-location.vue b/src/layouts/service-location/service-location.vue index 69eef0d8b..5ab45533e 100644 --- a/src/layouts/service-location/service-location.vue +++ b/src/layouts/service-location/service-location.vue @@ -156,7 +156,7 @@ export default { isRecalibrationServiceableInshop: null, isGlassServiceableMobile: null, isRecalibrationServiceableMobile: null, - selectedAppointmentType: null, + selectedAppointmentType: this.getSelectedAppointmentType(), selectedProvider: this.getSelectedProvider(), selectedProviderNumber: this.getSelectedProvider().providerNumber, mobileFeePart: null, @@ -350,6 +350,9 @@ export default { getServiceZipCodeFromStore() { return store.getters.order.serviceLocation.zipCode; }, + getSelectedAppointmentType() { + return store.getters.order.serviceLocation.appointmentType; + }, getSelectedProvider() { return store.getters.order.serviceLocation.provider ?? defaultProvider; }, From 7f634c4db8577ef567778ec057dd32c7af4f379d Mon Sep 17 00:00:00 2001 From: CarlNation Date: Fri, 12 May 2023 13:27:00 -0400 Subject: [PATCH 62/75] CSR-1115 --- .../service-location/service-location.vue | 28 ++++++++++- src/store/index.js | 48 ++++++++++++++++++- 2 files changed, 72 insertions(+), 4 deletions(-) diff --git a/src/layouts/service-location/service-location.vue b/src/layouts/service-location/service-location.vue index 5ab45533e..f8771c530 100644 --- a/src/layouts/service-location/service-location.vue +++ b/src/layouts/service-location/service-location.vue @@ -161,6 +161,7 @@ export default { selectedProviderNumber: this.getSelectedProvider().providerNumber, mobileFeePart: null, zipContainsMilitaryBase: false, + zipCodeCtu: null, }; }, async beforeRouteEnter(to, from, next) { @@ -323,6 +324,7 @@ export default { setData(zipCodeData, serviceabilityDetails, mobileFeePart) { if (zipCodeData) { this.zipContainsMilitaryBase = zipCodeData.containsMilitaryBase; + this.zipCodeCtu = zipCodeData.zipCodeCtu; } if (serviceabilityDetails) { @@ -377,8 +379,30 @@ export default { backButtonAction() { this.$router.navigateWithoutSaving(this.navigationScenarios.CLICKED_BACK, this.$route); }, - forwardButtonAction() { - this.$router.navigateWithoutSaving( + async forwardButtonAction() { + await this.dispatchStoreAction( + this.storeActions.SAVE_SERVICE_LOCATION, + { + address: this.streetAddress, + address2: this.apartmentNumberOrBusinessName, + city: this.city, + state: this.state, + zipCode: this.zipCode, + zipCodeCtu: this.zipCodeCtu, + appointmentType: this.selectedAppointmentType, + isVehicleProtected: this.isVehicleProtected, + provider: { + providerNumber: this.selectedProvider.providerNumber, + address: this.selectedProvider.address.streetAddress, + city: this.selectedProvider.address.city, + state: this.selectedProvider.address.state, + zip: this.selectedProvider.address.zipCode, + }, + }, + false + ); + + this.$router.navigateWithSaving( this.navigationScenarios.SELECTED_LOCATION, this.$route ); diff --git a/src/store/index.js b/src/store/index.js index ea3521a3b..0abab4727 100644 --- a/src/store/index.js +++ b/src/store/index.js @@ -44,6 +44,13 @@ const getDefaultState = () => { zipCode: null, zipCodeCtu: null, appointmentType: null, + provider: { + providerNumber: null, + address: null, + city: null, + state: null, + zip: null, + }, }, customer: { emailAddress: null, @@ -226,10 +233,22 @@ export const mutations = { }, updateServiceLocation(state, serviceLocationInfo) { state.order.serviceLocation.address = serviceLocationInfo.address; + state.order.serviceLocation.address2 = serviceLocationInfo.address2; state.order.serviceLocation.city = serviceLocationInfo.city; state.order.serviceLocation.state = serviceLocationInfo.state; state.order.serviceLocation.zipCode = serviceLocationInfo.zipCode; state.order.serviceLocation.zipCodeCtu = serviceLocationInfo.zipCodeCtu; + state.order.serviceLocation.appointmentType = serviceLocationInfo.appointmentType; + state.order.serviceLocation.isVehicleProtected = serviceLocationInfo.isVehicleProtected; + + if (serviceLocationInfo.provider) { + state.order.serviceLocation.provider.providerNumber = + serviceLocationInfo.provider?.providerNumber; + state.order.serviceLocation.provider.address = serviceLocationInfo.provider?.address; + state.order.serviceLocation.provider.city = serviceLocationInfo.provider?.city; + state.order.serviceLocation.provider.state = serviceLocationInfo.provider?.state; + state.order.serviceLocation.provider.zip = serviceLocationInfo.provider?.zip; + } }, // applicationUser MUTATIONS @@ -358,15 +377,31 @@ export const mutations = { state.order.lineItems.serverData = sessionInformation.order.lineItems.serverData; state.order.payment.parentAccountNumber = sessionInformation.order.payment.parentAccountNumber; - state.order.providerNumber = sessionInformation.order.providerNumber; (state.order.serviceLocation.address = sessionInformation.order.serviceLocation.streetAddress), + (state.order.serviceLocation.address2 = + sessionInformation.order.serviceLocation.address2), (state.order.serviceLocation.city = sessionInformation.order.serviceLocation.city), (state.order.serviceLocation.state = sessionInformation.order.serviceLocation.state), (state.order.serviceLocation.zipCode = sessionInformation.order.serviceLocation.zipCode), (state.order.serviceLocation.zipCodeCtu = sessionInformation.order.serviceLocation.zipCodeCtu); + state.order.serviceLocation.appointmentType = + sessionInformation.order.serviceLocation.appointmentType; + state.order.serviceLocation.isVehicleProtected = + sessionInformation.order.serviceLocation.isVehicleProtected; + + state.order.serviceLocation.provider.providerNumber = + sessionInformation.order.serviceLocation.provider?.providerNumber; + state.order.serviceLocation.provider.address = + sessionInformation.order.serviceLocation.provider?.address; + state.order.serviceLocation.provider.city = + sessionInformation.order.serviceLocation.provider?.city; + state.order.serviceLocation.provider.state = + sessionInformation.order.serviceLocation.provider?.state; + state.order.serviceLocation.provider.zip = + sessionInformation.order.serviceLocation.provider?.zip; state.order.payment.isInsurance = sessionInformation.order.payment.isInsurance; state.order.payment.insuranceCoverage.isVerified = @@ -1120,13 +1155,22 @@ export const actions = { isInsurance: order.payment.isInsurance ?? false, parentAccountNumber: order.payment.parentAccountNumber, }, - providerNumber: "", serviceLocation: { streetAddress: order.serviceLocation.address, + streetAddress2: order.serviceLocation.address2, city: order.serviceLocation.city, state: order.serviceLocation.state, zipCode: order.serviceLocation.zipCode, zipCodeCtu: order.serviceLocation.zipCodeCtu, + appointmentType: order.serviceLocation.appointmentType, + isVehicleProtected: order.serviceLocation.isVehicleProtected, + provider: { + providerNumber: order.serviceLocation.provider?.providerNumber, + address: order.serviceLocation.provider?.address, + city: order.serviceLocation.provider?.city, + state: order.serviceLocation.provider?.state, + zip: order.serviceLocation.provider?.zip, + }, }, existingPromoCode: null, referralCorrelationId: order.referralCorrelationId, From 76136bc311d3b2115b77ff14dd079bd82a083f23 Mon Sep 17 00:00:00 2001 From: CarlNation Date: Fri, 12 May 2023 13:59:09 -0400 Subject: [PATCH 63/75] CSR-1115 --- src/store/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/store/index.js b/src/store/index.js index 0abab4727..9e9587131 100644 --- a/src/store/index.js +++ b/src/store/index.js @@ -243,7 +243,7 @@ export const mutations = { if (serviceLocationInfo.provider) { state.order.serviceLocation.provider.providerNumber = - serviceLocationInfo.provider?.providerNumber; + serviceLocationInfo.provider.providerNumber; state.order.serviceLocation.provider.address = serviceLocationInfo.provider?.address; state.order.serviceLocation.provider.city = serviceLocationInfo.provider?.city; state.order.serviceLocation.provider.state = serviceLocationInfo.provider?.state; From de4568f9f3324f12203e7eb1e160bc03b3cc49eb Mon Sep 17 00:00:00 2001 From: CarlNation Date: Fri, 12 May 2023 14:26:09 -0400 Subject: [PATCH 64/75] CSR-1115 --- src/store/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/store/index.js b/src/store/index.js index 9e9587131..0abab4727 100644 --- a/src/store/index.js +++ b/src/store/index.js @@ -243,7 +243,7 @@ export const mutations = { if (serviceLocationInfo.provider) { state.order.serviceLocation.provider.providerNumber = - serviceLocationInfo.provider.providerNumber; + serviceLocationInfo.provider?.providerNumber; state.order.serviceLocation.provider.address = serviceLocationInfo.provider?.address; state.order.serviceLocation.provider.city = serviceLocationInfo.provider?.city; state.order.serviceLocation.provider.state = serviceLocationInfo.provider?.state; From d8c503fd8afbff624f1e41c4f5bb23053bf06549 Mon Sep 17 00:00:00 2001 From: CarlNation Date: Tue, 16 May 2023 16:16:14 -0400 Subject: [PATCH 65/75] CSR-1115 check for null provider. occurs on mobile currently --- src/layouts/service-location/service-location.vue | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/layouts/service-location/service-location.vue b/src/layouts/service-location/service-location.vue index f8771c530..e05d945a7 100644 --- a/src/layouts/service-location/service-location.vue +++ b/src/layouts/service-location/service-location.vue @@ -392,11 +392,11 @@ export default { appointmentType: this.selectedAppointmentType, isVehicleProtected: this.isVehicleProtected, provider: { - providerNumber: this.selectedProvider.providerNumber, - address: this.selectedProvider.address.streetAddress, - city: this.selectedProvider.address.city, - state: this.selectedProvider.address.state, - zip: this.selectedProvider.address.zipCode, + providerNumber: this.selectedProvider?.providerNumber, + address: this.selectedProvider?.address?.streetAddress, + city: this.selectedProvider?.address?.city, + state: this.selectedProvider?.address?.state, + zip: this.selectedProvider?.address?.zipCode, }, }, false From 8e63abd08d16d47e5eec7687040d2d4af8654bd4 Mon Sep 17 00:00:00 2001 From: Chloe Herd Date: Tue, 16 May 2023 17:39:30 -0400 Subject: [PATCH 66/75] Add initial iteration for review page --- src/layouts/review/review.spec.js | 0 src/layouts/review/review.vue | 104 ++++++++++++++++++++++++++++++ src/router/index.js | 6 ++ 3 files changed, 110 insertions(+) create mode 100644 src/layouts/review/review.spec.js create mode 100644 src/layouts/review/review.vue diff --git a/src/layouts/review/review.spec.js b/src/layouts/review/review.spec.js new file mode 100644 index 000000000..e69de29bb diff --git a/src/layouts/review/review.vue b/src/layouts/review/review.vue new file mode 100644 index 000000000..b2fbd5f21 --- /dev/null +++ b/src/layouts/review/review.vue @@ -0,0 +1,104 @@ + + + + + diff --git a/src/router/index.js b/src/router/index.js index 3abfa058d..86c402187 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -31,6 +31,7 @@ import { applicationConfig } from "../constants/application-config"; // Components import datePicker from "@/digital-components/date-picker/date-picker.vue"; import demoDatePicker from "@/layouts/demo-date-picker/demo-date-picker.vue"; +import review from "@/layouts/review/review"; const routes = [ { @@ -43,6 +44,11 @@ const routes = [ name: "date-picker", component: datePicker, }, + { + path: "/review", // This is a temporary route for testing. + name: "review", + component: review, + }, { path: "/", name: "root", From 548b7297453e27fef7a3c6645a7e6779a9c63aad Mon Sep 17 00:00:00 2001 From: Chloe Herd Date: Wed, 17 May 2023 08:20:57 -0400 Subject: [PATCH 67/75] Change to textblock implementation. --- src/layouts/review/review.vue | 19 ++++--------------- 1 file changed, 4 insertions(+), 15 deletions(-) diff --git a/src/layouts/review/review.vue b/src/layouts/review/review.vue index b2fbd5f21..cc6d3c56b 100644 --- a/src/layouts/review/review.vue +++ b/src/layouts/review/review.vue @@ -7,21 +7,8 @@ cmsWidgetName="VehicleBannerWidget" :displayGenericVehicleImage="false" /> - - -
-
-
- -
-
-
-

- -

-
-
+ + From eeb1ee50664cf24138aa87e5498b2b36afbc0a16 Mon Sep 17 00:00:00 2001 From: Chloe Herd Date: Wed, 17 May 2023 08:44:31 -0400 Subject: [PATCH 68/75] Fiddling with margins --- src/digital-components/text-block/text-block.vue | 9 +++++++-- src/layouts/review/review.vue | 13 +++++++++++-- 2 files changed, 18 insertions(+), 4 deletions(-) diff --git a/src/digital-components/text-block/text-block.vue b/src/digital-components/text-block/text-block.vue index 9e7df6312..e93e2e6c4 100644 --- a/src/digital-components/text-block/text-block.vue +++ b/src/digital-components/text-block/text-block.vue @@ -1,7 +1,7 @@ @@ -11,6 +11,11 @@ export default { props: { customText: String, // used to allow the insert of token values into textblock justifyText: String, // left, right, center + margin: { + // bootstrap margin to apply to the block. + type: String, + default: "mt-2", + }, typeStyle: String, // h1-h6, body, small, label, caption (see Figma or Confluence documentation) fontWeight: String, // bold=500, default is 400 cmsWidgetName: String, diff --git a/src/layouts/review/review.vue b/src/layouts/review/review.vue index cc6d3c56b..7d059ac86 100644 --- a/src/layouts/review/review.vue +++ b/src/layouts/review/review.vue @@ -7,8 +7,17 @@ cmsWidgetName="VehicleBannerWidget" :displayGenericVehicleImage="false" /> - - + + Date: Wed, 17 May 2023 09:16:07 -0400 Subject: [PATCH 69/75] Very basic test stub. --- src/layouts/review/review.spec.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/layouts/review/review.spec.js b/src/layouts/review/review.spec.js index e69de29bb..674dc71f7 100644 --- a/src/layouts/review/review.spec.js +++ b/src/layouts/review/review.spec.js @@ -0,0 +1,3 @@ +describe("Review Page", () => { + test.todo("Add more tests as specific functionality is added."); +}); From f239631d050ab0cbfb20517455fd21201983b337 Mon Sep 17 00:00:00 2001 From: Chloe Herd Date: Wed, 17 May 2023 11:23:45 -0400 Subject: [PATCH 70/75] Clarify todo --- src/layouts/review/review.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/layouts/review/review.vue b/src/layouts/review/review.vue index 7d059ac86..9bccb2014 100644 --- a/src/layouts/review/review.vue +++ b/src/layouts/review/review.vue @@ -1,6 +1,6 @@