From fc2d115f40c978aa69686aacb606e04972fd48f5 Mon Sep 17 00:00:00 2001 From: "pramod.mahajan" Date: Sat, 25 Oct 2025 12:12:36 +0530 Subject: [PATCH] fixed move figure out f card - using type= compact --- src/components/Dashboard/Tasks.jsx | 88 ++++++++++++++++-------------- 1 file changed, 48 insertions(+), 40 deletions(-) diff --git a/src/components/Dashboard/Tasks.jsx b/src/components/Dashboard/Tasks.jsx index b1e04b09..c386eb15 100644 --- a/src/components/Dashboard/Tasks.jsx +++ b/src/components/Dashboard/Tasks.jsx @@ -2,6 +2,7 @@ import React from "react"; import { useSelectedProject } from "../../slices/apiDataManager"; import { useDashboardTasksCardData } from "../../hooks/useDashboard_Data"; import { TasksSkeleton } from "./DashboardSkeleton"; +import { formatCurrency, formatFigure } from "../../utils/appUtils"; const TasksCard = () => { const projectId = useSelectedProject(); @@ -16,49 +17,56 @@ const TasksCard = () => { } = useDashboardTasksCardData(projectId); if (isLoading) return ; return ( -
- {/* Header */} -
-
- Tasks -
-
- - {isError ? ( -
- - - {error?.message || "Unable to load data at the moment."} - - - - Retry - -
- ) : ( -
- {/* Total Tasks */} -
-

- {tasksCardData?.totalTasks?.toLocaleString() ?? 0} -

- Total +
+ {/* Header */} +
+
+ Tasks +
- {/* Completed Tasks */} -
-

- {tasksCardData?.completedTasks?.toLocaleString() ?? 0} -

- Completed -
-
- )} -
+ {isError ? ( +
+ + + {error?.message || "Unable to load data at the moment."} + + + + Retry + +
+ ) : ( +
+ {/* Total Tasks */} +
+

+ {formatFigure(tasksCardData?.totalTasks ?? 0, { + notation: "compact", + })} +

+ Total +
+ {/* Completed Tasks */} +
+

+ {formatFigure(tasksCardData?.completedTasks ?? 0, { + notation: "compact", + })} +

+ Completed +
+
+ )} +
); };