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: {
|
customerBranch: {
|
||||||
include: { customer: true },
|
include: { customer: true },
|
||||||
},
|
},
|
||||||
createdBy: true,
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
employee: true,
|
|
||||||
},
|
},
|
||||||
take: pageSize,
|
take: pageSize,
|
||||||
skip: (page - 1) * pageSize,
|
skip: (page - 1) * pageSize,
|
||||||
|
|
@ -125,9 +123,16 @@ export class RequestDataController extends Controller {
|
||||||
quotation: {
|
quotation: {
|
||||||
include: {
|
include: {
|
||||||
customerBranch: { include: { customer: true } },
|
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