Merge pull request #2430 from Safelite/feature/Digital/CASH-433-revert

Revert "CASH-433"
This commit is contained in:
hiteshkumar87 2025-04-16 22:17:21 +05:30 committed by GitHub
commit e81cdab45b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 11 additions and 31 deletions

View file

@ -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 // Arrange/Act
const { wrapper } = setupMocks({ const { wrapper } = setupMocks({
mixins: [mockMixin], mixins: [mockMixin],
@ -108,7 +108,6 @@ describe("appointment-type-question.vue", () => {
cmsWidgetName: cmsWidgetName, cmsWidgetName: cmsWidgetName,
isServiceableInshop: true, isServiceableInshop: true,
isServiceableMobile: false, isServiceableMobile: false,
isServiceableDropoff: false,
}, },
mountOptions: { mountOptions: {
attachTo: document.body, attachTo: document.body,
@ -124,6 +123,13 @@ describe("appointment-type-question.vue", () => {
SubWidgetName: "", SubWidgetName: "",
Text: "In-shop", Text: "In-shop",
}, },
{
AnswerImageUrl: "",
Name: "Dropoff",
SubText: "",
SubWidgetName: "",
Text: "Drop-off",
},
]); ]);
}); });

View file

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

View file

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