feat(tickets): add unassigned issue triage to ticket details
- embed detection previews within work assignments - allow discarding only unassigned detections - improve ticket detail labels, counts, and layout
This commit is contained in:
@@ -113,12 +113,14 @@ export function useTicketAssignmentsQuery(
|
||||
export function useTicketDetectionsQuery(
|
||||
videoId: string | undefined,
|
||||
params: VideoDetectionsParams,
|
||||
enabled = true,
|
||||
) {
|
||||
const queryParams = useMemo(
|
||||
() => ({
|
||||
skip: params.skip ?? 0,
|
||||
limit: params.limit ?? 1,
|
||||
assignment_id: params.assignment_id,
|
||||
assignment_status: params.assignment_status,
|
||||
class_name: params.class_name,
|
||||
min_confidence: params.min_confidence,
|
||||
sort: params.sort ?? 'timestamp_asc',
|
||||
@@ -126,6 +128,7 @@ export function useTicketDetectionsQuery(
|
||||
}),
|
||||
[
|
||||
params.assignment_id,
|
||||
params.assignment_status,
|
||||
params.class_name,
|
||||
params.limit,
|
||||
params.min_confidence,
|
||||
@@ -139,7 +142,7 @@ export function useTicketDetectionsQuery(
|
||||
queryKey: ticketKeys.classDetections(videoId ?? '', queryParams),
|
||||
queryFn: () =>
|
||||
videoService.getVideoDetections(videoId as string, queryParams),
|
||||
enabled: Boolean(videoId),
|
||||
enabled: Boolean(enabled && videoId),
|
||||
staleTime: Infinity,
|
||||
});
|
||||
}
|
||||
@@ -154,6 +157,7 @@ export function useTicketClassDetectionsQuery(
|
||||
export function useTicketAssignmentDetectionsQuery(
|
||||
ticketId: string | undefined,
|
||||
params: TicketAssignmentDetectionsParams,
|
||||
enabled = true,
|
||||
) {
|
||||
const queryParams = useMemo(
|
||||
() => ({
|
||||
@@ -172,7 +176,7 @@ export function useTicketAssignmentDetectionsQuery(
|
||||
ticketId as string,
|
||||
queryParams,
|
||||
),
|
||||
enabled: Boolean(ticketId),
|
||||
enabled: Boolean(enabled && ticketId),
|
||||
staleTime: Infinity,
|
||||
});
|
||||
}
|
||||
@@ -229,6 +233,9 @@ export function useDiscardDetectionMutation(
|
||||
}),
|
||||
queryClient.invalidateQueries({ queryKey: ticketKeys.lists() }),
|
||||
queryClient.invalidateQueries({ queryKey: ticketKeys.summaries() }),
|
||||
queryClient.invalidateQueries({
|
||||
queryKey: ticketKeys.assignmentDetectionLists(ticketId),
|
||||
}),
|
||||
queryClient.invalidateQueries({
|
||||
queryKey: ticketKeys.assignments(ticketId),
|
||||
}),
|
||||
|
||||
Reference in New Issue
Block a user