ปิด notification
This commit is contained in:
parent
13ac203c62
commit
72c665add9
1 changed files with 30 additions and 28 deletions
|
|
@ -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">
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue