Changes in Overlay Store

This commit is contained in:
Sandip Ghimire 2025-12-18 11:27:36 +05:45
parent db06ebbaaf
commit 8a9a900fec
2 changed files with 2 additions and 19 deletions

View File

@ -1,5 +1,5 @@
import { defineStore } from "pinia";
import { ref, type Ref, onUnmounted } from "vue";
import { ref, onUnmounted } from "vue";
import { CreateShortCutKey } from "dolphin-components";
class EscapeKeyManager {
@ -83,22 +83,6 @@ export const createOverlayStore = (storeId: string) => {
escapeManager.removeModal(close);
}
async function onSave(
genericStore: any,
genericAPI: any,
fetchList: boolean = true,
loadingRef: Ref<boolean> | null = null
) {
let response: any = false;
if (editId.value !== null) {
response = await genericStore.updateItem(genericAPI, editId.value, fetchList, loadingRef);
} else {
response = await genericStore.createItem(genericAPI, fetchList, loadingRef);
}
if (response) close();
return response;
}
onUnmounted(() => {
if (show.value) {
escapeManager.removeModal(close);
@ -115,7 +99,6 @@ export const createOverlayStore = (storeId: string) => {
context,
open,
close,
onSave,
setOnCloseCallback,
};
});

View File

@ -24,7 +24,7 @@ import { ref } from "vue";
const breadcrumb = ref([
{ name: "Dashboard", link: "/" },
{ name: "Reports", count: 3 }, // last breadcrumb item
{ name: "Reports", count: 3 },
]);
const actions = ref([