แก้ ินกั

This commit is contained in:
kittapath 2024-10-17 11:06:58 +07:00
parent a53cf4212f
commit c579011021

View file

@ -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);
}