diff --git a/src/components/Dashboard/Dashboard.jsx b/src/components/Dashboard/Dashboard.jsx
index 3d0f0a66..84e97fd6 100644
--- a/src/components/Dashboard/Dashboard.jsx
+++ b/src/components/Dashboard/Dashboard.jsx
@@ -57,7 +57,7 @@ const Dashboard = () => {
-
diff --git a/src/components/Dashboard/ExpenseAnalysis.jsx b/src/components/Dashboard/ExpenseAnalysis.jsx
index 1fe27fae..6026ba20 100644
--- a/src/components/Dashboard/ExpenseAnalysis.jsx
+++ b/src/components/Dashboard/ExpenseAnalysis.jsx
@@ -7,11 +7,12 @@ import { FormProvider, useForm } from "react-hook-form";
import { formatCurrency, localToUtc } from "../../utils/appUtils";
import { useProjectName } from "../../hooks/useProjects";
import { SpinnerLoader } from "../common/Loader";
+import flatColors from "../Charts/flatColor";
const ExpenseAnalysis = () => {
const projectId = useSelectedProject();
const [projectName, setProjectName] = useState("All Project");
- const { projectNames, loading } = useProjectName();
+ const { projectNames } = useProjectName();
const methods = useForm({
defaultValues: { startDate: "", endDate: "" },
@@ -50,7 +51,7 @@ const ExpenseAnalysis = () => {
labels,
legend: { show: false },
dataLabels: { enabled: true, formatter: (val) => `${val.toFixed(0)}%` },
- colors: ["#7367F0", "#28C76F", "#FF9F43", "#EA5455", "#00CFE8", "#FF78B8"],
+ colors: flatColors,
plotOptions: {
pie: {
donut: {
@@ -79,22 +80,19 @@ const ExpenseAnalysis = () => {
return (
<>
-
-
+
Expense Breakdown
- {/*
Category Wise Expense Breakdown
*/}
{projectName}
-
- {/* Card body */}
{isLoading && (
{
)}
-
{!isLoading && report.length > 0 && (
<>
{isFetching && (
@@ -123,50 +120,59 @@ const ExpenseAnalysis = () => {
)}
-
-
-
+
+ {/* Chart Column */}
+
+
+
-
-
- {report.map((item, idx) => (
-
-
-
-
-
+ {/* Data/Legend Column */}
+
+
+ {report.map((item, idx) => (
+
+
+
+ {item.projectName}
+
+
+ {formatCurrency(item.totalApprovedAmount)}
+
+
-
- {item.projectName}
-
- {formatCurrency(item.totalApprovedAmount)}
-
-
-
- ))}
+
+ ))}
+
>
)}
-
- {/* Header */}
-
>
);
};
diff --git a/src/components/Dashboard/ExpenseStatus.jsx b/src/components/Dashboard/ExpenseStatus.jsx
index d6fefe7d..86a4fd8d 100644
--- a/src/components/Dashboard/ExpenseStatus.jsx
+++ b/src/components/Dashboard/ExpenseStatus.jsx
@@ -103,7 +103,7 @@ const ExpenseStatus = () => {
= 3 ? "text-xl" : "text-2xl"
+ className={`text-royalblue ${countDigit(item?.count || 0) >= 3 ? "text-xl" : "text-xl"
} text-gray-500`}
>
{item?.count || 0}
@@ -137,7 +137,7 @@ const ExpenseStatus = () => {
3 ? "text-" : "text-3xl"
+ className={`text-end text-royalblue ${countDigit(data?.totalAmount || 0) > 3 ? "text-xl" : "text-3xl"
} text-md`}
>
{formatCurrency(data?.totalAmount || 0)}