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 { defineStore } from "pinia";
import { ref, type Ref, onUnmounted } from "vue"; import { ref, onUnmounted } from "vue";
import { CreateShortCutKey } from "dolphin-components"; import { CreateShortCutKey } from "dolphin-components";
class EscapeKeyManager { class EscapeKeyManager {
@ -83,22 +83,6 @@ export const createOverlayStore = (storeId: string) => {
escapeManager.removeModal(close); 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(() => { onUnmounted(() => {
if (show.value) { if (show.value) {
escapeManager.removeModal(close); escapeManager.removeModal(close);
@ -115,7 +99,6 @@ export const createOverlayStore = (storeId: string) => {
context, context,
open, open,
close, close,
onSave,
setOnCloseCallback, setOnCloseCallback,
}; };
}); });

View File

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