fix(organization):show draft or current

This commit is contained in:
DESKTOP-1R2VSQH\Lenovo ThinkPad E490 2026-01-06 10:23:56 +07:00
parent 71f22247e8
commit f1e12f8b8d

View file

@ -154,7 +154,7 @@ const baseColumns = ref<QTableProps["columns"]>([
field: "lastUpdatedAt",
sortable: false,
format(val) {
return date2Thai(val);
return date2Thai(val, true, true);
},
headerStyle: "font-size: 14px",
style: "font-size: 14px",
@ -265,15 +265,17 @@ watch(
<q-td v-for="col in props.cols" :key="col.name" :props="props">
<div v-if="col.name == 'no'">
{{
store.typeOrganizational === "current" ||
(store.typeOrganizational === "draft" &&
historyType === "OWNER_HISTORY")
historyType === "OWNER_HISTORY"
? props.rowIndex + 1
: props.rowIndex + 1 == 1
: props.rowIndex + 1 == 1 &&
(store.typeOrganizational === "draft" ||
store.typeOrganizational === "old")
? "1 (แบบร่าง)"
: props.rowIndex + 1 == 2
: props.rowIndex + 1 == 2 &&
(store.typeOrganizational === "draft" ||
store.typeOrganizational === "old")
? "2 (ปัจจุบัน)"
: props.rowIndex + 1
: props.rowIndex + 1
}}
</div>