feat: add filter responsible only
This commit is contained in:
parent
7b92d6a59a
commit
5aa5e55f99
1 changed files with 21 additions and 0 deletions
|
|
@ -77,6 +77,7 @@ export class RequestDataController extends Controller {
|
|||
@Query() page: number = 1,
|
||||
@Query() pageSize: number = 30,
|
||||
@Query() query: string = "",
|
||||
@Query() responsibleOnly?: boolean,
|
||||
@Query() requestDataStatus?: RequestDataStatus,
|
||||
@Query() quotationId?: string,
|
||||
@Query() code?: string,
|
||||
|
|
@ -119,6 +120,25 @@ export class RequestDataController extends Controller {
|
|||
]),
|
||||
code,
|
||||
requestDataStatus,
|
||||
requestWork: responsibleOnly
|
||||
? {
|
||||
some: {
|
||||
productService: {
|
||||
service: {
|
||||
workflow: {
|
||||
step: {
|
||||
some: {
|
||||
responsiblePerson: {
|
||||
some: { userId: req.user.sub },
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
: undefined,
|
||||
quotation: {
|
||||
id: quotationId,
|
||||
registeredBranch: { OR: permissionCond(req.user) },
|
||||
|
|
@ -138,6 +158,7 @@ export class RequestDataController extends Controller {
|
|||
workflow: {
|
||||
include: {
|
||||
step: {
|
||||
orderBy: { order: "asc" },
|
||||
include: {
|
||||
value: true,
|
||||
responsiblePerson: {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue