add start-end-date range for match list and fix pagination

This commit is contained in:
smanylov
2026-05-21 18:20:50 +07:00
parent e0455b200a
commit 36b4a3b481
6 changed files with 49 additions and 36 deletions
+4 -3
View File
@@ -127,7 +127,7 @@ export async function getViolationFilesArray(props: {
}
}
export async function getFileMatches(fileId: string, page: number, status?: string, violationId?: string) {
export async function getFileMatches(fileId: string, page: number, status?: string, violationId?: string, startDate?: string, endDate?: string) {
const token = await getSessionData('token');
try {
@@ -138,13 +138,14 @@ export async function getFileMatches(fileId: string, page: number, status?: stri
msg_id: 30009,
message_body: {
file_id: fileId,
page: page,
page: (page > 0 ? page - 1 : 0),
size: 5,
sort_direction: 'desc',
token: token,
status: status,
...(violationId && { action: 'getByViolationId' }),
...(violationId && { violation_id: violationId })
...(violationId && { violation_id: violationId }),
...((startDate && endDate) && { start_date: startDate, end_date: endDate })
}
}),
headers: {