diff --git a/src/modules/10_registry/02_Government/06_Assistance.vue b/src/modules/10_registry/02_Government/06_Assistance.vue index a87f459..b9526ce 100644 --- a/src/modules/10_registry/02_Government/06_Assistance.vue +++ b/src/modules/10_registry/02_Government/06_Assistance.vue @@ -29,22 +29,38 @@ const modalHistory = ref(false); /** ตัวแปรข้อมูล */ const visibleColumns = ref([ + "commandName", "agency", "dateStart", "dateEnd", "commandNo", "document", + "lastUpdateFullName", "lastUpdatedAt", ]); const columns = ref([ + { + name: "commandName", + align: "left", + label: "ประเภทคำสั่ง", + sortable: true, + field: "commandName", + headerStyle: "font-size: 14px", + style: "font-size: 14px", + sort: (a: string, b: string) => + a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }), + }, + { name: "agency", align: "left", - label: "หน่วยงานที่ให้ช่วยราชการ", + label: "หน่วยงานที่ให้ช่วยราชการ/ส่งตัวกลับ", sortable: true, field: "agency", headerStyle: "font-size: 14px", style: "font-size: 14px", + sort: (a: string, b: string) => + a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }), }, { name: "dateStart", @@ -55,6 +71,8 @@ const columns = ref([ format: (v) => date2Thai(v), headerStyle: "font-size: 14px", style: "font-size: 14px", + sort: (a: string, b: string) => + a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }), }, { name: "dateEnd", @@ -65,6 +83,8 @@ const columns = ref([ format: (v) => date2Thai(v), headerStyle: "font-size: 14px", style: "font-size: 14px", + sort: (a: string, b: string) => + a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }), }, { name: "commandNo", @@ -74,6 +94,8 @@ const columns = ref([ field: "commandNo", headerStyle: "font-size: 14px", style: "font-size: 14px", + sort: (a: string, b: string) => + a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }), }, { name: "document", @@ -83,6 +105,19 @@ const columns = ref([ field: "document", headerStyle: "font-size: 14px", style: "font-size: 14px", + sort: (a: string, b: string) => + a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }), + }, + { + name: "lastUpdateFullName", + align: "left", + label: "ผู้ดำเนินการ", + sortable: true, + field: "lastUpdateFullName", + headerStyle: "font-size: 14px", + style: "font-size: 14px", + sort: (a: string, b: string) => + a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }), }, { name: "lastUpdatedAt", @@ -102,6 +137,7 @@ const pagination = ref({ }); const visibleColumnsHistory = ref([ + "commandName", "agency", "dateStart", "dateEnd", @@ -111,14 +147,28 @@ const visibleColumnsHistory = ref([ "lastUpdatedAt", ]); const columnsHistory = ref([ + { + name: "commandName", + align: "left", + label: "ประเภทคำสั่ง", + sortable: true, + field: "commandName", + headerStyle: "font-size: 14px", + style: "font-size: 14px", + sort: (a: string, b: string) => + a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }), + }, + { name: "agency", align: "left", - label: "หน่วยงานที่ให้ช่วยราชการ", + label: "หน่วยงานที่ให้ช่วยราชการ/ส่งตัวกลับ", sortable: true, field: "agency", headerStyle: "font-size: 14px", style: "font-size: 14px", + sort: (a: string, b: string) => + a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }), }, { name: "dateStart", @@ -129,6 +179,8 @@ const columnsHistory = ref([ format: (v) => date2Thai(v), headerStyle: "font-size: 14px", style: "font-size: 14px", + sort: (a: string, b: string) => + a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }), }, { name: "dateEnd", @@ -139,6 +191,8 @@ const columnsHistory = ref([ format: (v) => date2Thai(v), headerStyle: "font-size: 14px", style: "font-size: 14px", + sort: (a: string, b: string) => + a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }), }, { name: "commandNo", @@ -148,6 +202,8 @@ const columnsHistory = ref([ field: "commandNo", headerStyle: "font-size: 14px", style: "font-size: 14px", + sort: (a: string, b: string) => + a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }), }, { name: "document", @@ -157,6 +213,8 @@ const columnsHistory = ref([ field: "document", headerStyle: "font-size: 14px", style: "font-size: 14px", + sort: (a: string, b: string) => + a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }), }, { name: "lastUpdateFullName", @@ -166,6 +224,8 @@ const columnsHistory = ref([ field: "lastUpdateFullName", headerStyle: "font-size: 14px", style: "font-size: 14px", + sort: (a: string, b: string) => + a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }), }, { name: "lastUpdatedAt", @@ -173,9 +233,11 @@ const columnsHistory = ref([ label: "วันที่แก้ไข", sortable: true, field: "lastUpdatedAt", + format: (v) => date2Thai(v, false, true), headerStyle: "font-size: 14px", style: "font-size: 14px", - format: (v) => date2Thai(v, false, true), + sort: (a: string, b: string) => + a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }), }, ]); @@ -316,6 +378,7 @@ onMounted(async () => { {{ col.label }} + @@ -331,17 +394,20 @@ onMounted(async () => { ดาวน์โหลด + + +