From 9a4c11c6c4161b5072c49e4a94942849293257ad Mon Sep 17 00:00:00 2001 From: setthawutttty Date: Tue, 17 Dec 2024 15:37:23 +0700 Subject: [PATCH] =?UTF-8?q?=E0=B9=80=E0=B8=9E=E0=B8=B4=E0=B9=88=E0=B8=A1?= =?UTF-8?q?=E0=B8=9F=E0=B8=B4=E0=B8=A5=20=E0=B8=9C=E0=B8=B9=E0=B9=89?= =?UTF-8?q?=E0=B8=94=E0=B8=B3=E0=B9=80=E0=B8=99=E0=B8=B4=E0=B8=99=E0=B8=81?= =?UTF-8?q?=E0=B8=B2=E0=B8=A3/=E0=B8=A7=E0=B8=B1=E0=B8=99=E0=B8=97?= =?UTF-8?q?=E0=B8=B5=E0=B9=88=E0=B9=81=E0=B8=81=E0=B9=89=E0=B9=84=E0=B8=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/api.development.ts | 8 +- .../01_Information/02_ChangeName.vue | 86 ++++++++++++++----- .../01_Information/05_Educations.vue | 30 ++++++- .../10_registry/01_Information/06_Ability.vue | 30 ++++++- .../10_registry/02_Government/03_Leave.vue | 33 ++++++- .../10_registry/02_Government/04_Duty.vue | 25 ++++++ .../10_registry/03_Salary/01_Salary.vue | 21 +++++ .../10_registry/03_Salary/02_Nopaid.vue | 25 ++++++ .../04_Achievement/01_Certificate.vue | 25 ++++++ .../04_Achievement/02_Training.vue | 28 +++++- .../04_Achievement/03_Insignia.vue | 25 ++++++ .../10_registry/04_Achievement/04_Honor.vue | 25 ++++++ .../04_Achievement/05_Assessments.vue | 25 ++++++ .../04_Achievement/06_DevelopmentPlan.vue | 25 ++++++ src/modules/10_registry/05_Other/01_Other.vue | 33 ++++++- 15 files changed, 411 insertions(+), 33 deletions(-) diff --git a/src/api/api.development.ts b/src/api/api.development.ts index c1f9521..308e9fc 100644 --- a/src/api/api.development.ts +++ b/src/api/api.development.ts @@ -14,6 +14,12 @@ export default { fileByFile: (name: string, group: string, id: string, fileName: string) => `${urlFile}/file/${name}/${group}/${id}/${fileName}`, - + subFileByFileName: ( + name: string, + group: string, + id: string, + subId: string, + fileName: string + ) => `${urlFile}/sub-file/${name}/${group}/${id}/${subId}/${fileName}`, developmentRequest:`${orgProfile}/development-request` }; diff --git a/src/modules/10_registry/01_Information/02_ChangeName.vue b/src/modules/10_registry/01_Information/02_ChangeName.vue index 52c3a19..9f80dcd 100644 --- a/src/modules/10_registry/01_Information/02_ChangeName.vue +++ b/src/modules/10_registry/01_Information/02_ChangeName.vue @@ -14,7 +14,8 @@ const link = ref(""); const $q = useQuasar(); const mixin = useCounterMixin(); const dataStore = useDataStore(); -const { showLoader, hideLoader, messageError, date2Thai,onSearchDataTable } = mixin; +const { showLoader, hideLoader, messageError, date2Thai, onSearchDataTable } = + mixin; const rows = ref([]); const rowsData = ref([]); @@ -31,7 +32,8 @@ const visibleColumns = ref([ "prefix", "firstName", "lastName", - "status", + "lastUpdateFullName", + "lastUpdatedAt", ]); const columns = ref([ { @@ -67,12 +69,25 @@ const columns = ref([ sort: (a: string, b: string) => a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }), }, + { - name: "status", + name: "lastUpdateFullName", align: "left", - label: "สถานะการเปลี่ยนชื่อ", + label: "ผู้ดำเนินการ", sortable: true, - field: "status", + 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", + align: "left", + label: "วันที่แก้ไข", + sortable: true, + field: "lastUpdatedAt", + format: (v) => date2Thai(v, false, true), headerStyle: "font-size: 14px", style: "font-size: 14px", sort: (a: string, b: string) => @@ -212,6 +227,33 @@ function onSearch() { ); } +/** + * ฟังก์ชันโหลไฟลเอกสารหลักฐาน + * @param id รายการที่ต้องการโหลด + */ +async function onDownloadFile(id: string, profileId: string) { + showLoader(); + await http + .get( + config.API.subFileByFileName( + "ทะเบียนประวัติ", + "ประวัติการเปลี่ยนชื่อ-นามสกุล", + profileId, + id, + "เอกสารหลักฐาน" + ) + ) + .then(async (res) => { + const data = res.data.downloadUrl; + window.open(data, "_blank"); + }) + .catch((err) => { + messageError($q, err); + }) + .finally(() => { + hideLoader(); + }); +} onMounted(async () => { link.value = await dataStore.getProFileType(); @@ -289,15 +331,14 @@ onMounted(async () => { - ดูประวัติการเปลี่ยนชื่อ-นามสกุล + ดาวน์โหลด @@ -306,18 +347,19 @@ onMounted(async () => {
- - ประวัติแก้ไขประวัติการศึกษา - + + + ดาวน์โหลด + + {{ diff --git a/src/modules/10_registry/01_Information/05_Educations.vue b/src/modules/10_registry/01_Information/05_Educations.vue index 0c2e28d..4901662 100644 --- a/src/modules/10_registry/01_Information/05_Educations.vue +++ b/src/modules/10_registry/01_Information/05_Educations.vue @@ -16,7 +16,8 @@ const link = ref(""); const $q = useQuasar(); const mixin = useCounterMixin(); const dataStore = useDataStore(); -const { showLoader, hideLoader, messageError, date2Thai,onSearchDataTable } = mixin; +const { showLoader, hideLoader, messageError, date2Thai, onSearchDataTable } = + mixin; const rows = ref([]); const rowsData = ref([]); @@ -45,6 +46,8 @@ const visibleColumns = ref([ "startDate", "finishDate", "note", + "lastUpdateFullName", + "lastUpdatedAt", ]); const columns = ref([ @@ -217,6 +220,29 @@ const columns = ref([ 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", + align: "left", + label: "วันที่แก้ไข", + sortable: true, + field: "lastUpdatedAt", + 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" }), + }, ]); const columnsHistory = ref([ @@ -563,7 +589,7 @@ onMounted(async () => { {{ props.row.status ? props.row.status : "-" }}
- {{ col.value }} + {{ col.value ? col.value:'-' }}
diff --git a/src/modules/10_registry/01_Information/06_Ability.vue b/src/modules/10_registry/01_Information/06_Ability.vue index d51c902..948df44 100644 --- a/src/modules/10_registry/01_Information/06_Ability.vue +++ b/src/modules/10_registry/01_Information/06_Ability.vue @@ -22,7 +22,8 @@ const $q = useQuasar(); const mode = ref($q.screen.gt.xs); const mixin = useCounterMixin(); const dataStore = useDataStore(); -const { showLoader, hideLoader, messageError, date2Thai,onSearchDataTable } = mixin; +const { showLoader, hideLoader, messageError, date2Thai, onSearchDataTable } = + mixin; const modalHistory = ref(false); /** ตัวแปรข้อมูล */ @@ -32,6 +33,8 @@ const visibleColumns = ref([ "detail", "remark", "reference", + "lastUpdateFullName", + "lastUpdatedAt", ]); const columns = ref([ @@ -79,6 +82,29 @@ const columns = ref([ 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", + align: "left", + label: "วันที่แก้ไข", + sortable: true, + field: "lastUpdatedAt", + 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" }), + }, ]); const visibleColumnsHistory = ref([ @@ -284,7 +310,7 @@ onMounted(async () => { {{ props.row.status ? props.row.status : "-" }}
- {{ col.value }} + {{ col.value ? col.value : "-" }}
diff --git a/src/modules/10_registry/02_Government/03_Leave.vue b/src/modules/10_registry/02_Government/03_Leave.vue index badc206..40ddbc2 100644 --- a/src/modules/10_registry/02_Government/03_Leave.vue +++ b/src/modules/10_registry/02_Government/03_Leave.vue @@ -36,6 +36,8 @@ const visibleColumns = ref([ "numLeave", "status", "reason", + "lastUpdateFullName", + "lastUpdatedAt", ]); const columns = ref([ @@ -105,6 +107,29 @@ const columns = ref([ 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", + align: "left", + label: "วันที่แก้ไข", + sortable: true, + field: "lastUpdatedAt", + 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" }), + }, ]); const visibleColumnsHistory = ref([ @@ -233,6 +258,8 @@ function getData() { status: item.status, reason: item.reason, typeLeaveId: item.leaveTypeId, + lastUpdatedAt: item.lastUpdatedAt, + lastUpdateFullName: item.lastUpdateFullName, })); rows.value = listData; rowsData.value = listData; @@ -252,7 +279,7 @@ function getHistory() { .get(config.API.dataUserLeaveHistoryByType(link.value, idByRow.value)) .then((res) => { const data = res.data.result; - const listData = data.map((item: any) => ({ + const listData = data.map((item: any) => ({ id: item.id, typeLeave: item.leaveType.name, code: item.leaveType.refCommandDate, @@ -265,8 +292,8 @@ function getHistory() { lastUpdateFullName: item.lastUpdateFullName, lastUpdatedAt: item.lastUpdatedAt, })); - rowsHistory.value = listData - rowsHistoryData.value = listData + rowsHistory.value = listData; + rowsHistoryData.value = listData; }) .catch((e) => { messageError($q, e); diff --git a/src/modules/10_registry/02_Government/04_Duty.vue b/src/modules/10_registry/02_Government/04_Duty.vue index efce767..50ee476 100644 --- a/src/modules/10_registry/02_Government/04_Duty.vue +++ b/src/modules/10_registry/02_Government/04_Duty.vue @@ -34,6 +34,8 @@ const visibleColumns = ref([ "reference", "refCommandNo", "refCommandDate", + "lastUpdateFullName", + "lastUpdatedAt", ]); const columns = ref([ { @@ -105,6 +107,29 @@ const columns = ref([ 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", + align: "left", + label: "วันที่แก้ไข", + sortable: true, + field: "lastUpdatedAt", + headerStyle: "font-size: 14px", + style: "font-size: 14px", + format: (v) => date2Thai(v), + sort: (a: string, b: string) => + a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }), + }, ]); const visibleColumnsHistory = ref([ diff --git a/src/modules/10_registry/03_Salary/01_Salary.vue b/src/modules/10_registry/03_Salary/01_Salary.vue index bb5e5c6..281f247 100644 --- a/src/modules/10_registry/03_Salary/01_Salary.vue +++ b/src/modules/10_registry/03_Salary/01_Salary.vue @@ -42,6 +42,8 @@ const visibleColumns = ref([ "positionLevel", "templateDoc", "refCommandNo", + "lastUpdateFullName", + "lastUpdatedAt", ]); const columns = computed(() => { @@ -146,6 +148,25 @@ const baseColumns = ref([ headerStyle: "font-size: 14px", style: "font-size: 14px", }, + { + name: "lastUpdateFullName", + align: "left", + label: "ผู้ดำเนินการ", + sortable: true, + field: "lastUpdateFullName", + headerStyle: "font-size: 14px", + style: "font-size: 14px", + }, + { + name: "lastUpdatedAt", + align: "left", + label: "วันที่แก้ไข", + sortable: true, + field: "lastUpdatedAt", + headerStyle: "font-size: 14px", + style: "font-size: 14px", + format: (v) => date2Thai(v, false, true), + }, ]); const visibleColumnsHistory = ref([ diff --git a/src/modules/10_registry/03_Salary/02_Nopaid.vue b/src/modules/10_registry/03_Salary/02_Nopaid.vue index c60f5ef..a73f2c0 100644 --- a/src/modules/10_registry/03_Salary/02_Nopaid.vue +++ b/src/modules/10_registry/03_Salary/02_Nopaid.vue @@ -33,6 +33,8 @@ const visibleColumns = ref([ "reference", "refCommandNo", "refCommandDate", + "lastUpdateFullName", + "lastUpdatedAt", ]); const columns = ref([ @@ -94,6 +96,29 @@ const columns = ref([ 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", + align: "left", + label: "วันที่แก้ไข", + sortable: true, + field: "lastUpdatedAt", + headerStyle: "font-size: 14px", + style: "font-size: 14px", + format: (v) => date2Thai(v), + sort: (a: string, b: string) => + a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }), + }, ]); const visibleColumnsHistory = ref([ diff --git a/src/modules/10_registry/04_Achievement/01_Certificate.vue b/src/modules/10_registry/04_Achievement/01_Certificate.vue index dd66f1a..10c24b5 100644 --- a/src/modules/10_registry/04_Achievement/01_Certificate.vue +++ b/src/modules/10_registry/04_Achievement/01_Certificate.vue @@ -35,6 +35,8 @@ const visibleColumns = ref([ "certificateNo", "issueDate", "expireDate", + "lastUpdateFullName", + "lastUpdatedAt", ]); const columns = ref([ @@ -95,6 +97,29 @@ const columns = ref([ 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", + align: "left", + label: "วันที่แก้ไข", + sortable: true, + field: "lastUpdatedAt", + 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" }), + }, ]); const visibleColumnsHistory = ref([ diff --git a/src/modules/10_registry/04_Achievement/02_Training.vue b/src/modules/10_registry/04_Achievement/02_Training.vue index 5d76b3d..b7db1b3 100644 --- a/src/modules/10_registry/04_Achievement/02_Training.vue +++ b/src/modules/10_registry/04_Achievement/02_Training.vue @@ -23,7 +23,8 @@ const rowsHistoryData = ref([]); const $q = useQuasar(); const mode = ref($q.screen.gt.xs); const mixin = useCounterMixin(); -const { showLoader, hideLoader, messageError, date2Thai,onSearchDataTable } = mixin; +const { showLoader, hideLoader, messageError, date2Thai, onSearchDataTable } = + mixin; const modalHistory = ref(false); /** ตัวแปรข้อมูล */ @@ -39,6 +40,8 @@ const visibleColumns = ref([ "dateOrder", // คำสั่งลงวันที่ "startDate", // วันเริ่มต้น "endDate", // วันสิ้นสุด + "lastUpdateFullName", + "lastUpdatedAt", ]); const columns = ref([ @@ -158,6 +161,29 @@ const columns = ref([ 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", + align: "left", + label: "วันที่แก้ไข", + sortable: true, + field: "lastUpdatedAt", + 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" }), + }, ]); const visibleColumnsHistory = ref([ diff --git a/src/modules/10_registry/04_Achievement/03_Insignia.vue b/src/modules/10_registry/04_Achievement/03_Insignia.vue index 94c416e..2f6984e 100644 --- a/src/modules/10_registry/04_Achievement/03_Insignia.vue +++ b/src/modules/10_registry/04_Achievement/03_Insignia.vue @@ -43,6 +43,8 @@ const visibleColumns = ref([ "refCommandNo", "refCommandDate", "note", + "lastUpdateFullName", + "lastUpdatedAt", ]); const columns = ref([ @@ -202,6 +204,29 @@ const columns = ref([ 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", + align: "left", + label: "วันที่แก้ไข", + sortable: true, + field: "lastUpdatedAt", + headerStyle: "font-size: 14px", + style: "font-size: 14px", + format: (v) => date2Thai(v), + sort: (a: string, b: string) => + a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }), + }, ]); const visibleColumnsHistory = ref([ diff --git a/src/modules/10_registry/04_Achievement/04_Honor.vue b/src/modules/10_registry/04_Achievement/04_Honor.vue index 093382f..693132c 100644 --- a/src/modules/10_registry/04_Achievement/04_Honor.vue +++ b/src/modules/10_registry/04_Achievement/04_Honor.vue @@ -37,6 +37,8 @@ const visibleColumns = ref([ "issueDate", "refCommandNo", "refCommandDate", + "lastUpdateFullName", + "lastUpdatedAt", ]); const columns = ref([ @@ -97,6 +99,29 @@ const columns = ref([ 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", + align: "left", + label: "วันที่แก้ไข", + sortable: true, + field: "lastUpdatedAt", + headerStyle: "font-size: 14px", + style: "font-size: 14px", + format: (v) => date2Thai(v), + sort: (a: string, b: string) => + a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }), + }, ]); const visibleColumnsHistory = ref([ diff --git a/src/modules/10_registry/04_Achievement/05_Assessments.vue b/src/modules/10_registry/04_Achievement/05_Assessments.vue index ee5bc1a..436ba5a 100644 --- a/src/modules/10_registry/04_Achievement/05_Assessments.vue +++ b/src/modules/10_registry/04_Achievement/05_Assessments.vue @@ -116,6 +116,29 @@ const columns = ref([ 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", + align: "left", + label: "วันที่แก้ไข", + sortable: true, + field: "lastUpdatedAt", + headerStyle: "font-size: 14px", + style: "font-size: 14px", + format: (v) => date2Thai(v), + sort: (a: string, b: string) => + a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }), + }, ]); const columnsHistory = ref([ { @@ -249,6 +272,8 @@ const visibleColumns = ref([ "pointSum", "name", "date", + "lastUpdateFullName", + "lastUpdatedAt", ]); function onHistory(id: string) { diff --git a/src/modules/10_registry/04_Achievement/06_DevelopmentPlan.vue b/src/modules/10_registry/04_Achievement/06_DevelopmentPlan.vue index 3c5f01f..5841e92 100644 --- a/src/modules/10_registry/04_Achievement/06_DevelopmentPlan.vue +++ b/src/modules/10_registry/04_Achievement/06_DevelopmentPlan.vue @@ -37,6 +37,8 @@ const visibleColumns = ref([ "developmentTarget", "developmentResults", "developmentReport", + "lastUpdateFullName", + "lastUpdatedAt", ]); const columns = ref([ @@ -105,6 +107,29 @@ const columns = ref([ 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", + align: "left", + label: "วันที่แก้ไข", + sortable: true, + field: "lastUpdatedAt", + headerStyle: "font-size: 14px", + style: "font-size: 14px", + format: (v) => date2Thai(v), + sort: (a: string, b: string) => + a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }), + }, ]); const paginationPlan = ref({ diff --git a/src/modules/10_registry/05_Other/01_Other.vue b/src/modules/10_registry/05_Other/01_Other.vue index acc0239..0f40048 100644 --- a/src/modules/10_registry/05_Other/01_Other.vue +++ b/src/modules/10_registry/05_Other/01_Other.vue @@ -16,7 +16,8 @@ const link = ref(""); const $q = useQuasar(); const mixin = useCounterMixin(); const dataPerson = useDataStore(); -const { showLoader, hideLoader, messageError, date2Thai,onSearchDataTable } = mixin; +const { showLoader, hideLoader, messageError, date2Thai, onSearchDataTable } = + mixin; const idByRow = ref(""); const rows = ref([]); @@ -29,7 +30,12 @@ const mode = ref($q.screen.gt.xs); const modalHistory = ref(false); /** ตัวแปรข้อมูล */ -const visibleColumns = ref(["date", "detail"]); +const visibleColumns = ref([ + "date", + "detail", + "lastUpdateFullName", + "lastUpdatedAt", +]); const columns = ref([ { name: "date", @@ -52,6 +58,29 @@ const columns = ref([ 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", + align: "left", + label: "วันที่แก้ไข", + sortable: true, + field: "lastUpdatedAt", + headerStyle: "font-size: 14px", + style: "font-size: 14px", + format: (v) => date2Thai(v), + sort: (a: string, b: string) => + a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }), + }, ]); const visibleColumnsHistory = ref([