Merge pull request #1850 from Safelite/feature/CSR-1600

CSR-1600
This commit is contained in:
CarlNation 2024-05-14 10:04:51 -04:00 committed by GitHub
commit 211f3dbfe8
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 23 additions and 1 deletions

View file

@ -32,6 +32,7 @@ export default {
cmsWidgetName: String, cmsWidgetName: String,
isServiceableMobile: Boolean, isServiceableMobile: Boolean,
isServiceableInshop: Boolean, isServiceableInshop: Boolean,
mobileFeeApplies: Boolean,
}, },
computed: { computed: {
questionText() { questionText() {
@ -45,7 +46,8 @@ export default {
const shouldShowInshop = this.isServiceableInshop; const shouldShowInshop = this.isServiceableInshop;
const shouldShowDropoff = const shouldShowDropoff =
this.isServiceableInshop && !this.$store.getters.damage.isRepair; this.isServiceableInshop && !this.$store.getters.damage.isRepair;
return this.answersFromCms
var answers = this.answersFromCms
? this.answersFromCms.filter((answer) => { ? this.answersFromCms.filter((answer) => {
return ( return (
(answer.Name == AppointmentTypeStrings.IN_SHOP && shouldShowInshop) || (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: { selectedValue: {
get: function () { get: function () {

View file

@ -25,6 +25,7 @@
</span> </span>
</div> </div>
<textBlock <textBlock
v-if="mobileFeeApplies"
:customText="mobileFeeText" :customText="mobileFeeText"
cmsWidgetName="MobileFeeDisclaimerWidget" cmsWidgetName="MobileFeeDisclaimerWidget"
typeStyle="caption" /> typeStyle="caption" />
@ -153,6 +154,7 @@ export default {
alertInvalidZipWidgetName: String, alertInvalidZipWidgetName: String,
customComponentId: String, customComponentId: String,
validationRules: String, validationRules: String,
mobileFeeApplies: Boolean,
}, },
computed: { computed: {
mobileLocationLinkPromptText() { mobileLocationLinkPromptText() {

View file

@ -67,6 +67,7 @@
:isServiceableMobile="isServiceableMobile" :isServiceableMobile="isServiceableMobile"
:isServiceableInshop="isServiceableInshop" :isServiceableInshop="isServiceableInshop"
:isDisplayed="isAppointmentTypeDisplayed" :isDisplayed="isAppointmentTypeDisplayed"
:mobileFeeApplies="mobileFeeApplies"
ref="appointmentTypeQuestion" ref="appointmentTypeQuestion"
groupName="appointmentTypeQuestion" groupName="appointmentTypeQuestion"
cmsWidgetName="AppointmentTypeQuestionWidget" cmsWidgetName="AppointmentTypeQuestionWidget"
@ -80,6 +81,7 @@
v-if="selectedAppointmentType === 'Mobile'" v-if="selectedAppointmentType === 'Mobile'"
v-model="mobileLocationQuestions" v-model="mobileLocationQuestions"
:mobileFeePart="mobileFeePart" :mobileFeePart="mobileFeePart"
:mobileFeeApplies="mobileFeeApplies"
@updated-mobile-fee-part="setMobileFeePart" @updated-mobile-fee-part="setMobileFeePart"
@updated-serviceability="setServiceabilityDetails" @updated-serviceability="setServiceabilityDetails"
@updated-contains-military-base="setContainsMilitaryBase" @updated-contains-military-base="setContainsMilitaryBase"
@ -300,6 +302,13 @@ export default {
return this.isGlassServiceableMobile; return this.isGlassServiceableMobile;
} }
}, },
mobileFeeApplies() {
if (this.mobileFeePart) {
return true;
} else {
return false;
}
},
isServiceableInshop() { isServiceableInshop() {
if (this.isRecalibrationServiceableInshop !== null) { if (this.isRecalibrationServiceableInshop !== null) {
return this.isGlassServiceableInshop && this.isRecalibrationServiceableInshop; return this.isGlassServiceableInshop && this.isRecalibrationServiceableInshop;