fixing check token auth

This commit is contained in:
Warunee Tamkoo 2024-08-16 17:00:33 +07:00
parent 46d561b43b
commit a5fbf5c880
3 changed files with 36 additions and 16 deletions

View file

@ -45,20 +45,23 @@ async function fetchNotifications(index: number, type: string) {
if (type === 'DEL') {
notiList.value = []
}
response.map((e: Noti) => {
list.push({
id: e.id,
sender:
e.createdFullName == '' || e.createdFullName == null
? 'เจ้าหน้าที่'[0]
: e.createdFullName[0],
body: e.body ?? '',
timereceive: e.receiveDate,
isOpen: e.isOpen,
if (response.length === 0) {
response.map((e: Noti) => {
list.push({
id: e.id,
sender:
e.createdFullName == '' || e.createdFullName == null
? 'เจ้าหน้าที่'[0]
: e.createdFullName[0],
body: e.body ?? '',
timereceive: e.receiveDate,
isOpen: e.isOpen,
})
})
})
notiList.value.push(...list)
statusLoad.value = totalNotiList.value === 0 ? true : false
notiList.value.push(...list)
statusLoad.value = totalNotiList.value === 0 ? true : false
}
})
// .catch((err) => {
// messageError($q, err)