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

View file

@ -97,7 +97,7 @@ describe("time-slot-modal-question.vue", () => {
//Assert
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 {
name: "time-slot-modal-question",
emits: ["update:modelValue", "ForwardClicked"],
emits: ["update:modelValue", "TimeSlotSelected"],
props: {
modelValue: {
type: Object,
@ -351,7 +351,7 @@ export default {
"update:modelValue",
this.getSelectedTimeSlotInfoObject(this.selectedRouteCode)
);
this.$emit("ForwardClicked");
this.$emit("TimeSlotSelected");
},
getRelevantDropOffCmsWidgetNameForSelectedTimeSlot(
selectedRouteCode,

View file

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