refactor: include full detail when get by id
This commit is contained in:
parent
9ad9dd2c72
commit
5ccd8909d5
1 changed files with 6 additions and 1 deletions
|
|
@ -220,7 +220,12 @@ export class QuotationController extends Controller {
|
|||
async getQuotationById(@Path() quotationId: string) {
|
||||
const record = await prisma.quotation.findUnique({
|
||||
include: {
|
||||
worker: true,
|
||||
_count: {
|
||||
select: { worker: true },
|
||||
},
|
||||
worker: {
|
||||
include: { employee: true },
|
||||
},
|
||||
service: {
|
||||
include: {
|
||||
_count: { select: { work: true } },
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue