From f18032d92ef7a7c9c65d105998f8e70c3dc11eac Mon Sep 17 00:00:00 2001 From: Chloe Herd Date: Thu, 30 Mar 2023 16:37:56 -0400 Subject: [PATCH 1/9] Initial iteration - added modals and some of the logic. --- .../service-location/service-location.vue | 26 +++++++++++++++++++ src/store/index.js | 4 +-- 2 files changed, 28 insertions(+), 2 deletions(-) diff --git a/src/layouts/service-location/service-location.vue b/src/layouts/service-location/service-location.vue index 69b4f4926..6c8ef58d1 100644 --- a/src/layouts/service-location/service-location.vue +++ b/src/layouts/service-location/service-location.vue @@ -25,6 +25,18 @@ cmsWidgetName="AlertMobileOnlyWidget" v-if="displayServiceableMobileOnly" alertClass="alert-warning" /> + + + diff --git a/src/store/index.js b/src/store/index.js index 2dbc7b2cc..abcf231f0 100644 --- a/src/store/index.js +++ b/src/store/index.js @@ -931,8 +931,8 @@ export const actions = { return globalMethods.callMockHttpClient({ method: endpoints.GetServiceabilityDetails.method, //TODO: Remove Mocky Endpoints - endpoint: "https://run.mocky.io/v3/59e1a644-cf16-4f08-8069-1ab2a1e38f79", // NoShopsAvailable - //endpoint: "https://run.mocky.io/v3/4fe1fb89-dd56-4e4a-9af2-96bd1ab77847", // ForcedInshop + //endpoint: "https://run.mocky.io/v3/59e1a644-cf16-4f08-8069-1ab2a1e38f79", // NoShopsAvailable + endpoint: "https://run.mocky.io/v3/4fe1fb89-dd56-4e4a-9af2-96bd1ab77847", // ForcedInshop //endpoint: "https://run.mocky.io/v3/e2eaa097-6ea5-4906-af53-901edaa94939", // ForcedMobile //endpoint: "https://run.mocky.io/v3/1811a1fe-12a7-48f3-939e-d10a9b77dd25", // All Options }); From 8daa078c299967c324a0dac4fc2abfd1185b600a Mon Sep 17 00:00:00 2001 From: Chloe Herd Date: Tue, 4 Apr 2023 15:11:38 -0400 Subject: [PATCH 2/9] Add text link rendering to alert + hook into opening modal. --- .../service-location/service-location.vue | 6 ++++- src/ux-components/alert/alert.vue | 23 ++++++++++++++++--- 2 files changed, 25 insertions(+), 4 deletions(-) diff --git a/src/layouts/service-location/service-location.vue b/src/layouts/service-location/service-location.vue index 6c8ef58d1..846a1731e 100644 --- a/src/layouts/service-location/service-location.vue +++ b/src/layouts/service-location/service-location.vue @@ -30,6 +30,7 @@ class="my-4" cmsWidgetName="AlertRecalNoMobileWidget" v-if="displayRecalibrationWarning" + @text-link-clicked="openModalAction" alertClass="alert-warning" />

@@ -40,11 +51,13 @@ From f87a64380bd85d3ca58ecbb849dcaa6e7d3b720c Mon Sep 17 00:00:00 2001 From: Chloe Herd Date: Tue, 4 Apr 2023 16:38:49 -0400 Subject: [PATCH 3/9] Add recalibration-checking logic. --- src/layouts/service-location/service-location.vue | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/layouts/service-location/service-location.vue b/src/layouts/service-location/service-location.vue index 846a1731e..577120c85 100644 --- a/src/layouts/service-location/service-location.vue +++ b/src/layouts/service-location/service-location.vue @@ -232,9 +232,13 @@ export default { return this.isGlassServiceableInshop; } }, + isDualOrStaticRecalibration() { + const supportingItems = store.getters.lineItems.supportingItems; + + return supportingItems.some((item) => item.partNumber === "RECAL STATIC" || item.partNumber === "RECAL DUAL"); + }, displayRecalibrationWarning() { - //TODO: Check lineItems for static or dual recalibration. - return true; + return this.isDualOrStaticRecalibration; }, displayServiceableInshopOnly() { return ( From 572831254d60ee1e3a0bb7c245971f1fade06409 Mon Sep 17 00:00:00 2001 From: Chloe Herd Date: Wed, 5 Apr 2023 08:57:01 -0400 Subject: [PATCH 4/9] Formatting --- src/layouts/service-location/service-location.vue | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/layouts/service-location/service-location.vue b/src/layouts/service-location/service-location.vue index 577120c85..800f7ee52 100644 --- a/src/layouts/service-location/service-location.vue +++ b/src/layouts/service-location/service-location.vue @@ -234,8 +234,10 @@ export default { }, isDualOrStaticRecalibration() { const supportingItems = store.getters.lineItems.supportingItems; - - return supportingItems.some((item) => item.partNumber === "RECAL STATIC" || item.partNumber === "RECAL DUAL"); + + return supportingItems.some( + (item) => item.partNumber === "RECAL STATIC" || item.partNumber === "RECAL DUAL" + ); }, displayRecalibrationWarning() { return this.isDualOrStaticRecalibration; From fb0280fa1820e25a3c651a4f4e09dda54036073a Mon Sep 17 00:00:00 2001 From: Adam Caouette Date: Wed, 5 Apr 2023 10:56:34 -0400 Subject: [PATCH 5/9] CSR-1129: create schedule page, put date picker on it --- jest.config.js | 3 +- src/constants/error-messages.js | 1 + .../date-picker/date-picker.vue | 473 +++++++++--------- src/router/index.js | 1 - src/router/router-constants/fmgPage-values.js | 1 + .../router-constants/navigation-scenarios.js | 3 + src/router/router-constants/routing-table.js | 13 + 7 files changed, 260 insertions(+), 235 deletions(-) diff --git a/jest.config.js b/jest.config.js index ceeb6f781..3186939df 100644 --- a/jest.config.js +++ b/jest.config.js @@ -15,9 +15,10 @@ module.exports = { "!src/layouts/vehicle-damage/windshield-options/windshield-options.vue", "!src/layouts/reveal/**/*.vue", "!src/ux-components/text-link/**/*.vue", - "!src/common-components/date-picker/**/*.vue", // Temp until unit tests completed + "!src/common-components/date-picker/**/*.vue", // git statuTemp until unit tests completed "!src/layouts/vin-lookup/**/*.vue", //Temporary for Quote page testing "!src/common-components/funnel-header/menu-modal/**/*.vue", + "!src/layouts/schedule/*.vue", // Temp test exclusion while in development // END ], // ! means exclude from coverage. testMatch: ["**/*.spec.(js|jsx|ts|tsx)|**/__tests__/*.(js|jsx|ts|tsx)"], diff --git a/src/constants/error-messages.js b/src/constants/error-messages.js index 3c3f776c1..810929d20 100644 --- a/src/constants/error-messages.js +++ b/src/constants/error-messages.js @@ -26,6 +26,7 @@ const errorMessages = { OPTION_REQUIRED: "Please select an option", VEHICLE_REQUIRED: "Please select a vehicle", MOBILE_LOCATION_REQUIRED: "Please enter your service address", + DATE_REQUIRED: "Please select a date", }; export { errorMessages }; diff --git a/src/digital-components/date-picker/date-picker.vue b/src/digital-components/date-picker/date-picker.vue index e3b5ff5d1..813708b66 100644 --- a/src/digital-components/date-picker/date-picker.vue +++ b/src/digital-components/date-picker/date-picker.vue @@ -1,5 +1,5 @@