feat: add list request data by status

This commit is contained in:
Methapon Metanipat 2024-11-18 13:02:04 +07:00
parent 026bf44bc7
commit 0d6fa7f7ba

View file

@ -48,6 +48,7 @@ export class RequestDataController extends Controller {
@Query() page: number = 1, @Query() page: number = 1,
@Query() pageSize: number = 30, @Query() pageSize: number = 30,
@Query() query: string = "", @Query() query: string = "",
@Query() requestDataStatus?: RequestDataStatus,
) { ) {
const where = { const where = {
OR: queryOrNot<Prisma.RequestDataWhereInput[]>(query, [ OR: queryOrNot<Prisma.RequestDataWhereInput[]>(query, [
@ -68,6 +69,7 @@ export class RequestDataController extends Controller {
}, },
}, },
]), ]),
requestDataStatus,
quotation: { quotation: {
customerBranch: { customerBranch: {
customer: { customer: {