This commit is contained in:
DESKTOP-1R2VSQH\Lenovo ThinkPad E490 2025-02-28 10:51:25 +07:00
parent d010529aaf
commit 74fa0f664c

View file

@ -34,7 +34,8 @@ const storeReport = useReportStore();
const stroeRegistry = useRegistryNewDataStore();
const { fetchStructureTree } = useStructureTree();
const mixin = useCounterMixin();
const { messageError, showLoader, hideLoader, date2Thai } = mixin;
const { messageError, showLoader, hideLoader, date2Thai, formatDatePosition } =
mixin;
const loadingBtn = ref<boolean>(false);
const total = ref<number>(0);
@ -121,8 +122,8 @@ const visibleColumnsBase = ref<string[]>([
"dateAppoint",
"dateRetireLaw",
"age",
"currentPosition",
"lengthPosition",
"positionDate",
"levelDate",
]);
const columns = computed<QTableProps["columns"]>(() => {
@ -289,22 +290,22 @@ const columns = computed<QTableProps["columns"]>(() => {
a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
},
{
name: "currentPosition",
name: "positionDate",
align: "left",
label: "ระยะเวลาดำรงตำแหน่งปัจจุบัน",
sortable: true,
field: "currentPosition",
field: "positionDate",
headerStyle: "font-size: 14px",
style: "font-size: 14px",
sort: (a: string, b: string) =>
a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
},
{
name: "lengthPosition",
name: "levelDate",
align: "left",
label: "ระยะเวลาดำรงตำแหน่งในระดับปัจจุบัน",
sortable: true,
field: "lengthPosition",
field: "levelDate",
headerStyle: "font-size: 14px",
style: "font-size: 14px",
sort: (a: string, b: string) =>
@ -553,8 +554,18 @@ async function onSearch() {
education: item.degree ?? "-",
dateAppoint: item.dateAppoint ?? "-",
age: item.age ?? "-",
currentPosition: item.currentPosition ?? "-",
lengthPosition: item.lengthPosition ?? "-",
positionDate:
formatDatePosition(
item.positionDate?.Years,
item.positionDate?.Months,
item.positionDate?.Days
) ?? "-",
levelDate:
formatDatePosition(
item.levelDate?.posExecutiveYears,
item.levelDate?.posExecutiveMonths,
item.levelDate?.posExecutiveDays
) ?? "-",
empType: employeeClass.value,
dateRetireLaw: item.dateRetireLaw ?? "-",
}));