diff --git a/src/components/Modal/AjaxModalWrapper.vue b/src/components/Modal/AjaxModalWrapper.vue index f4720ca0..b921bd57 100644 --- a/src/components/Modal/AjaxModalWrapper.vue +++ b/src/components/Modal/AjaxModalWrapper.vue @@ -26,12 +26,12 @@ const contentDiv = ref(null); // eslint-disable-next-line no-unused-vars const pkp = window.pkp; +// to collect data change events, which are passed on close +// used in galleys when the new galley id is needed to open upload modal const dataChangedEvents = []; // Fetches html content from legacy endpoints -const {data: modalData, fetch: fetchAssignParticipantPage} = useFetch( - legacyOptions.url, -); +const {data: modalData, fetch: fetchModalData} = useFetch(legacyOptions.url); // Legacy modal has mechanism where it needs to check with form whether it can close // Mimicking this behaviour @@ -117,7 +117,7 @@ function onVueFormSuccess(formId, data) { } onMounted(async () => { - await fetchAssignParticipantPage(); + await fetchModalData(); if (modalData.value) { $(contentDiv.value).html(modalData.value.content); $(contentDiv.value).bind('formSubmitted', passToHandlerElement); diff --git a/src/components/Modal/ModalManager.vue b/src/components/Modal/ModalManager.vue index a119c143..d6efce49 100644 --- a/src/components/Modal/ModalManager.vue +++ b/src/components/Modal/ModalManager.vue @@ -85,7 +85,7 @@ const { } = storeToRefs(useModalStore()); const activeModalId = computed(() => { - if (sideModal3?.value?.opened) { + if (sideModal3.value?.opened) { return sideModal3.value.modalId; } else if (sideModal2.value?.opened) { return sideModal2.value.modalId;