feat: task order (#7)
* feat: add task order table * refactor: update relation field * feat: basic task endpoints * feat: add filter by work status * refactor: update relation --------- Co-authored-by: Methapon2001 <61303214+Methapon2001@users.noreply.github.com>
This commit is contained in:
parent
ea337bd364
commit
c7f69666f2
3 changed files with 284 additions and 1 deletions
|
|
@ -1,7 +1,12 @@
|
|||
import { Body, Controller, Get, Path, Put, Query, Request, Route, Security, Tags } from "tsoa";
|
||||
import { RequestWithUser } from "../interfaces/user";
|
||||
import prisma from "../db";
|
||||
import { Prisma, RequestDataStatus, RequestWorkStatus } from "@prisma/client";
|
||||
import {
|
||||
Prisma,
|
||||
RequestDataStatus,
|
||||
RequestWorkStatus,
|
||||
RequestWorkStepStatus,
|
||||
} from "@prisma/client";
|
||||
import { createPermCondition } from "../services/permission";
|
||||
import { queryOrNot } from "../utils/relation";
|
||||
import { notFoundError } from "../utils/error";
|
||||
|
|
@ -161,8 +166,10 @@ export class RequestListController extends Controller {
|
|||
@Query() page: number = 1,
|
||||
@Query() pageSize: number = 30,
|
||||
@Query() requestDataId?: string,
|
||||
@Query() workStatus?: RequestWorkStatus,
|
||||
) {
|
||||
const where = {
|
||||
stepStatus: { some: { workStatus } },
|
||||
request: {
|
||||
id: requestDataId,
|
||||
quotation: {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue