feat: add failed type and comment/remark
This commit is contained in:
parent
1fef39729b
commit
4144a51df8
1 changed files with 7 additions and 1 deletions
|
|
@ -472,6 +472,8 @@ export class TaskActionController extends Controller {
|
||||||
step: number;
|
step: number;
|
||||||
requestWorkId: string;
|
requestWorkId: string;
|
||||||
taskStatus: TaskStatus;
|
taskStatus: TaskStatus;
|
||||||
|
failedType?: string;
|
||||||
|
failedComment?: string;
|
||||||
}[],
|
}[],
|
||||||
) {
|
) {
|
||||||
return await prisma.$transaction(async (tx) => {
|
return await prisma.$transaction(async (tx) => {
|
||||||
|
|
@ -486,7 +488,11 @@ export class TaskActionController extends Controller {
|
||||||
if (!record) throw notFoundError("Task List");
|
if (!record) throw notFoundError("Task List");
|
||||||
return await tx.task.update({
|
return await tx.task.update({
|
||||||
where: { id: record.id },
|
where: { id: record.id },
|
||||||
data: { taskStatus: v.taskStatus },
|
data: {
|
||||||
|
taskStatus: v.taskStatus,
|
||||||
|
failedType: v.failedType,
|
||||||
|
failedComment: v.failedComment,
|
||||||
|
},
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
return await Promise.all(promises);
|
return await Promise.all(promises);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue