From 7a8b51bcc1b54618b0bd63b82b5e0876ef55c9fc Mon Sep 17 00:00:00 2001 From: Dotnara Condori Date: Wed, 4 Dec 2024 16:45:24 -0400 Subject: [PATCH] [TM-1533] indeterminate progress (#726) * [TM-1533] add indeterminate progress bar until all polygons are loaded * [TM-1533] fix shadow in crads and text line height --------- Co-authored-by: cesarLima1 --- .../components/PolygonItem.tsx | 4 +-- .../PolygonReviewTab/components/Polygons.tsx | 2 +- .../ResourceTabs/PolygonReviewTab/index.tsx | 26 ++++++++------- .../LineProgressBarMonitored.tsx | 33 +++++++++++-------- 4 files changed, 37 insertions(+), 28 deletions(-) diff --git a/src/admin/components/ResourceTabs/PolygonReviewTab/components/PolygonItem.tsx b/src/admin/components/ResourceTabs/PolygonReviewTab/components/PolygonItem.tsx index 865ecb24..6a431a49 100644 --- a/src/admin/components/ResourceTabs/PolygonReviewTab/components/PolygonItem.tsx +++ b/src/admin/components/ResourceTabs/PolygonReviewTab/components/PolygonItem.tsx @@ -77,7 +77,7 @@ const PolygonItem = ({ {...props} className={classNames( className, - "flex flex-col rounded-lg border-2 border-grey-350 bg-white p-2 hover:border-primary" + "flex flex-col rounded-lg border-2 border-grey-350 bg-white p-2 shadow-monitored hover:border-primary" )} >
@@ -85,7 +85,7 @@ const PolygonItem = ({
diff --git a/src/admin/components/ResourceTabs/PolygonReviewTab/components/Polygons.tsx b/src/admin/components/ResourceTabs/PolygonReviewTab/components/Polygons.tsx index 29aaac10..75e7e738 100644 --- a/src/admin/components/ResourceTabs/PolygonReviewTab/components/Polygons.tsx +++ b/src/admin/components/ResourceTabs/PolygonReviewTab/components/Polygons.tsx @@ -251,7 +251,7 @@ const Polygons = (props: IPolygonProps) => {
-
+
{polygonMenu.map(item => (
= props => {
-
+
Site Status - + {record?.readable_status}
@@ -620,7 +623,16 @@ const PolygonReviewTab: FC = props => { Polygon Overview - + + + + + + + + + +
@@ -670,14 +682,6 @@ const PolygonReviewTab: FC = props => {
- {/*
- - Site Status - -
- -
-
*/}
- {data.map((item, index) => ( -
0 ? `${(item.count / totalCount) * 100}%` : "0%" }}> -
{ + const percentage = totalCount > 0 ? (item.count / totalCount) * 100 : 0; + return ( +
+
openTooltip(e, item)} + onMouseLeave={exitTooltip} + /> + {percentage > 10 && ( + + {item.status} + )} - onMouseEnter={e => openTooltip(e, item)} - onMouseLeave={exitTooltip} - /> - - {item.status} - -
- ))} +
+ ); + })}
); };