fix: service not included in result
This commit is contained in:
parent
6550ce1bb3
commit
e3e44d03b5
1 changed files with 3 additions and 1 deletions
|
|
@ -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}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue