fix ชื่อ-นามสกุล

This commit is contained in:
AnandaTon 2023-09-19 17:42:17 +07:00
parent 4966b1d2e2
commit 1c57374868
12 changed files with 833 additions and 1082 deletions

View file

@ -41,6 +41,17 @@ const columns = ref<QTableProps["columns"]>([
sort: (a: string, b: string) =>
a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
},
{
name: "fullname",
align: "left",
label: "ชื่อ-นามสกุล",
sortable: true,
field: "fullname",
headerStyle: "font-size: 14px",
style: "font-size: 14px",
sort: (a: string, b: string) =>
a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
},
{
name: "realReason",
align: "left",
@ -148,6 +159,7 @@ onMounted(async () => {
}
});
// API
const fecthlist = async () => {
showLoader();
await http
@ -158,6 +170,7 @@ const fecthlist = async () => {
data.map((r: ResponseItems) => {
list.push({
datetext: r.createdAt !== null ? date2Thai(r.createdAt) : "-",
fullname: r.fullname ?? "",
createdAt: new Date(r.createdAt),
futureWork: !!r.futureWork,
futureWorkReason: r.futureWorkReason ?? "",
@ -184,6 +197,8 @@ const fecthlist = async () => {
hideLoader();
});
};
//
const saveAppoint = async () => {
await myForm.value!.validate().then(async (result: boolean) => {
if (result) {
@ -218,6 +233,8 @@ const validationDate = (thaiDate: string | null) => {
}
}
};
//
const convertThaiDateToNumeric = (thaiDate: string) => {
const parts = thaiDate.split(" ");
if (parts.length !== 3) return null;
@ -326,6 +343,15 @@ const openModalCalendar = (rows: any) => {
>
{{ props.rowIndex + 1 }}
</q-td>
<q-td
key="fullname"
:props="props"
@click="
router.push(`/exit-Interview/questionnair/${props.row.id}`)
"
>
{{ props.row.fullname }}
</q-td>
<q-td
key="realReason"
:props="props"
@ -425,6 +451,7 @@ const openModalCalendar = (rows: any) => {
</div>
</q-card>
<!-- dialog กำหนดวนหนดหมายสมภาษณ -->
<q-dialog v-model="modal" persistent>
<q-card style="width: 800px">
<q-form ref="myForm">