Button copy change & immediately continue (from modal) on Schedule page
This commit is contained in:
hiteshkumar87 2024-01-03 16:35:53 +05:30
parent a1ab29711e
commit 2e422019e6
4 changed files with 12 additions and 4 deletions

View file

@ -48,7 +48,8 @@
selectableDatesData.estimatedServiceMinutesMaximum selectableDatesData.estimatedServiceMinutesMaximum
" "
@time-slot-modal-closed="timeSlotModalClosed" @time-slot-modal-closed="timeSlotModalClosed"
validationRules="time-slot-selection-required" /> validationRules="time-slot-selection-required"
@ForwardClicked="forwardButtonAction" />
<navbar <navbar
cmsWidgetName="FunnelFooterWidget" cmsWidgetName="FunnelFooterWidget"
ref="navbar" ref="navbar"

View file

@ -97,6 +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");
}); });
}); });

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"], emits: ["update:modelValue", "ForwardClicked"],
props: { props: {
modelValue: { modelValue: {
type: Object, type: Object,
@ -343,13 +343,15 @@ export default {
}, },
onModalClosed() { onModalClosed() {
this.$emit("time-slot-modal-closed"); this.$emit("time-slot-modal-closed");
this.selectedRouteCode = this.getSelectedRouteCode();
this.modal.resetForm();
}, },
async setSelectedTimeSlot() { async setSelectedTimeSlot() {
this.$emit( this.$emit(
"update:modelValue", "update:modelValue",
this.getSelectedTimeSlotInfoObject(this.selectedRouteCode) this.getSelectedTimeSlotInfoObject(this.selectedRouteCode)
); );
this.closeModal(); this.$emit("ForwardClicked");
}, },
getRelevantDropOffCmsWidgetNameForSelectedTimeSlot( getRelevantDropOffCmsWidgetNameForSelectedTimeSlot(
selectedRouteCode, selectedRouteCode,

View file

@ -169,7 +169,11 @@ 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;