Merge branch 'develop' into devTee
This commit is contained in:
commit
9536bcfbe1
3 changed files with 38 additions and 48 deletions
|
|
@ -340,7 +340,9 @@ async function fetchDatadetail() {
|
|||
statusDiscard: person.statusDiscard,
|
||||
}));
|
||||
|
||||
formData.disciplinaryStatusResult = props.data.disciplinaryStatusResult;
|
||||
formData.disciplinaryStatusResult = props.data.disciplinaryStatusResult
|
||||
? props.data.disciplinaryStatusResult
|
||||
: "NOT_SPECIFIED";
|
||||
formData.disciplinaryCauseText = props.data.disciplinaryCauseText;
|
||||
formData.disciplinaryResult = props.data.disciplinaryResult;
|
||||
formData.disciplinaryExtendHistory = props.data.disciplinaryExtendHistory;
|
||||
|
|
|
|||
|
|
@ -124,11 +124,11 @@ const scrollTargetRef = ref<any>(null);
|
|||
const totalInbox = ref<number>(0);
|
||||
function onLoad(index: number, done: any) {
|
||||
const num = index === 1 ? 0 : index++;
|
||||
if (inboxList.value.length < totalInbox.value) {
|
||||
// setTimeout(() => {
|
||||
getData(num);
|
||||
done();
|
||||
// }, );
|
||||
if (inboxList.value.length < totalInbox.value && isLoadInbox) {
|
||||
setTimeout(() => {
|
||||
getData(num);
|
||||
done();
|
||||
}, 3000);
|
||||
}
|
||||
}
|
||||
const thaiOptions: Intl.DateTimeFormatOptions = {
|
||||
|
|
@ -157,7 +157,7 @@ const thaiOptions: Intl.DateTimeFormatOptions = {
|
|||
<div class="q-px-md q-py-sm row col-12 items-center">
|
||||
<div class="text-subtitle1 text-weight-medium">กล่องข้อความ</div>
|
||||
<q-space />
|
||||
<div class="text-grey-5">ทั้งหมด {{ totalInbox }} ข้อความ</div>
|
||||
<div class="text-grey-5" style="font-size: 12px;">ทั้งหมด {{ totalInbox }} ข้อความ</div>
|
||||
</div>
|
||||
<q-separator />
|
||||
|
||||
|
|
@ -228,10 +228,7 @@ const thaiOptions: Intl.DateTimeFormatOptions = {
|
|||
/>
|
||||
</q-list>
|
||||
|
||||
<template
|
||||
:v-slot:isLoadInbox?loading:null
|
||||
v-if="inboxList.length < totalInbox"
|
||||
>
|
||||
<template v-slot:loading v-if="inboxList.length < totalInbox">
|
||||
<div class="row justify-center q-my-md">
|
||||
<q-spinner-dots color="primary" size="40px" />
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -451,14 +451,14 @@ const clickDelete = async (id: string, index: number) => {
|
|||
const totalInbox = ref<number>(0);
|
||||
const totalNoti = ref<number>(0);
|
||||
const round = ref<number>(0);
|
||||
const page = ref<number>(0);
|
||||
|
||||
function onLoad(index: any, done: any) {
|
||||
if (notiList.value.length < totalInbox.value) {
|
||||
setTimeout(() => {
|
||||
done();
|
||||
getDataNotification(index + 1, "NOMAL");
|
||||
}, 1000);
|
||||
}
|
||||
page.value++;
|
||||
setTimeout(() => {
|
||||
done();
|
||||
getDataNotification(page.value, "NOMAL");
|
||||
}, 1500);
|
||||
}
|
||||
|
||||
watch(
|
||||
|
|
@ -471,9 +471,6 @@ watch(
|
|||
}));
|
||||
notiList.value = updatedNotifications;
|
||||
fetchmsgNoread();
|
||||
} else {
|
||||
round.value++;
|
||||
round.value === 1 && getDataNotification(round.value, "NOMAL");
|
||||
}
|
||||
}
|
||||
);
|
||||
|
|
@ -534,32 +531,30 @@ watch(
|
|||
v-if="totalNoti !== 0"
|
||||
>{{ totalNoti }}</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"
|
||||
v-if="notiList.length !== 0"
|
||||
>
|
||||
<q-menu
|
||||
v-model="notiTrigger"
|
||||
:offset="[0, 8]"
|
||||
style="height: 400px; width: 480px"
|
||||
>
|
||||
<div class="q-px-md q-py-sm row col-12 items-center">
|
||||
<div class="text-subtitle1 text-weight-medium">การแจ้งเตือน</div>
|
||||
<q-space />
|
||||
<div class="text-grey-5">ทั้งหมด {{ totalInbox }} ข้อความ</div>
|
||||
<div class="text-grey-5" style="font-size: 12px">
|
||||
ทั้งหมด {{ totalInbox }} ข้อความ
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<q-infinite-scroll
|
||||
@load="onLoad"
|
||||
:offset="250"
|
||||
v-if="notiList.length !== 0"
|
||||
style="max-height: 400px"
|
||||
>
|
||||
<q-list
|
||||
v-for="(n, index) in notiList"
|
||||
:key="index"
|
||||
:class="!n.isOpen ? 'my-menu-link q-mt-sm' : 'q-mt-sm'"
|
||||
>
|
||||
<q-item v-ripple class="mytry q-py-xs" dense>
|
||||
<q-infinite-scroll @load="onLoad" :offset="250">
|
||||
<div v-for="(n, index) in notiList" :key="index" class="caption q-pa-xs">
|
||||
<q-item
|
||||
v-ripple
|
||||
:class="!n.isOpen ? 'mytry q-py-xs my-menu-link' : 'mytry q-py-xs'"
|
||||
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">{{
|
||||
n.sender
|
||||
n.body[0]
|
||||
}}</span>
|
||||
</q-avatar>
|
||||
</q-item-section>
|
||||
|
|
@ -582,15 +577,11 @@ watch(
|
|||
@click="clickDelete(n.id, index)"
|
||||
></q-btn>
|
||||
</q-item>
|
||||
<q-separator color="grey-2" />
|
||||
</q-list>
|
||||
<template
|
||||
:v-slot:isLoad?
|
||||
loading
|
||||
:
|
||||
null,
|
||||
v-if="notiList.length < totalInbox"
|
||||
>
|
||||
</div>
|
||||
|
||||
<q-separator color="grey-2" />
|
||||
|
||||
<template v-slot:loading>
|
||||
<div class="row justify-center q-my-md">
|
||||
<q-spinner-dots color="primary" size="40px" />
|
||||
</div>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue