From c49669021a3531e2ae5e82b9c02fcd0a90dd0074 Mon Sep 17 00:00:00 2001 From: "DESKTOP-1R2VSQH\\Lenovo ThinkPad E490" Date: Tue, 23 Jun 2026 13:59:17 +0700 Subject: [PATCH] feat(notification): add delete notification feature --- .../04_SpecialTime/DialogMultipleApprove.vue | 1 + src/views/MainLayout.vue | 31 +++++++++++++++++++ 2 files changed, 32 insertions(+) diff --git a/src/modules/09_leave/components/04_SpecialTime/DialogMultipleApprove.vue b/src/modules/09_leave/components/04_SpecialTime/DialogMultipleApprove.vue index 54484d7bd..3c7051a75 100644 --- a/src/modules/09_leave/components/04_SpecialTime/DialogMultipleApprove.vue +++ b/src/modules/09_leave/components/04_SpecialTime/DialogMultipleApprove.vue @@ -105,6 +105,7 @@ function onSubmit() { dialogMessageNotify($q, "กรุณาเลือกอย่างน้อย 1 รายการ"); } else { dialogConfirm($q, async () => { + showLoader(); const payload = selected.value.map((e: DataSpecialTime) => ({ recId: e.id, checkInTime: e.checkInTime, diff --git a/src/views/MainLayout.vue b/src/views/MainLayout.vue index 33e733b0b..67af7375f 100644 --- a/src/views/MainLayout.vue +++ b/src/views/MainLayout.vue @@ -561,6 +561,26 @@ function getImg(id: string, pathName: string) { function onViewDetailNoti(url: string) { window.open(url, "_blank"); } + +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(); + } + }, + "ยืนยันการลบข้อมูล", + "ต้องการยืนยันการลบรายการแจ้งเตือนทั้งหมดใช่หรือไม่?" + ); +} @@ -642,6 +662,17 @@ function onViewDetailNoti(url: string) {
ทั้งหมด {{ totalInbox }} ข้อความ
+ + ลบการแจ้งเตือนทั้งหมด +