diff --git a/src/views/MainLayout.vue b/src/views/MainLayout.vue index dbe2c21b4..242e5ea70 100644 --- a/src/views/MainLayout.vue +++ b/src/views/MainLayout.vue @@ -427,6 +427,11 @@ if (keycloak.tokenParsed != null) { role.value = keycloak.tokenParsed.role; } +const totalInbox = ref(0); +const totalNoti = ref(0); +const round = ref(0); +const page = ref(0); + const clickDelete = async (id: string, index: number) => { dialogRemove($q, async () => { showLoader(); @@ -436,6 +441,7 @@ const clickDelete = async (id: string, index: number) => { notiList.value.splice(index, 1); success($q, "ลบข้อมูลสำเร็จ"); totalInbox.value--; + totalNoti.value--; }) .catch((e) => { messageError($q, e); @@ -447,11 +453,6 @@ const clickDelete = async (id: string, index: number) => { }); }; -const totalInbox = ref(0); -const totalNoti = ref(0); -const round = ref(0); -const page = ref(0); - function onLoad(index: any, done: any) { if ( notiList.value.length < totalInbox.value ||