From c93d8910bcb5aef1ca656c42a413f3db0f5885c7 Mon Sep 17 00:00:00 2001 From: Scott Dickerson Date: Thu, 5 Oct 2023 16:55:25 -0400 Subject: [PATCH] :bug: Application drawer > reports: show analysis details for successful task (#1437) Clicking the 'View analysis details' link in the application analysis detail drawer, reports tab should show the most current application's task details. If no task is available for an application, "Not available" is shown. The link for a successful task was broken. It has been updated to use the task id instead of the application id. Signed-off-by: Scott J Dickerson Co-authored-by: Ian Bolton --- .../application-detail-drawer-analysis.tsx | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/client/src/app/pages/applications/components/application-detail-drawer/application-detail-drawer-analysis.tsx b/client/src/app/pages/applications/components/application-detail-drawer/application-detail-drawer-analysis.tsx index c47a1bb4ed..46a4a2072e 100644 --- a/client/src/app/pages/applications/components/application-detail-drawer/application-detail-drawer-analysis.tsx +++ b/client/src/app/pages/applications/components/application-detail-drawer/application-detail-drawer-analysis.tsx @@ -47,7 +47,6 @@ export const ApplicationDetailDrawerAnalysis: React.FC< const { identities } = useFetchIdentities(); const { facts, isFetching } = useFetchFacts(application?.id); - const [appAnalysisToView, setAppAnalysisToView] = React.useState(); const [taskIdToView, setTaskIdToView] = React.useState(); let matchingSourceCredsRef: Identity | undefined; @@ -124,7 +123,7 @@ export const ApplicationDetailDrawerAnalysis: React.FC< } type="button" variant="link" - onClick={() => setAppAnalysisToView(application.id)} + onClick={() => setTaskIdToView(task.id)} className={spacing.ml_0} style={{ margin: "0", padding: "0" }} > @@ -213,10 +212,9 @@ export const ApplicationDetailDrawerAnalysis: React.FC< title={`Analysis details for ${application?.name}`} fetch={getTaskById} - documentId={taskIdToView || appAnalysisToView} + documentId={taskIdToView} onClose={() => { setTaskIdToView(undefined); - setAppAnalysisToView(undefined); }} />