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) {
|
async getQuotationById(@Path() quotationId: string) {
|
||||||
const record = await prisma.quotation.findUnique({
|
const record = await prisma.quotation.findUnique({
|
||||||
include: {
|
include: {
|
||||||
worker: true,
|
_count: {
|
||||||
|
select: { worker: true },
|
||||||
|
},
|
||||||
|
worker: {
|
||||||
|
include: { employee: true },
|
||||||
|
},
|
||||||
service: {
|
service: {
|
||||||
include: {
|
include: {
|
||||||
_count: { select: { work: true } },
|
_count: { select: { work: true } },
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue