diff --git a/src/layouts/service-location/appointment-type-question/appointment-type-question.spec.js b/src/layouts/service-location/appointment-type-question/appointment-type-question.spec.js index 8ff7c9b1c..c6af1377f 100644 --- a/src/layouts/service-location/appointment-type-question/appointment-type-question.spec.js +++ b/src/layouts/service-location/appointment-type-question/appointment-type-question.spec.js @@ -100,7 +100,7 @@ describe("appointment-type-question.vue", () => { ]); }); - it("Should display only the In-Shop answer when only in-shop service is available", async () => { + it("Should display only the In-Shop and Drop-Off answers when only in-shop service is available", async () => { // Arrange/Act const { wrapper } = setupMocks({ mixins: [mockMixin], @@ -108,7 +108,6 @@ describe("appointment-type-question.vue", () => { cmsWidgetName: cmsWidgetName, isServiceableInshop: true, isServiceableMobile: false, - isServiceableDropoff: false, }, mountOptions: { attachTo: document.body, @@ -124,6 +123,13 @@ describe("appointment-type-question.vue", () => { SubWidgetName: "", Text: "In-shop", }, + { + AnswerImageUrl: "", + Name: "Dropoff", + SubText: "", + SubWidgetName: "", + Text: "Drop-off", + }, ]); }); 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 4c1c0d031..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 @@ -32,7 +32,6 @@ export default { cmsWidgetName: String, isServiceableMobile: Boolean, isServiceableInshop: Boolean, - isServiceableDropoff: Boolean, mobileFeeApplies: Boolean, }, computed: { @@ -46,7 +45,7 @@ export default { const shouldShowMobile = this.isServiceableMobile; const shouldShowInshop = this.isServiceableInshop; const shouldShowDropoff = - this.isServiceableDropoff && !this.$store.getters.damage.isRepair; + this.isServiceableInshop && !this.$store.getters.damage.isRepair; var answers = this.answersFromCms ? this.answersFromCms.filter((answer) => { @@ -78,11 +77,6 @@ export default { isMobileOnly() { return this.isServiceableMobile && !this.isServiceableInshop; }, - isInshopOnly() { - return ( - this.isServiceableInshop && !this.isServiceableMobile && !this.isServiceableDropoff - ); - }, }, watch: { answersToDisplay: { @@ -92,7 +86,7 @@ export default { newValue.length == 1 && newValue.findIndex((answer) => answer.Name == "Mobile") != -1 ) { - this.selectedValue = "Mobile"; + this.selectedValues = "Mobile"; } }, immediate: true, @@ -100,14 +94,7 @@ export default { isMobileOnly: { handler(newValue) { if (newValue) { - this.selectedValue = "Mobile"; - } - }, - }, - isInshopOnly: { - handler(newValue) { - if (newValue) { - this.selectedValue = "Inshop"; + this.selectedValues = "Mobile"; } }, }, diff --git a/src/layouts/service-location/service-location.vue b/src/layouts/service-location/service-location.vue index 7b3163c87..a85a5bd17 100644 --- a/src/layouts/service-location/service-location.vue +++ b/src/layouts/service-location/service-location.vue @@ -76,7 +76,6 @@ v-show="isAppointmentTypeDisplayed" :isServiceableMobile="isServiceableMobile" :isServiceableInshop="isServiceableInshop" - :isServiceableDropoff="isServiceableDropoff" :isDisplayed="isAppointmentTypeDisplayed" :mobileFeeApplies="mobileFeeApplies" ref="appointmentTypeQuestion" @@ -197,8 +196,6 @@ export default { isVehicleProtected: this.getIsVehicleProtectedFromStore(), isGlassServiceableInshop: null, isRecalibrationServiceableInshop: null, - isGlassServiceableDropoff: null, - isRecalibrationServiceableDropoff: null, isGlassServiceableMobile: null, isRecalibrationServiceableMobile: null, selectedAppointmentType: this.getSelectedAppointmentType(), @@ -357,13 +354,6 @@ export default { return this.isGlassServiceableInshop; } }, - isServiceableDropoff() { - if (this.isRecalibrationServiceableDropoff !== null) { - return this.isGlassServiceableDropoff && this.isRecalibrationServiceableDropoff; - } else { - return this.isGlassServiceableDropoff; - } - }, isShopQuestionDisplayed() { return ( this.selectedAppointmentType === "Inshop" || @@ -569,9 +559,6 @@ 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;