Merge branch 'develop' into devTee
This commit is contained in:
commit
f837551f4e
3 changed files with 25 additions and 16 deletions
|
|
@ -139,7 +139,7 @@ const formData = reactive<FormData>({
|
||||||
const rows = ref([]);
|
const rows = ref([]);
|
||||||
const dateEndInputStyle = computed(() => {
|
const dateEndInputStyle = computed(() => {
|
||||||
if(formData.investigationDateStart){
|
if(formData.investigationDateStart){
|
||||||
const currentDate = new Date(formData.investigationDateStart as Date);
|
const currentDate = new Date();
|
||||||
const investigationDateEnd = new Date(formData.investigationDateEnd as Date);
|
const investigationDateEnd = new Date(formData.investigationDateEnd as Date);
|
||||||
|
|
||||||
const isInNext7Days =
|
const isInNext7Days =
|
||||||
|
|
|
||||||
|
|
@ -180,9 +180,9 @@ const emit = defineEmits(["submit:disciplinary"]);
|
||||||
|
|
||||||
const dateEndInputStyle = computed(() => {
|
const dateEndInputStyle = computed(() => {
|
||||||
if (formData.disciplinaryDateStart) {
|
if (formData.disciplinaryDateStart) {
|
||||||
const currentDate = new Date(formData.disciplinaryDateStart as Date);
|
const currentDate = new Date();
|
||||||
const investigationDateEnd = new Date(formData.disciplinaryDateEnd as Date);
|
const investigationDateEnd = new Date(formData.disciplinaryDateEnd as Date);
|
||||||
|
|
||||||
const isInNext7Days =
|
const isInNext7Days =
|
||||||
investigationDateEnd >= currentDate &&
|
investigationDateEnd >= currentDate &&
|
||||||
investigationDateEnd <=
|
investigationDateEnd <=
|
||||||
|
|
|
||||||
|
|
@ -87,9 +87,8 @@ async function fetchmsgNoread() {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
const isLoad = ref<boolean>(false);
|
const statusLoad = ref<boolean>(false);
|
||||||
const getDataNotification = async (index: number, type: string) => {
|
const getDataNotification = async (index: number, type: string) => {
|
||||||
isLoad.value = false;
|
|
||||||
const thaiOptions: Intl.DateTimeFormatOptions = {
|
const thaiOptions: Intl.DateTimeFormatOptions = {
|
||||||
hour: "2-digit",
|
hour: "2-digit",
|
||||||
minute: "2-digit",
|
minute: "2-digit",
|
||||||
|
|
@ -119,15 +118,12 @@ const getDataNotification = async (index: number, type: string) => {
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
notiList.value.push(...list);
|
notiList.value.push(...list);
|
||||||
totalInbox.value = res.data.result.total;
|
statusLoad.value = totalInbox.value === 0 ? true : false;
|
||||||
})
|
})
|
||||||
.catch((e) => {
|
.catch((e) => {
|
||||||
messageError($q, e);
|
messageError($q, e);
|
||||||
})
|
})
|
||||||
.finally(() => {
|
.finally(() => {});
|
||||||
isLoad.value = true;
|
|
||||||
// hideLoader();
|
|
||||||
});
|
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -536,11 +532,7 @@ watch(
|
||||||
v-if="totalNoti !== 0"
|
v-if="totalNoti !== 0"
|
||||||
>{{ totalNoti }}</q-badge
|
>{{ totalNoti }}</q-badge
|
||||||
>
|
>
|
||||||
<q-menu
|
<q-menu v-model="notiTrigger" :offset="[0, 8]" style="width: 480px">
|
||||||
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="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 />
|
||||||
|
|
@ -549,7 +541,11 @@ watch(
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<q-infinite-scroll @load="onLoad" :offset="250">
|
<q-infinite-scroll
|
||||||
|
@load="onLoad"
|
||||||
|
:offset="250"
|
||||||
|
v-if="statusLoad === false"
|
||||||
|
>
|
||||||
<div
|
<div
|
||||||
v-for="(n, index) in notiList"
|
v-for="(n, index) in notiList"
|
||||||
:key="index"
|
:key="index"
|
||||||
|
|
@ -604,6 +600,19 @@ watch(
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
</q-infinite-scroll>
|
</q-infinite-scroll>
|
||||||
|
<div class="q-pa-md" v-else>
|
||||||
|
<q-banner rounded class="bg-amber-1 text-center">
|
||||||
|
<div class="text-yellow-10">
|
||||||
|
<q-icon
|
||||||
|
name="mdi-alert-box"
|
||||||
|
class="q-mx-xs"
|
||||||
|
size="sm"
|
||||||
|
color="yellow-10"
|
||||||
|
/>
|
||||||
|
ไมมีข้อมูล
|
||||||
|
</div>
|
||||||
|
</q-banner>
|
||||||
|
</div>
|
||||||
</q-menu>
|
</q-menu>
|
||||||
</q-btn>
|
</q-btn>
|
||||||
<div class="row items-center no-wrap">
|
<div class="row items-center no-wrap">
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue