diff --git a/src/components/Charts/HorizontalBarChart.jsx b/src/components/Charts/HorizontalBarChart.jsx
index 86f05668..3537b827 100644
--- a/src/components/Charts/HorizontalBarChart.jsx
+++ b/src/components/Charts/HorizontalBarChart.jsx
@@ -46,19 +46,23 @@ const HorizontalBarChart = ({
// Replace 0 with 1 for visual purposes, but display "0%" in labels
const adjustedSeriesData = sortedSeriesData.map(val => (val === 0 ? 1 : val));
+ // Dynamically adjust chart height if only one data point
+ const chartHeight = seriesData.length === 1 ? 80 : 380;
+
const chartOptions = {
chart: {
type: "bar",
- height: 380,
+ height: chartHeight,
toolbar: { show: false },
},
grid: { show: false },
plotOptions: {
bar: {
- barHeight: "60%",
+ barHeight: seriesData.length === 1 ? "30%" : "60%",
distributed: true,
horizontal: true,
- borderRadius: 10,
+ borderRadius: 3,
+ borderRadiusApplication: "end",
dataLabels: {
position: "top",
},
@@ -70,6 +74,7 @@ const HorizontalBarChart = ({
textAnchor: "center",
style: {
colors: ["#000"], // Black labels
+ fontSize: "8px",
},
formatter: function (_, opt) {
const originalVal = sortedSeriesData[opt.dataPointIndex]; // Show real value
@@ -93,6 +98,9 @@ const HorizontalBarChart = ({
axisBorder: { show: false },
axisTicks: { show: false },
},
+ legend: {
+ show: true,
+ },
tooltip: {
theme: "dark",
x: { show: true },
@@ -110,7 +118,7 @@ const HorizontalBarChart = ({
options={chartOptions}
series={[{ data: adjustedSeriesData }]}
type="bar"
- height={380}
+ height={chartHeight}
/>
);
diff --git a/src/components/Charts/LineChart.jsx b/src/components/Charts/LineChart.jsx
index 565e5816..1dc1b1ac 100644
--- a/src/components/Charts/LineChart.jsx
+++ b/src/components/Charts/LineChart.jsx
@@ -3,10 +3,11 @@ import ReactApexChart from "react-apexcharts";
import PropTypes from "prop-types";
const LineChart = ({
- seriesData = [],
- categories = [],
- colors = ["#1E90FF", "#FF6347"],
- loading = false
+ seriesData = [],
+ categories = [],
+ colors = ["#1E90FF", "#FF6347"],
+ loading = false,
+ lineChartCategoriesDates = [],
}) => {
const hasValidData =
Array.isArray(seriesData) &&
@@ -100,11 +101,21 @@ const LineChart = ({
tooltip: {
enabled: true,
x: {
- formatter: (val, opts) => val
+ formatter: (value, { dataPointIndex }) => {
+ if (
+ lineChartCategoriesDates &&
+ lineChartCategoriesDates.length > dataPointIndex
+ ) {
+ return lineChartCategoriesDates[dataPointIndex];
+ }
+ return value;
+ }
}
}
+
};
+
return (
{
day: "numeric",
})
);
-
+ const lineChartCategoriesDates = sortedDashboardData.map((d) =>
+ new Date(d.date).toLocaleDateString("en-US", {
+ month: "short",
+ day: "numeric",
+ year: "numeric",
+ })
+ );
return (
@@ -168,7 +174,7 @@ const Dashboard = () => {
Projects
-
Total Projects Overview
+
Projects Completion Status
@@ -230,13 +236,13 @@ const Dashboard = () => {
{/* Row 2: Time Range Buttons */}
-
+
{["1D", "1W", "15D", "1M", "3M", "1Y", "5Y"].map((key) => (
diff --git a/src/components/Project/AboutProject.jsx b/src/components/Project/AboutProject.jsx
index 66290edf..afd54971 100644
--- a/src/components/Project/AboutProject.jsx
+++ b/src/components/Project/AboutProject.jsx
@@ -36,29 +36,30 @@ const AboutProject = ({ data }) => {
Status:{" "}
{ProjectStatus(data.projectStatusId)}
-
-
- Contacts
-
-
-
Contact:{" "}
{data.contactPerson}
- -
-
- Contact Number:{" "}
- NA
-
- -
-
- Email: NA
-
-
Address:{" "}
+
+ {/*
+ Contacts
+ */}
+
+
+ {/* -
+
+ Contact Number:{" "}
+ NA
+
*/}
+ {/* -
+
+ Email: NA
+
*/}
-
{data.projectAddress}
diff --git a/src/components/Project/ProjectBanner.jsx b/src/components/Project/ProjectBanner.jsx
index e075b3a7..466c5854 100644
--- a/src/components/Project/ProjectBanner.jsx
+++ b/src/components/Project/ProjectBanner.jsx
@@ -76,59 +76,33 @@ const ProjectBanner = ( {project_data} ) =>
onClose={handleClose}
>
- {/* -------------------- */}
+ {/* Project Banner */}
-
-
-
+
+ {/* Left: Icon + Name */}
+

+ className="rounded-3"
+ style={{ width: "60px", height: "60px" }}
+ />
+
+ {CurrentProject.name ? CurrentProject.name : "N/A"}
+
-
-
-
-
- {CurrentProject.name ? CurrentProject.name : "N/A"}
-
-
- Address:{" "}
- {CurrentProject.projectAddress ? CurrentProject.projectAddress : "N/A"}
-
-
- Contact:{" "}
- {CurrentProject.contactPerson ? CurrentProject.contactPerson : "N/A"}
-
-
-
- {" "}
- Start Date:{" "}
- {CurrentProject.startDate
- ? moment(CurrentProject.startDate).format("DD-MMM-YYYY")
- : "N/A"}
-
-
- End Date:{" "}
- {CurrentProject.endDate
- ? moment(CurrentProject.endDate).format("DD-MMM-YYYY")
- : "N/A"}
-
-
-
-
-
-
+ Modify
+
+ )}
diff --git a/src/components/Project/ProjectNav.jsx b/src/components/Project/ProjectNav.jsx
index 25b55a4b..5516c464 100644
--- a/src/components/Project/ProjectNav.jsx
+++ b/src/components/Project/ProjectNav.jsx
@@ -47,7 +47,7 @@ const ProjectNav = ( {onPillClick, activePill} ) =>
Infrastructure
-
+ {/*
>
Work Plan
-
+ */}
{
e.preventDefault(); // Prevent page reload
- onPillClick("activities");
+ onPillClick("directory");
}}
>
- Activities
+ Directory
diff --git a/src/data/menuData.json b/src/data/menuData.json
index 29fbdfa2..72ea7191 100644
--- a/src/data/menuData.json
+++ b/src/data/menuData.json
@@ -28,17 +28,13 @@
"text": "Project Status",
"available": true,
"link": "#"
- },
- {
- "text": "Inventory",
- "available": true,
- "link": "/inventory"
}
+
]
},
{
"text": "Activities",
- "icon": "bx bx-store",
+ "icon": "bx bx-list-ul",
"available": true,
"link": "",
"submenu": [
@@ -75,7 +71,7 @@
]
},
{
- "text": "User Management",
+ "text": "Administration",
"icon": "bx bx-box",
"available": true,
"link": "",
@@ -91,6 +87,12 @@
"link": "/masters"
}
]
+ },
+ {
+ "text": "Inventory",
+ "icon": "bx bx-store",
+ "available": true,
+ "link": "/inventory"
}
]
},