From 247bda1be4bee06c70b519ac22361200b7cf82ac Mon Sep 17 00:00:00 2001 From: "pramod.mahajan" Date: Sat, 25 Oct 2025 12:16:22 +0530 Subject: [PATCH] format figure in at dashboard --- src/components/Dashboard/Projects.jsx | 14 ++++++++++++-- src/components/Dashboard/Teams.jsx | 13 +++++++++++-- 2 files changed, 23 insertions(+), 4 deletions(-) diff --git a/src/components/Dashboard/Projects.jsx b/src/components/Dashboard/Projects.jsx index 359b184c..06cba6ec 100644 --- a/src/components/Dashboard/Projects.jsx +++ b/src/components/Dashboard/Projects.jsx @@ -3,6 +3,7 @@ import { useDashboardProjectsCardData } from "../../hooks/useDashboard_Data"; import eventBus from "../../services/eventBus"; import ProjectInfra from "../Project/ProjectInfra"; import { ProjectCardSkeleton } from "./DashboardSkeleton"; +import { formatFigure } from "../../utils/appUtils"; const Projects = () => { const { @@ -57,11 +58,20 @@ const Projects = () => { ) : (
-

{totalProjects.toLocaleString()}

+

+ {formatFigure(totalProjects ?? 0, { + notation: "compact", + })} +

+ Total
-

{ongoingProjects.toLocaleString()}

+

+ {formatFigure(ongoingProjects ?? 0, { + notation: "compact", + })} +

Ongoing
diff --git a/src/components/Dashboard/Teams.jsx b/src/components/Dashboard/Teams.jsx index bae3d553..05888e77 100644 --- a/src/components/Dashboard/Teams.jsx +++ b/src/components/Dashboard/Teams.jsx @@ -5,6 +5,7 @@ import eventBus from "../../services/eventBus"; import { useQueryClient } from "@tanstack/react-query"; import { useSelectedProject } from "../../slices/apiDataManager"; import { TeamsSkeleton } from "./DashboardSkeleton"; +import { formatFigure } from "../../utils/appUtils"; const Teams = () => { const queryClient = useQueryClient(); @@ -74,11 +75,19 @@ const Teams = () => { ) : (
-

{totalEmployees.toLocaleString()}

+

+ {formatFigure(totalEmployees ?? 0, { + notation: "compact", + })} +

Total Employees
-

{inToday.toLocaleString()}

+

+ {formatFigure(inToday ?? 0, { + notation: "compact", + })} +

In Today