From e894676d3b0f354006e76de5d37704473d4c8219 Mon Sep 17 00:00:00 2001 From: "santasri.pachhal" Date: Wed, 29 Jul 2026 19:07:22 +0530 Subject: [PATCH] fix(ticket): gate AI detection summary behind assign permission --- .../components/TicketOverviewCard.tsx | 145 +++++++++--------- 1 file changed, 75 insertions(+), 70 deletions(-) diff --git a/src/app/(modules)/ticket/[ticketId]/components/TicketOverviewCard.tsx b/src/app/(modules)/ticket/[ticketId]/components/TicketOverviewCard.tsx index 09703a3..750b7e1 100644 --- a/src/app/(modules)/ticket/[ticketId]/components/TicketOverviewCard.tsx +++ b/src/app/(modules)/ticket/[ticketId]/components/TicketOverviewCard.tsx @@ -8,7 +8,7 @@ import { MapPin, Monitor, UserRound, - Play + Play, } from 'lucide-react'; import { useState } from 'react'; @@ -172,79 +172,84 @@ export function TicketOverviewCard({ ) : null} - - - - - AI Detection Summary - - {analysisVideoId ? ( - - - - - - ) : null} - - -
- - {ticket.ai_result.detections_by_class.map((item) => { - const visual = getDefectVisual(item.class_name); - return ( + + <> + + + + + AI Detection Summary + + {analysisVideoId ? ( + + + + ) : null} + + +
- ); - })} -
- {hasVideoMetrics ? ( -
- {videoMetadata?.fps ? ( - + {ticket.ai_result.detections_by_class.map((item) => { + const visual = getDefectVisual(item.class_name); + return ( + + ); + })} +
+ {hasVideoMetrics ? ( +
+ {videoMetadata?.fps ? ( + + ) : null} + {duration ? ( + + ) : null} + {videoMetadata?.resolution?.label ? ( + + ) : null} +
) : null} - {duration ? ( - - ) : null} - {videoMetadata?.resolution?.label ? ( - - ) : null} -
- ) : null} -
-
+ + - - - - {analysisTitle} - - Video analysis with annotation overlay - - - - - - - + + + + {analysisTitle} + + Video analysis with annotation overlay + + + + + + + + + ); }