no message
This commit is contained in:
parent
a1fadc8ad8
commit
aa85712cbf
1 changed files with 7 additions and 5 deletions
|
|
@ -53,13 +53,15 @@ async function fetchCheckTime() {
|
|||
|
||||
const notiTrigger = ref<boolean>(false)
|
||||
const notiList = ref<notiType[]>([])
|
||||
const totalNotiList = ref<number>(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<string>()
|
||||
|
|
@ -349,17 +351,17 @@ onMounted(async () => {
|
|||
flat
|
||||
size="13px"
|
||||
class="q-mx-md"
|
||||
:disable="notiList.length === 0"
|
||||
:disable="totalNotiList == 0"
|
||||
>
|
||||
<q-icon name="notifications" size="24px" color="white" />
|
||||
|
||||
<q-badge
|
||||
rounded
|
||||
v-show="notiList.length > 0"
|
||||
v-show="totalNotiList !== 0"
|
||||
color="negative"
|
||||
text-color="white"
|
||||
floating
|
||||
>{{ notiList.length }}</q-badge
|
||||
>{{ totalNotiList }}</q-badge
|
||||
>
|
||||
<q-menu v-model="notiTrigger" max-width="480px" :offset="[0, 10]">
|
||||
<div class="q-px-md q-py-sm row col-12 items-center">
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue