add relocate from violations-last-combined-cases to match-list
This commit is contained in:
@@ -24,11 +24,11 @@ interface ViolationFile {
|
||||
has_previous: boolean;
|
||||
}
|
||||
|
||||
export const useFileViolations = (id: string, page: number, status?: string) => {
|
||||
export const useFileViolations = (id: string, page: number, status?: string, violationId?: string) => {
|
||||
return useQuery({
|
||||
queryKey: ['fileViolations', id, page, status],
|
||||
queryKey: ['fileViolations', id, page, status, violationId],
|
||||
queryFn: () => {
|
||||
return getFileViolations(id, page, status)
|
||||
return getFileViolations(id, page, status, violationId)
|
||||
},
|
||||
select: (data: ViolationFile | null) => {
|
||||
if (!data) {
|
||||
|
||||
@@ -4,19 +4,20 @@ import { fetchLastCase, ComplaintsCaseQueryParams } from '@/app/actions/violatio
|
||||
interface Case {
|
||||
amount: number;
|
||||
content: null | string;
|
||||
createdAt: string;
|
||||
created_at: string;
|
||||
description: string;
|
||||
id: number;
|
||||
lawyer: null | string;
|
||||
name: string;
|
||||
pageNumber: number;
|
||||
pageSize: number;
|
||||
page_number: number;
|
||||
page_size: number;
|
||||
priority: "HIGH" | "MEDIUM" | "LOW";
|
||||
totalElements: number;
|
||||
totalPages: number;
|
||||
total_elements: number;
|
||||
total_pages: number;
|
||||
type: "ACTIVE" | "INACTIVE" | string;
|
||||
updatedAt: string;
|
||||
violationId: number;
|
||||
updated_at: string;
|
||||
violation_id: number;
|
||||
file_id: string;
|
||||
}
|
||||
export interface useLastCase {
|
||||
content: Case[],
|
||||
|
||||
@@ -2,14 +2,15 @@ import { useQuery } from '@tanstack/react-query';
|
||||
import { fetchLastComplaint, ComplaintsCaseQueryParams } from '@/app/actions/violationActions';
|
||||
|
||||
interface Complaint {
|
||||
complaint_text: string,
|
||||
created_at: string,
|
||||
email: string,
|
||||
id: number,
|
||||
not_moderated: boolean,
|
||||
status: "CREATED" | string,
|
||||
updated_at: string,
|
||||
violation_id: number,
|
||||
complaint_text: string;
|
||||
created_at: string;
|
||||
email: string;
|
||||
id: number;
|
||||
not_moderated: boolean;
|
||||
status: "CREATED" | string;
|
||||
updated_at: string;
|
||||
violation_id: number;
|
||||
file_id: string;
|
||||
}
|
||||
export interface useLastComplaint {
|
||||
content: Complaint[],
|
||||
|
||||
Reference in New Issue
Block a user