โครงสร้าง => แสดง จัดลำดับตำแหน่ง

This commit is contained in:
DESKTOP-1R2VSQH\Lenovo ThinkPad E490 2024-04-25 11:04:17 +07:00
parent 8a7434ea45
commit f2b173c708
2 changed files with 10 additions and 2 deletions

View file

@ -81,7 +81,11 @@ function getData() {
const dataList = res.data.result.data;
const dataMap = dataList.map((item: any) => ({
id: item.id,
name: `${item.orgShortname}${item.posMasterNoPrefix}${item.posMasterNo}${item.posMasterNoSuffix}`,
name: `${item.orgShortname}${
item.posMasterNoPrefix ? item.posMasterNoPrefix : ""
}${item.posMasterNo ? item.posMasterNo : ""}${
item.posMasterNoSuffix ? item.posMasterNoSuffix : ""
}`,
posMasterNoPrefix: item.posMasterNoPrefix,
posMasterNo: item.posMasterNo,
posMasterNoSuffix: item.posMasterNoSuffix,

View file

@ -81,7 +81,11 @@ function getData() {
const dataList = res.data.result.data;
const dataMap = dataList.map((item: any) => ({
id: item.id,
name: `${item.orgShortname}${item.posMasterNoPrefix}${item.posMasterNo}${item.posMasterNoSuffix}`,
name: `${item.orgShortname}${
item.posMasterNoPrefix ? item.posMasterNoPrefix : ""
}${item.posMasterNo ? item.posMasterNo : ""}${
item.posMasterNoSuffix ? item.posMasterNoSuffix : ""
}`,
posMasterNoPrefix: item.posMasterNoPrefix,
posMasterNo: item.posMasterNo,
posMasterNoSuffix: item.posMasterNoSuffix,