diff --git a/src/controllers/product-service-controller.ts b/src/controllers/product-service-controller.ts index 7a976f2..c7954b7 100644 --- a/src/controllers/product-service-controller.ts +++ b/src/controllers/product-service-controller.ts @@ -59,7 +59,9 @@ export class ProductServiceController extends Controller { if (query) or.push(Prisma.sql`"name" LIKE '%${query}%'`); if (status) and.push(Prisma.sql`"status" = ${status}::"Status"`); - if (productTypeId) and.push(Prisma.sql`"productTypeId" = ${productTypeId}`); + if (productTypeId) { + and.push(Prisma.sql`("productTypeId" = ${productTypeId} OR ("type" = 'service'))`); + } const where = Prisma.sql` ${or.length > 0 || and.length > 0 ? Prisma.sql`WHERE ` : Prisma.empty}