fix bug return array org-chart

This commit is contained in:
Warunee Tamkoo 2025-07-24 16:58:19 +07:00
parent 554e3f2e22
commit c297572c79

View file

@ -4195,19 +4195,21 @@ export class OrganizationController extends Controller {
const formattedData_ =
rootId === "root"
? {
personID: "",
name: "",
avatar: "",
positionName: "",
positionNum: "",
positionNumInt: null,
departmentName: data.orgRevisionName,
organizationId: data.id,
children: formattedData,
}
? [
{
personID: "",
name: "",
avatar: "",
positionName: "",
positionNum: "",
positionNumInt: null,
departmentName: data.orgRevisionName,
organizationId: data.id,
children: formattedData,
},
]
: formattedData;
return new HttpSuccess([formattedData_]);
return new HttpSuccess(formattedData_);
}
/**