refactor: move get relation into individual instead
This commit is contained in:
parent
c86c45702d
commit
fff5816988
1 changed files with 8 additions and 3 deletions
|
|
@ -102,10 +102,8 @@ export class RequestDataController extends Controller {
|
|||
customerBranch: {
|
||||
include: { customer: true },
|
||||
},
|
||||
createdBy: true,
|
||||
},
|
||||
},
|
||||
employee: true,
|
||||
},
|
||||
take: pageSize,
|
||||
skip: (page - 1) * pageSize,
|
||||
|
|
@ -125,9 +123,16 @@ export class RequestDataController extends Controller {
|
|||
quotation: {
|
||||
include: {
|
||||
customerBranch: { include: { customer: true } },
|
||||
createdBy: true,
|
||||
},
|
||||
},
|
||||
employee: {
|
||||
include: {
|
||||
employeePassport: {
|
||||
orderBy: { expireDate: "desc" },
|
||||
},
|
||||
},
|
||||
},
|
||||
employee: true,
|
||||
},
|
||||
});
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue