add start-end-date range for match list and fix pagination
This commit is contained in:
@@ -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: {
|
||||
|
||||
Reference in New Issue
Block a user