fixed move figure out f card - using type= compact
This commit is contained in:
parent
7f848eeb38
commit
fc2d115f40
@ -2,6 +2,7 @@ import React from "react";
|
|||||||
import { useSelectedProject } from "../../slices/apiDataManager";
|
import { useSelectedProject } from "../../slices/apiDataManager";
|
||||||
import { useDashboardTasksCardData } from "../../hooks/useDashboard_Data";
|
import { useDashboardTasksCardData } from "../../hooks/useDashboard_Data";
|
||||||
import { TasksSkeleton } from "./DashboardSkeleton";
|
import { TasksSkeleton } from "./DashboardSkeleton";
|
||||||
|
import { formatCurrency, formatFigure } from "../../utils/appUtils";
|
||||||
|
|
||||||
const TasksCard = () => {
|
const TasksCard = () => {
|
||||||
const projectId = useSelectedProject();
|
const projectId = useSelectedProject();
|
||||||
@ -31,10 +32,14 @@ const TasksCard = () => {
|
|||||||
{error?.message || "Unable to load data at the moment."}
|
{error?.message || "Unable to load data at the moment."}
|
||||||
</small>
|
</small>
|
||||||
<span
|
<span
|
||||||
className={`text-muted ${isFetching ? "cursor-wait" : "cursor-pointer"}`}
|
className={`text-muted ${
|
||||||
|
isFetching ? "cursor-wait" : "cursor-pointer"
|
||||||
|
}`}
|
||||||
onClick={refetch}
|
onClick={refetch}
|
||||||
>
|
>
|
||||||
<i className={`bx bx-refresh me-1 ${isFetching ? "bx-spin" : ""}`}></i>
|
<i
|
||||||
|
className={`bx bx-refresh me-1 ${isFetching ? "bx-spin" : ""}`}
|
||||||
|
></i>
|
||||||
Retry
|
Retry
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
@ -42,23 +47,26 @@ const TasksCard = () => {
|
|||||||
<div className="d-flex justify-content-around align-items-start flex-wrap mt-n2">
|
<div className="d-flex justify-content-around align-items-start flex-wrap mt-n2">
|
||||||
{/* Total Tasks */}
|
{/* Total Tasks */}
|
||||||
<div className="text-center flex-fill p-2">
|
<div className="text-center flex-fill p-2">
|
||||||
<h4 className="mb-0 fw-bold text-truncate" style={{ wordBreak: "break-word" }}>
|
<h4 className="mb-0 fw-bold text-truncate">
|
||||||
{tasksCardData?.totalTasks?.toLocaleString() ?? 0}
|
{formatFigure(tasksCardData?.totalTasks ?? 0, {
|
||||||
|
notation: "compact",
|
||||||
|
})}
|
||||||
</h4>
|
</h4>
|
||||||
<small className="text-muted d-block">Total</small>
|
<small className="text-muted d-block">Total</small>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{/* Completed Tasks */}
|
{/* Completed Tasks */}
|
||||||
<div className="text-center flex-fill p-2">
|
<div className="text-center flex-fill p-2">
|
||||||
<h4 className="mb-0 fw-bold text-truncate" style={{ wordBreak: "break-word" }}>
|
<h4 className="mb-0 fw-bold text-truncate">
|
||||||
{tasksCardData?.completedTasks?.toLocaleString() ?? 0}
|
{formatFigure(tasksCardData?.completedTasks ?? 0, {
|
||||||
|
notation: "compact",
|
||||||
|
})}
|
||||||
</h4>
|
</h4>
|
||||||
<small className="text-muted d-block">Completed</small>
|
<small className="text-muted d-block">Completed</small>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user