ปิด notification

This commit is contained in:
Warunee Tamkoo 2026-02-13 11:37:43 +07:00
parent 13ac203c62
commit 72c665add9

View file

@ -42,8 +42,8 @@ const modalReset = ref<boolean>(false) //ตัวแปร popup reset password
const fullName = ref<string>('') //
const notiTrigger = ref<boolean>(false) // ,
const notiList = ref<notiType[]>([]) //
const totalNotiList = ref<number>(0) //
const totalNoti = ref<number>(0) //
// const totalNotiList = ref<number>(0) //
// const totalNoti = ref<number>(0) //
const statusLoad = ref<boolean>(false) //
const modalDebug = ref<boolean>(false) // popup debug
//
@ -65,16 +65,16 @@ const isPwdReNewOld = ref<boolean>(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<boolean>(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')"
>
<q-tooltip>ไปหนาประวการลงเวลาฯ</q-tooltip>
</q-btn>
<q-btn round dense flat size="13px" class="q-mx-md">
<!-- <q-btn round dense flat size="13px" class="q-mx-md">
<q-icon name="notifications" size="24px" color="white" />
<q-badge
@ -457,7 +459,7 @@ onMounted(async () => {
</q-banner>
</div>
</q-menu>
</q-btn>
</q-btn> -->
<q-btn round dense color="white" flat style="font-size: 16px">
<q-avatar size="30px">