Merge branch 'oat_dev' into develop

This commit is contained in:
oat_dev 2024-03-19 13:33:05 +07:00
commit 0d406ac110

View file

@ -54,7 +54,10 @@ const columns = ref<QTableProps["columns"]>([
align: "left",
label: "วันเริ่มต้นการฝึกอบรม/ดูงาน",
sortable: true,
field: "startDate",
field: (v) =>
v.isDate
? date2Thai(v.startDate)
: new Date(v.startDate).getFullYear() + 543,
headerStyle: "font-size: 14px",
style: "font-size: 14px",
sort: (a: string, b: string) =>
@ -65,7 +68,8 @@ const columns = ref<QTableProps["columns"]>([
align: "left",
label: "วันสิ้นสุดการฝึกอบรม/ดูงาน",
sortable: true,
field: "endDate",
field: (v) =>
v.isDate ? date2Thai(v.endDate) : new Date(v.endDate).getFullYear() + 543,
headerStyle: "font-size: 14px",
style: "font-size: 14px",
sort: (a: string, b: string) =>
@ -77,6 +81,7 @@ const columns = ref<QTableProps["columns"]>([
label: "ปีที่อบรม (พ.ศ.)",
sortable: true,
field: "yearly",
format: (v) => v + 543,
headerStyle: "font-size: 14px",
style: "font-size: 14px",
sort: (a: string, b: string) =>
@ -132,6 +137,7 @@ const columns = ref<QTableProps["columns"]>([
label: "คำสั่งลงวันที่/หนังสืออนุมัติลงวันที่",
sortable: true,
field: "dateOrder",
format: (v) => date2Thai(v),
headerStyle: "font-size: 14px",
style: "font-size: 14px",
sort: (a: string, b: string) =>
@ -510,17 +516,7 @@ onMounted(async () => {
<template v-slot:body="props" v-if="mode === 'table'">
<q-tr :props="props" class="cursor-pointer">
<q-td v-for="col in props.cols" :key="col.id">
<div v-if="col.name === 'startDate' || col.name === 'endDate'">
<div v-if="props.row.isDate">{{ date2Thai(col.value) }}</div>
<div v-else>
{{ +col.value.slice(0, 4) + 543 }}
</div>
</div>
<div v-else-if="col.name === 'dateOrder'">
{{ date2Thai(col.value) }}
</div>
<div v-else-if="col.name === 'yearly'">{{ col.value + 543 }}</div>
<div v-else>
<div>
{{ col.value ? col.value : "-" }}
</div>
</q-td>
@ -637,38 +633,7 @@ onMounted(async () => {
:key="col.name"
:style="`background-color: ${index % 2 !== 0 ? '#FAFAFA' : ''}`"
>
<div
v-if="col.name === 'startDate' || col.name === 'endDate'"
class="row q-pa-sm"
>
<div class="col-7 label-color">
<div>{{ col.label }}</div>
</div>
<div class="col">
<div v-if="props.row.isDate">
{{ date2Thai(col.value) }}
</div>
<div v-else>{{ +col.value.slice(0, 4) + 543 }}</div>
</div>
</div>
<div v-else-if="col.name === 'dateOrder'" class="row q-pa-sm">
<div class="col-7 label-color">
<div>{{ col.label }}</div>
</div>
<div class="col">
<div>{{ date2Thai(col.value) }}</div>
</div>
</div>
<div v-else-if="col.name === 'yearly'" class="row q-pa-sm">
<div class="col-7 label-color">
<div>{{ col.label }}</div>
</div>
<div class="col">
<div>{{ col.value + 543 }}</div>
</div>
</div>
<div v-else class="row q-pa-sm">
<div class="row q-pa-sm">
<div class="col-7 label-color">
<div>{{ col.label }}</div>
</div>
@ -1104,23 +1069,7 @@ onMounted(async () => {
<template v-slot:body="props">
<q-tr :props="props" class="cursor-pointer">
<q-td v-for="col in props.cols" :key="col.id">
<div
v-if="col.name === 'startDate' || col.name === 'endDate'"
>
<div v-if="props.row.isDate">
{{ date2Thai(col.value) }}
</div>
<div v-else>
{{ +col.value.slice(0, 4) + 543 }}
</div>
</div>
<div v-else-if="col.name === 'dateOrder'">
{{ date2Thai(col.value) }}
</div>
<div v-else-if="col.name === 'yearly'">
{{ col.value + 543 }}
</div>
<div v-else>
<div>
{{ col.value ? col.value : "-" }}
</div>
</q-td>