remove modal background shifted to Schedule page and rename ForwardClicked event to TimeSlotSelected
This commit is contained in:
hiteshkumar87 2024-01-04 13:21:12 +05:30
parent 2e422019e6
commit e08e73bbc5
4 changed files with 12 additions and 9 deletions

View file

@ -49,7 +49,7 @@
" "
@time-slot-modal-closed="timeSlotModalClosed" @time-slot-modal-closed="timeSlotModalClosed"
validationRules="time-slot-selection-required" validationRules="time-slot-selection-required"
@ForwardClicked="forwardButtonAction" /> @TimeSlotSelected="forwardButtonAction" />
<navbar <navbar
cmsWidgetName="FunnelFooterWidget" cmsWidgetName="FunnelFooterWidget"
ref="navbar" ref="navbar"
@ -498,6 +498,13 @@ export default {
this.updateFooterButtonText(newValue); this.updateFooterButtonText(newValue);
}, },
}, },
unmounted() {
// remove modal backdrop if one exists
let modalBackground = document.querySelector(".modal-backdrop");
if (modalBackground) {
modalBackground.remove();
}
},
components: { components: {
funnelHeader, funnelHeader,
navbar, navbar,

View file

@ -97,7 +97,7 @@ describe("time-slot-modal-question.vue", () => {
//Assert //Assert
expect(wrapper.emitted()["update:modelValue"]).toEqual(expectedEmit); expect(wrapper.emitted()["update:modelValue"]).toEqual(expectedEmit);
expect(wrapper.emitted()).toHaveProperty("ForwardClicked"); expect(wrapper.emitted()).toHaveProperty("TimeSlotSelected");
}); });
}); });

View file

@ -82,7 +82,7 @@ defineRule("time-slot-required", required(errorMessages.OPTION_REQUIRED));
export default { export default {
name: "time-slot-modal-question", name: "time-slot-modal-question",
emits: ["update:modelValue", "ForwardClicked"], emits: ["update:modelValue", "TimeSlotSelected"],
props: { props: {
modelValue: { modelValue: {
type: Object, type: Object,
@ -351,7 +351,7 @@ export default {
"update:modelValue", "update:modelValue",
this.getSelectedTimeSlotInfoObject(this.selectedRouteCode) this.getSelectedTimeSlotInfoObject(this.selectedRouteCode)
); );
this.$emit("ForwardClicked"); this.$emit("TimeSlotSelected");
}, },
getRelevantDropOffCmsWidgetNameForSelectedTimeSlot( getRelevantDropOffCmsWidgetNameForSelectedTimeSlot(
selectedRouteCode, selectedRouteCode,

View file

@ -169,11 +169,7 @@ router.beforeEach(async (to, from, next) => {
if (fromQueryPage === undefined) { if (fromQueryPage === undefined) {
showFmgLoadingModal(true); showFmgLoadingModal(true);
} }
// remove modal backdrop if one exists
let modalBackground = document.querySelector(".modal-backdrop");
if (modalBackground) {
modalBackground.remove();
}
const toQueryPage = to.query?.fmgPage; const toQueryPage = to.query?.fmgPage;
const notToPIAReturn = toQueryPage != fmgPageValues.PAYMENT_PIA_RETURN; const notToPIAReturn = toQueryPage != fmgPageValues.PAYMENT_PIA_RETURN;
const isInIframe = window !== window.top; const isInIframe = window !== window.top;