Merge pull request #1673 from Safelite/feature/Digital/CSR-1898

CSR-1898
This commit is contained in:
hiteshkumar87 2024-01-04 15:30:47 +05:30 committed by GitHub
commit 3f09827121
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 9 additions and 10 deletions

View file

@ -89,7 +89,7 @@ export default {
document.getElementById(this.modalId)?.focus();
},
resetButtonStyle() {
this.$refs.modalButtonMain.resetButtonStyle();
this.$refs.modalButtonMain?.resetButtonStyle();
},
onModalOpened() {
this.onModalOpenedCallback?.();

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"

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,
@ -494,6 +494,9 @@ export default {
};
},
},
unmounted() {
if (this.isModalOpened) this.closeModal();
},
watch: {
modelValue: {
handler(newValue) {

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;