From 88d34ee9e7752ab639ecbc20d3673581719c68e6 Mon Sep 17 00:00:00 2001 From: CarlNation Date: Tue, 14 May 2024 09:37:47 -0400 Subject: [PATCH 1/4] CSR-1600 CSR-1600 hide mobile fee related data when it does not apply --- .../appointment-type-question.vue | 13 ++++++++++++- .../mobile-location-modal-questions.vue | 3 ++- src/layouts/service-location/service-location.vue | 11 +++++++++++ 3 files changed, 25 insertions(+), 2 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 ca452ac01..cedd9f609 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 @@ -32,6 +32,7 @@ export default { cmsWidgetName: String, isServiceableMobile: Boolean, isServiceableInshop: Boolean, + mobileFeeApplies: Boolean, }, computed: { questionText() { @@ -45,7 +46,8 @@ export default { const shouldShowInshop = this.isServiceableInshop; const shouldShowDropoff = this.isServiceableInshop && !this.$store.getters.damage.isRepair; - return this.answersFromCms + + var answers = this.answersFromCms ? this.answersFromCms.filter((answer) => { return ( (answer.Name == AppointmentTypeStrings.IN_SHOP && shouldShowInshop) || @@ -54,6 +56,15 @@ export default { ); }) : []; + + if (!this.mobileFeeApplies) { + answers.forEach((item) => { + if (item.Name.toLowerCase() === "mobile"){ + item.SubText = item.SubText.replace("*",""); + } + }) + } + return answers; }, selectedValue: { get: function () { 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 debc25f89..80c79bb8c 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 @@ -24,7 +24,7 @@ {{ errorMessage }} - @@ -153,6 +153,7 @@ export default { alertInvalidZipWidgetName: String, customComponentId: String, validationRules: String, + mobileFeeApplies: Boolean, }, computed: { mobileLocationLinkPromptText() { diff --git a/src/layouts/service-location/service-location.vue b/src/layouts/service-location/service-location.vue index 8b76a5e78..6d366d4e3 100644 --- a/src/layouts/service-location/service-location.vue +++ b/src/layouts/service-location/service-location.vue @@ -67,6 +67,7 @@ :isServiceableMobile="isServiceableMobile" :isServiceableInshop="isServiceableInshop" :isDisplayed="isAppointmentTypeDisplayed" + :mobileFeeApplies="mobileFeeApplies" ref="appointmentTypeQuestion" groupName="appointmentTypeQuestion" cmsWidgetName="AppointmentTypeQuestionWidget" @@ -80,6 +81,7 @@ v-if="selectedAppointmentType === 'Mobile'" v-model="mobileLocationQuestions" :mobileFeePart="mobileFeePart" + :mobileFeeApplies="mobileFeeApplies" @updated-mobile-fee-part="setMobileFeePart" @updated-serviceability="setServiceabilityDetails" @updated-contains-military-base="setContainsMilitaryBase" @@ -300,6 +302,15 @@ export default { return this.isGlassServiceableMobile; } }, + mobileFeeApplies() { + if (this.mobileFeePart) { + return true; + } + else + { + return false; + } + }, isServiceableInshop() { if (this.isRecalibrationServiceableInshop !== null) { return this.isGlassServiceableInshop && this.isRecalibrationServiceableInshop; From 195a0ddb0f6355156c11d939e1facff693905051 Mon Sep 17 00:00:00 2001 From: CarlNation Date: Tue, 14 May 2024 09:58:05 -0400 Subject: [PATCH 2/4] CSR-1600 prettier --- .../appointment-type-question/appointment-type-question.vue | 6 +++--- .../mobile-location-modal-questions.vue | 3 ++- src/layouts/service-location/service-location.vue | 4 +--- 3 files changed, 6 insertions(+), 7 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 cedd9f609..64bf159ff 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 @@ -59,10 +59,10 @@ export default { if (!this.mobileFeeApplies) { answers.forEach((item) => { - if (item.Name.toLowerCase() === "mobile"){ - item.SubText = item.SubText.replace("*",""); + if (item.Name.toLowerCase() === "mobile") { + item.SubText = item.SubText.replace("*", ""); } - }) + }); } return answers; }, 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 80c79bb8c..4558c3294 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 @@ -24,7 +24,8 @@ {{ errorMessage }} - diff --git a/src/layouts/service-location/service-location.vue b/src/layouts/service-location/service-location.vue index 6d366d4e3..b83db7ebc 100644 --- a/src/layouts/service-location/service-location.vue +++ b/src/layouts/service-location/service-location.vue @@ -305,9 +305,7 @@ export default { mobileFeeApplies() { if (this.mobileFeePart) { return true; - } - else - { + } else { return false; } }, From 0851003ef4432aa604655b9864d924ad09d4d8c2 Mon Sep 17 00:00:00 2001 From: Bryan Mauger Date: Tue, 14 May 2024 16:33:34 -0400 Subject: [PATCH 3/4] Update tint map file for privacy glass. --- src/constants/tint-mapper.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/constants/tint-mapper.js b/src/constants/tint-mapper.js index 519de0855..c290dd1db 100644 --- a/src/constants/tint-mapper.js +++ b/src/constants/tint-mapper.js @@ -33,6 +33,7 @@ const tintMap = { { name: "green tint", src: "Glass-NoShade-GreenTint.svg" }, { name: "gray tint privacy", src: "Glass-NoShade-GrayTint.svg" }, { name: "blue tint", src: "Glass-NoShade-BlueTint.svg" }, + { name: "green tint privacy", src: "Glass-NoShade-Privacy.svg" }, // No shade or tint { name: "clear", src: "Glass-NoShade-NoTint.svg" }, From a37626cf1db339cc99ccd9eda0364c70f187055a Mon Sep 17 00:00:00 2001 From: CarlNation <32103961+CarlNation@users.noreply.github.com> Date: Wed, 15 May 2024 12:02:04 -0400 Subject: [PATCH 4/4] separate insurance and cash logic for PIA separate insurance and cash logic for PIA --- src/layouts/payment-method/payment-method.vue | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/layouts/payment-method/payment-method.vue b/src/layouts/payment-method/payment-method.vue index 4604c1f4c..0910920a9 100644 --- a/src/layouts/payment-method/payment-method.vue +++ b/src/layouts/payment-method/payment-method.vue @@ -559,11 +559,12 @@ export default { const piaExperience = this.getSettingValue(experimentSettings.PIA_EXPERIENCE); const piaInsurance = this.getSettingValue(experimentSettings.PIA_INSURANCE); - const isEnabled = - (piaExperience === "PIA Optional" || - piaExperience === "PIA Required" || - piaInsurance === "true") && - this.currentDeductible !== 0; + var isEnabled = false; + if (this.isInsurance) { + isEnabled = piaInsurance === "true" && this.currentDeductible !== 0; + } else { + isEnabled = piaExperience === "PIA Optional" || piaExperience === "PIA Required"; + } return !isEnabled; },