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