CASH-107: fix to close modal before page is left

This commit is contained in:
Adam Caouette 2025-01-16 11:44:32 -05:00
parent 63e11db537
commit 2eccc3b028
2 changed files with 7 additions and 3 deletions

View file

@ -50,6 +50,10 @@ export default {
mounted() {
if (this.showSaveProgressPopup) this.modal.openModal();
},
unmounted() {
// remove any modal effects before leaving page (e.g. user hits browser back button)
this.modal.closeModal();
},
emits: ["close-save-progress-popup", "save-progress"], // <--- should remove oodles of warnings in dev tools
props: {
modelValue: Object,

View file

@ -442,6 +442,9 @@ export default {
showSaveProgressPopup: null,
};
},
mounted() {
this.attachCustomEvents();
},
computed: {
lineItemsCloneForWatcher() {
return Object.assign({}, this.lineItems);
@ -677,9 +680,6 @@ export default {
});
},
},
mounted() {
this.attachCustomEvents();
},
watch: {
lineItemsCloneForWatcher: {
handler(newValue, oldValue) {