hide drop off option for big truck
This commit is contained in:
hiteshkumar87 2025-04-07 15:29:47 +05:30
parent db8facc19e
commit 1649ea1407
2 changed files with 29 additions and 3 deletions

View file

@ -32,6 +32,7 @@ export default {
cmsWidgetName: String,
isServiceableMobile: Boolean,
isServiceableInshop: Boolean,
isServiceableDropoff: Boolean,
mobileFeeApplies: Boolean,
},
computed: {
@ -45,7 +46,7 @@ export default {
const shouldShowMobile = this.isServiceableMobile;
const shouldShowInshop = this.isServiceableInshop;
const shouldShowDropoff =
this.isServiceableInshop && !this.$store.getters.damage.isRepair;
this.isServiceableDropoff && !this.$store.getters.damage.isRepair;
var answers = this.answersFromCms
? this.answersFromCms.filter((answer) => {
@ -77,6 +78,11 @@ export default {
isMobileOnly() {
return this.isServiceableMobile && !this.isServiceableInshop;
},
isInshopOnly() {
return (
this.isServiceableInshop && !this.isServiceableMobile && !this.isServiceableDropoff
);
},
},
watch: {
answersToDisplay: {
@ -86,7 +92,7 @@ export default {
newValue.length == 1 &&
newValue.findIndex((answer) => answer.Name == "Mobile") != -1
) {
this.selectedValues = "Mobile";
this.selectedValue = "Mobile";
}
},
immediate: true,
@ -94,7 +100,14 @@ export default {
isMobileOnly: {
handler(newValue) {
if (newValue) {
this.selectedValues = "Mobile";
this.selectedValue = "Mobile";
}
},
},
isInshopOnly: {
handler(newValue) {
if (newValue) {
this.selectedValue = "Inshop";
}
},
},

View file

@ -76,6 +76,7 @@
v-show="isAppointmentTypeDisplayed"
:isServiceableMobile="isServiceableMobile"
:isServiceableInshop="isServiceableInshop"
:isServiceableDropoff="isServiceableDropoff"
:isDisplayed="isAppointmentTypeDisplayed"
:mobileFeeApplies="mobileFeeApplies"
ref="appointmentTypeQuestion"
@ -196,6 +197,8 @@ export default {
isVehicleProtected: this.getIsVehicleProtectedFromStore(),
isGlassServiceableInshop: null,
isRecalibrationServiceableInshop: null,
isGlassServiceableDropoff: null,
isRecalibrationServiceableDropoff: null,
isGlassServiceableMobile: null,
isRecalibrationServiceableMobile: null,
selectedAppointmentType: this.getSelectedAppointmentType(),
@ -354,6 +357,13 @@ export default {
return this.isGlassServiceableInshop;
}
},
isServiceableDropoff() {
if (this.isRecalibrationServiceableDropoff !== null) {
return this.isGlassServiceableDropoff && this.isRecalibrationServiceableDropoff;
} else {
return this.isGlassServiceableDropoff;
}
},
isShopQuestionDisplayed() {
return (
this.selectedAppointmentType === "Inshop" ||
@ -559,6 +569,9 @@ export default {
this.isGlassServiceableInshop = serviceabilityDetails.isGlassServiceableInshop;
this.isRecalibrationServiceableInshop =
serviceabilityDetails.isRecalibrationServiceableInshop;
this.isGlassServiceableDropoff = serviceabilityDetails.isGlassServiceableDropoff;
this.isRecalibrationServiceableDropoff =
serviceabilityDetails.isRecalibrationServiceableDropoff;
this.isGlassServiceableMobile = serviceabilityDetails.isGlassServiceableMobile;
this.isRecalibrationServiceableMobile =
serviceabilityDetails.isRecalibrationServiceableMobile;