From 4144a51df86759fbba7fa2a288df411ba150570c Mon Sep 17 00:00:00 2001 From: Methapon2001 <61303214+Methapon2001@users.noreply.github.com> Date: Fri, 13 Dec 2024 11:17:59 +0700 Subject: [PATCH] feat: add failed type and comment/remark --- src/controllers/07-task-controller.ts | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/controllers/07-task-controller.ts b/src/controllers/07-task-controller.ts index 3149a58..bc2ede2 100644 --- a/src/controllers/07-task-controller.ts +++ b/src/controllers/07-task-controller.ts @@ -472,6 +472,8 @@ export class TaskActionController extends Controller { step: number; requestWorkId: string; taskStatus: TaskStatus; + failedType?: string; + failedComment?: string; }[], ) { return await prisma.$transaction(async (tx) => { @@ -486,7 +488,11 @@ export class TaskActionController extends Controller { if (!record) throw notFoundError("Task List"); return await tx.task.update({ where: { id: record.id }, - data: { taskStatus: v.taskStatus }, + data: { + taskStatus: v.taskStatus, + failedType: v.failedType, + failedComment: v.failedComment, + }, }); }); return await Promise.all(promises);