sort step and fix return report kp7 , kk1 and kk1-emp

This commit is contained in:
AdisakKanthawilang 2024-11-04 12:15:16 +07:00
parent af38addf46
commit e3bcb0c52c
3 changed files with 171 additions and 180 deletions

View file

@ -1388,6 +1388,11 @@ export class CommandController extends Controller {
const command = await this.commandRepository.findOne({
where: { id },
relations: ["commandSigns"],
order: {
commandSigns:{
createdAt: "ASC"
}
},
});
if (!command) {
throw new HttpError(HttpStatusCode.NOT_FOUND, "ไม่พบข้อมูลคำสั่งนี้");