feat: add credit note status filter

This commit is contained in:
Methapon2001 2025-01-10 09:37:47 +07:00
parent a3735abb78
commit 1cf861d492

View file

@ -101,8 +101,16 @@ export class CreditNoteController extends Controller {
@Query() pageSize: number = 30,
@Query() query: string = "",
@Query() quotationId?: string,
@Query() creditNoteStatus?: CreditNoteStatus,
) {
return await this.getCreditNoteListByCriteria(req, page, pageSize, query, quotationId);
return await this.getCreditNoteListByCriteria(
req,
page,
pageSize,
query,
quotationId,
creditNoteStatus,
);
}
// NOTE: only when needed or else remove this and implement in getCreditNoteList
@ -114,6 +122,7 @@ export class CreditNoteController extends Controller {
@Query() pageSize: number = 30,
@Query() query: string = "",
@Query() quotationId?: string,
@Query() creditNoteStatus?: CreditNoteStatus,
@Body() body?: {},
) {
const where = {
@ -159,6 +168,7 @@ export class CreditNoteController extends Controller {
},
},
]),
creditNoteStatus,
requestWork: {
some: {
request: {