diff --git a/src/controllers/DevelopmentHistoryController.ts b/src/controllers/DevelopmentHistoryController.ts index 70cdf5c..4a6e123 100644 --- a/src/controllers/DevelopmentHistoryController.ts +++ b/src/controllers/DevelopmentHistoryController.ts @@ -266,8 +266,18 @@ export class DevelopmentOfficerHistoryController extends Controller { .skip((page - 1) * pageSize) .take(pageSize) .getManyAndCount(); + + const formattedData = development.map(item => ({ + id: item.id, + citizenId: item.citizenId, + fullName: item.prefix+item.firstName+" "+item.lastName, + position: item.position, + posType: item.posType.posTypeName, + posLevel: item.posLevel.posLevelName, + projectName: item.development.projectName, + })); - return new HttpSuccess({ data: development, total }); + return new HttpSuccess({ data: formattedData, total }); } /**