diff --git a/src/views/MainLayout.vue b/src/views/MainLayout.vue index 1323e86e..0907b056 100644 --- a/src/views/MainLayout.vue +++ b/src/views/MainLayout.vue @@ -114,7 +114,7 @@ async function getDataNotification(index: number, type: string) { .get(config.API.msgNotificate + `?page=${index}&pageSize=${15}`) .then((res) => { const response = res.data.result.data; - totalInbox.value = res.data.result.total || 0; + totalInbox.value = res.data.result.total; let list: notiType[] = []; if (type === "DEL") { notiList.value = []; @@ -405,26 +405,6 @@ onBeforeMount(async () => { } }); -function handleDeleteNotification() { - dialogRemove( - $q, - async () => { - try { - showLoader(); - await http.delete(config.API.msgNotificate); - await getDataNotification(1, "DEL"); - success($q, "ลบข้อมูลสำเร็จ"); - } catch (error) { - messageError($q, error); - } finally { - hideLoader(); - } - }, - "ยืนยันการลบข้อมูล", - "ต้องการยืนยันการลบรายการแจ้งเตือนทั้งหมดใช่หรือไม่?", - ); -} - /** * เมื่อเริ่มต้นโปรแกรมให้ฟัง event resize และ function myEventHandler * set function myEventHandler เพราะ state ยังไม่เซ็ท , state เซ็ทเมื่อ หน้าจอเริ่ม ขยับหน้าจอ @@ -530,17 +510,6 @@ onUnmounted(() => {
ทั้งหมด {{ totalInbox }} ข้อความ
- - ลบการแจ้งเตือนทั้งหมด -