fix: typo and error
This commit is contained in:
parent
66aa3b1641
commit
42ff57e23e
1 changed files with 5 additions and 6 deletions
|
|
@ -301,7 +301,7 @@ export class RequestListController extends Controller {
|
|||
@Path() step: number,
|
||||
@Body()
|
||||
payload: {
|
||||
requestWorkStatus?: RequestWorkStatus;
|
||||
workStatus?: RequestWorkStatus;
|
||||
attributes?: Record<string, any>;
|
||||
customerDuty?: boolean;
|
||||
customerDutyCost?: number;
|
||||
|
|
@ -314,6 +314,8 @@ export class RequestListController extends Controller {
|
|||
},
|
||||
@Query() successAll?: boolean,
|
||||
) {
|
||||
if (!payload.responsibleUserId) payload.responsibleUserId = undefined;
|
||||
|
||||
const record = await prisma.requestWorkStepStatus.upsert({
|
||||
include: {
|
||||
requestWork: true,
|
||||
|
|
@ -332,7 +334,7 @@ export class RequestListController extends Controller {
|
|||
update: payload,
|
||||
});
|
||||
|
||||
switch (payload.requestWorkStatus) {
|
||||
switch (payload.workStatus) {
|
||||
case "InProgress":
|
||||
case "Waiting":
|
||||
case "Validate":
|
||||
|
|
@ -347,10 +349,7 @@ export class RequestListController extends Controller {
|
|||
break;
|
||||
}
|
||||
|
||||
if (
|
||||
successAll &&
|
||||
(payload.requestWorkStatus === "Completed" || payload.requestWorkStatus === "Ended")
|
||||
) {
|
||||
if (successAll && (payload.workStatus === "Completed" || payload.workStatus === "Ended")) {
|
||||
await prisma.requestData.update({
|
||||
where: {
|
||||
id: record.requestWork.requestDataId,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue