From 72c665add9a3149860f3d5cf329071a5f62409bc Mon Sep 17 00:00:00 2001 From: waruneeauy Date: Fri, 13 Feb 2026 11:37:43 +0700 Subject: [PATCH] =?UTF-8?q?=E0=B8=9B=E0=B8=B4=E0=B8=94=20notification?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/MainView.vue | 58 ++++++++++++++++++++++-------------------- 1 file changed, 30 insertions(+), 28 deletions(-) diff --git a/src/views/MainView.vue b/src/views/MainView.vue index 9cd25d9..11afc5b 100644 --- a/src/views/MainView.vue +++ b/src/views/MainView.vue @@ -42,8 +42,8 @@ const modalReset = ref(false) //ตัวแปร popup reset password const fullName = ref('') //ชื่อผู้ใช้งาน const notiTrigger = ref(false) // เปิด,ปิดรายการ const notiList = ref([]) // รายการแจ้งเตือน -const totalNotiList = ref(0) //จำนวนการรายการแจ้งเตือน -const totalNoti = ref(0) //จำนวนการแจ้งเตือน +// const totalNotiList = ref(0) //จำนวนการรายการแจ้งเตือน +// const totalNoti = ref(0) //จำนวนการแจ้งเตือน const statusLoad = ref(false) // สถานะการโหลด const modalDebug = ref(false) // ตัวแปร popup debug //รูปแบบการแสดงผลของวันที่และเวลา @@ -65,16 +65,16 @@ const isPwdReNewOld = ref(true) /** * ฟังก์ชั่นดึงข้อมูลจำนวนการแจ้งเตือน */ -async function fetchTotolNotificate() { - await http - .get(config.API.msgNotificateTotal) - .then(async (res) => { - totalNoti.value = await res.data.result - }) - .catch((err) => { - messageError($q, err) - }) -} +// async function fetchTotolNotificate() { +// await http +// .get(config.API.msgNotificateTotal) +// .then(async (res) => { +// totalNoti.value = await res.data.result +// }) +// .catch((err) => { +// messageError($q, err) +// }) +// } /** * ฟังก์ชั่นดึงข้อมูลรายการแจ้งเตือน @@ -201,19 +201,19 @@ function getImg(id: string, pathName: string) { }) } -watch( - () => notiTrigger.value, - () => { - if (!notiTrigger.value) { - const updatedNotifications = notiList.value.map((item) => ({ - ...item, - isOpen: true, - })) - notiList.value = updatedNotifications - fetchTotolNotificate() - } - } -) +// watch( +// () => notiTrigger.value, +// () => { +// if (!notiTrigger.value) { +// const updatedNotifications = notiList.value.map((item) => ({ +// ...item, +// isOpen: true, +// })) +// notiList.value = updatedNotifications +// fetchTotolNotificate() +// } +// } +// ) function onreset() { modalReset.value = true @@ -291,7 +291,7 @@ function ruleReNewPassWord(val: string) { const isSsoToken = ref(false) onMounted(async () => { - fetchTotolNotificate() + // fetchTotolNotificate() await fetchKeycloakPosition() const checkTokenParsed = await tokenParsed() const SSO_TOKEN = await getCookie('SSO') @@ -348,11 +348,13 @@ onMounted(async () => { dense flat color="white" + size="13px" + class="q-mr-md" @click="router.push('/history')" > ไปหน้าประวัติการลงเวลาฯ - +