From aa85712cbf3e5a331a62d3d8658a89554d9d464b Mon Sep 17 00:00:00 2001 From: "DESKTOP-1R2VSQH\\Lenovo ThinkPad E490" Date: Thu, 18 Jan 2024 10:47:24 +0700 Subject: [PATCH] no message --- src/views/HomeView.vue | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/views/HomeView.vue b/src/views/HomeView.vue index 795cd6d..91decc3 100644 --- a/src/views/HomeView.vue +++ b/src/views/HomeView.vue @@ -53,13 +53,15 @@ async function fetchCheckTime() { const notiTrigger = ref(false) const notiList = ref([]) +const totalNotiList = ref(0) /** function เรียกข้อมุลแจ้งเตือน */ async function fetchNotifications() { showLoader() await http .get(config.API.msgNotificate) .then((res) => { - const response = res.data.result + const response = res.data.result.data + totalNotiList.value = res.data.result.total const list: notiType[] = [] response.map((e: any) => { list.push({ @@ -236,7 +238,7 @@ function validateForm() { } if (hasError.every((result) => result === true)) { confirm() - } + } } const timeChickin = ref() @@ -349,17 +351,17 @@ onMounted(async () => { flat size="13px" class="q-mx-md" - :disable="notiList.length === 0" + :disable="totalNotiList == 0" > {{ notiList.length }}{{ totalNotiList }}