fix inbox

This commit is contained in:
DESKTOP-1R2VSQH\Lenovo ThinkPad E490 2024-10-29 15:46:08 +07:00
parent ce0c2fef3f
commit eb0035bfd1

View file

@ -121,6 +121,7 @@ const fetchlistNotification = async (index: number, type: string) => {
timereceive: date2Thai(e.createdAt), timereceive: date2Thai(e.createdAt),
isOpen: e.isOpen, isOpen: e.isOpen,
receiveDate: e.receiveDate, receiveDate: e.receiveDate,
payload: e.payload,
}); });
}); });
notiList.value.push(...list); notiList.value.push(...list);
@ -331,22 +332,57 @@ function onInfo() {
<div <div
v-for="(item, index) in notiList" v-for="(item, index) in notiList"
:key="index" :key="index"
class="caption" :class="
item.payload
? 'caption q-pa-xs cursor-pointer'
: 'caption q-pa-xs'
"
@click.stop.prevent="
item.payload ? $router.push(`/${item.payload}`) : ''
"
> >
<q-item v-ripple class="mytry q-py-sm" dense> <q-item
<q-item-section avatar top style="min-width: 10px"> :class="
<q-avatar !item.isOpen
rounded ? 'mytry q-py-xs my-menu-link'
color="primary" : 'mytry q-py-xs'
size="25px" "
text-color="white" :clickable="item.payload !== ''"
> :v-ripple="item.payload !== ''"
dense
>
<q-item-section avatar top style="min-width: 40px">
<q-avatar color="primary" size="22px" text-color="white">
<span class="text-weight-medium text-uppercase">{{ <span class="text-weight-medium text-uppercase">{{
item.body[0] item.body[0]
}}</span> }}</span>
</q-avatar> </q-avatar>
</q-item-section> </q-item-section>
<q-item-section> <q-item-section>
<q-item-label caption class="text-black"
>{{ item.body }}
<q-btn
v-if="item.payload !== ''"
size="sm"
flat
round
dense
icon="mdi-link"
color="primary"
></q-btn>
</q-item-label>
<q-item-label caption class="row items-center text-grey-7">
{{ date2Thai(item.receiveDate) }}
{{
new Date(item.receiveDate).toLocaleTimeString(
"th-TH",
thaiOptions
)
}}
.</q-item-label
>
</q-item-section>
<!-- <q-item-section>
<q-item-label caption class="text-grey-7"> <q-item-label caption class="text-grey-7">
{{ date2Thai(item.receiveDate) }} {{ date2Thai(item.receiveDate) }}
{{ {{
@ -372,7 +408,7 @@ function onInfo() {
style="font-size: 12px" style="font-size: 12px"
>{{ item.timereceive }}</q-item-label >{{ item.timereceive }}</q-item-label
> >
</q-item-section> </q-item-section> -->
<div> <div>
<q-btn <q-btn
size="sm" size="sm"