fixing delete noti

This commit is contained in:
Warunee Tamkoo 2024-08-16 14:21:42 +07:00
parent f4db48d0bf
commit bd31edaf75

View file

@ -427,6 +427,11 @@ if (keycloak.tokenParsed != null) {
role.value = keycloak.tokenParsed.role;
}
const totalInbox = ref<number>(0);
const totalNoti = ref<number>(0);
const round = ref<number>(0);
const page = ref<number>(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<number>(0);
const totalNoti = ref<number>(0);
const round = ref<number>(0);
const page = ref<number>(0);
function onLoad(index: any, done: any) {
if (
notiList.value.length < totalInbox.value ||