diff --git a/src/controllers/WorkflowController.ts b/src/controllers/WorkflowController.ts index 3bbd31dc..24710642 100644 --- a/src/controllers/WorkflowController.ts +++ b/src/controllers/WorkflowController.ts @@ -307,13 +307,25 @@ export class WorkflowController extends Controller { }, }, order: { order: "ASC", stateUserComments: { order: "ASC" } }, - relations: ["stateUserComments"], + relations: ["stateUserComments", "stateUserComments.profile"], }); const _state = state.map((x) => ({ stateId: x.id, stateNo: x.order, stateName: x.name, - stateUserComments: x.stateUserComments, + stateUserComments: x.stateUserComments.map((x) => ({ + id: x.id, + prefix: x.profile.prefix, + firstName: x.profile.firstName, + lastName: x.profile.lastName, + profileId: x.profileId, + isAcceptSetting: x.isAcceptSetting, + isApproveSetting: x.isApproveSetting, + isReasonSetting: x.isReasonSetting, + isAccept: x.isAccept, + isApprove: x.isApprove, + reason: x.reason, + })), })); return new HttpSuccess(_state); }