fix(organization): prevent displaying null for prefix

This commit is contained in:
DESKTOP-1R2VSQH\Lenovo ThinkPad E490 2026-05-22 17:51:03 +07:00
parent 660fed8375
commit d73fbf80f9
3 changed files with 6 additions and 4 deletions

View file

@ -213,7 +213,9 @@ function formatHistoryOwnerData(data: HistoryPos[]) {
return data.map((item) => ({
...item,
fullname: item.firstName
? `${item.prefix}${item.firstName} ${item.lastName}`.trim()
? `${item.prefix || ""}${item.firstName || ""} ${
item.lastName || ""
}`.trim()
: "ว่าง",
}));
}
@ -275,7 +277,7 @@ watch(
(store.typeOrganizational === "draft" ||
store.typeOrganizational === "old")
? "2 (ปัจจุบัน)"
: props.rowIndex + 1
: props.rowIndex + 1
}}
</div>