From 362961dcdb439146b684dd89a49e93b962592e50 Mon Sep 17 00:00:00 2001 From: John Duprey Date: Tue, 2 Jan 2024 16:22:59 -0500 Subject: [PATCH] fix tenant view --- .../tenant/standards/BestPracticeAnalyser.jsx | 26 +++++++++---------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/src/views/tenant/standards/BestPracticeAnalyser.jsx b/src/views/tenant/standards/BestPracticeAnalyser.jsx index ccffd64e6e44..1d05c0be6278 100644 --- a/src/views/tenant/standards/BestPracticeAnalyser.jsx +++ b/src/views/tenant/standards/BestPracticeAnalyser.jsx @@ -95,6 +95,7 @@ RefreshAction.propTypes = { const getsubcolumns = (data) => { const flatObj = data && data.length > 0 ? data : [{ data: 'No Data Found' }] const QueryColumns = [] + if (flatObj[0]) { Object.keys(flatObj[0]).map((key) => { QueryColumns.push({ @@ -226,7 +227,6 @@ const BestPracticeAnalyser = () => { tenant.customerId, SearchNow, ]) - return ( <> @@ -342,40 +342,40 @@ const BestPracticeAnalyser = () => { {info.formatter === 'bool' && ( - {graphrequest.data.Data[info.value] ? 'Yes' : 'No'} + {graphrequest.data.Data[0][info.value] ? 'Yes' : 'No'} )} {info.formatter === 'reverseBool' && ( - {graphrequest.data.Data[info.value] ? 'No' : 'Yes'} + {graphrequest.data.Data[0][info.value] ? 'No' : 'Yes'} )} {info.formatter === 'warnBool' && ( - {graphrequest.data.Data[info.value] ? 'Yes' : 'No'} + {graphrequest.data.Data[0][info.value] ? 'Yes' : 'No'} )} @@ -384,15 +384,15 @@ const BestPracticeAnalyser = () => { key={QueryColumns.data} reportName="BestPracticeAnalyser" dynamicColumns={false} - columns={getsubcolumns(graphrequest.data.Data[info.value])} - data={graphrequest.data.Data[info.value]} + columns={getsubcolumns(graphrequest.data.Data[0][info.value])} + data={graphrequest.data.Data[0][info.value]} isFetching={graphrequest.isFetching} /> )} {info.formatter === 'number' && (

- {getNestedValue(graphrequest.data.Data, info.value)} + {getNestedValue(graphrequest.data.Data[0], info.value)}

)}