From 215124bb5903bb367476e1fce64e0df55fb755a9 Mon Sep 17 00:00:00 2001 From: "DESKTOP-1R2VSQH\\Lenovo ThinkPad E490" Date: Tue, 16 Jun 2026 14:03:58 +0700 Subject: [PATCH 1/6] refactor(responsibilities): table hide-bottom --- src/modules/02_users/views/05_responsIbilities.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/modules/02_users/views/05_responsIbilities.vue b/src/modules/02_users/views/05_responsIbilities.vue index 2f7e9b93..617bfcf3 100644 --- a/src/modules/02_users/views/05_responsIbilities.vue +++ b/src/modules/02_users/views/05_responsIbilities.vue @@ -758,7 +758,7 @@ onMounted(async () => { table-class="text-grey-9" row-key="id" dense - hide-bottom + bordered separator="vertical" class="custom-header-table-expand" From 9c43137034b6afb0cdd6a31a7514647a451699b6 Mon Sep 17 00:00:00 2001 From: "DESKTOP-1R2VSQH\\Lenovo ThinkPad E490" Date: Tue, 16 Jun 2026 14:04:30 +0700 Subject: [PATCH 2/6] fix --- src/modules/02_users/views/05_responsIbilities.vue | 1 - 1 file changed, 1 deletion(-) diff --git a/src/modules/02_users/views/05_responsIbilities.vue b/src/modules/02_users/views/05_responsIbilities.vue index 617bfcf3..3fb48dd6 100644 --- a/src/modules/02_users/views/05_responsIbilities.vue +++ b/src/modules/02_users/views/05_responsIbilities.vue @@ -758,7 +758,6 @@ onMounted(async () => { table-class="text-grey-9" row-key="id" dense - bordered separator="vertical" class="custom-header-table-expand" From 59355bd368f9bff4d8b7c545777dc5deb97061db Mon Sep 17 00:00:00 2001 From: "DESKTOP-1R2VSQH\\Lenovo ThinkPad E490" Date: Tue, 23 Jun 2026 14:20:57 +0700 Subject: [PATCH 3/6] feat(notification): add delete notification feature --- src/views/MainLayout.vue | 33 ++++++++++++++++++++++++++++++++- 1 file changed, 32 insertions(+), 1 deletion(-) diff --git a/src/views/MainLayout.vue b/src/views/MainLayout.vue index 0907b056..1323e86e 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; + totalInbox.value = res.data.result.total || 0; let list: notiType[] = []; if (type === "DEL") { notiList.value = []; @@ -405,6 +405,26 @@ 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 เซ็ทเมื่อ หน้าจอเริ่ม ขยับหน้าจอ @@ -510,6 +530,17 @@ onUnmounted(() => {
ทั้งหมด {{ totalInbox }} ข้อความ
+ + ลบการแจ้งเตือนทั้งหมด + Date: Tue, 23 Jun 2026 15:57:21 +0700 Subject: [PATCH 4/6] refactor(notification): update icon and text display --- src/views/MainLayout.vue | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/views/MainLayout.vue b/src/views/MainLayout.vue index 1323e86e..3227fa45 100644 --- a/src/views/MainLayout.vue +++ b/src/views/MainLayout.vue @@ -420,8 +420,8 @@ function handleDeleteNotification() { hideLoader(); } }, - "ยืนยันการลบข้อมูล", - "ต้องการยืนยันการลบรายการแจ้งเตือนทั้งหมดใช่หรือไม่?", + "ยืนยันการล้างการแจ้งเตือนทั้งหมด", + "ต้องการยืนยันการล้างการแจ้งเตือนทั้งหมดทั้งหมดใช่หรือไม่?", ); } @@ -535,11 +535,11 @@ onUnmounted(() => { flat dense round - color="red" - icon="delete" + color="grey-7" + icon="mdi-trash-can-outline" @click.stop.prevent="handleDeleteNotification" > - ลบการแจ้งเตือนทั้งหมด + ล้างการแจ้งเตือนทั้งหมด From e00d3aaddb9eb2c6ad6361a2ad143f377ff9b08e Mon Sep 17 00:00:00 2001 From: "DESKTOP-1R2VSQH\\Lenovo ThinkPad E490" Date: Tue, 23 Jun 2026 16:21:02 +0700 Subject: [PATCH 5/6] fix --- src/views/MainLayout.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/views/MainLayout.vue b/src/views/MainLayout.vue index 3227fa45..a6b038e2 100644 --- a/src/views/MainLayout.vue +++ b/src/views/MainLayout.vue @@ -421,7 +421,7 @@ function handleDeleteNotification() { } }, "ยืนยันการล้างการแจ้งเตือนทั้งหมด", - "ต้องการยืนยันการล้างการแจ้งเตือนทั้งหมดทั้งหมดใช่หรือไม่?", + "ต้องการยืนยันการล้างการแจ้งเตือนทั้งหมดใช่หรือไม่?", ); } From 2e84247ae68e0032c0754039384a6a88dc76c2f8 Mon Sep 17 00:00:00 2001 From: waruneeauy Date: Thu, 25 Jun 2026 21:54:13 +0700 Subject: [PATCH 6/6] fix ui noti --- src/views/MainLayout.vue | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/views/MainLayout.vue b/src/views/MainLayout.vue index a6b038e2..6aea2a37 100644 --- a/src/views/MainLayout.vue +++ b/src/views/MainLayout.vue @@ -421,7 +421,7 @@ function handleDeleteNotification() { } }, "ยืนยันการล้างการแจ้งเตือนทั้งหมด", - "ต้องการยืนยันการล้างการแจ้งเตือนทั้งหมดใช่หรือไม่?", + `ต้องการล้างการแจ้งเตือนทั้งหมด (${totalInbox.value} รายการ) ใช่หรือไม่? การกระทำนี้ไม่สามารถย้อนกลับได้`, ); } @@ -534,9 +534,13 @@ onUnmounted(() => { v-if="totalInbox !== 0" flat dense - round - color="grey-7" + no-caps + size="12px" + color="red-7" icon="mdi-trash-can-outline" + label="ล้างทั้งหมด" + class="q-ml-sm" + aria-label="ล้างการแจ้งเตือนทั้งหมด" @click.stop.prevent="handleDeleteNotification" > ล้างการแจ้งเตือนทั้งหมด