Project structure changes ad new files added in dashboard folders

This commit is contained in:
2026-07-23 18:32:07 +05:30
parent 1993d91319
commit 5a2ae769d8
63 changed files with 1550 additions and 190 deletions

View File

@@ -0,0 +1,27 @@
import {BarChartProps} from "@/types/types";
export default function BarChart({ data }: BarChartProps) {
return (
<div>
{/* Bars */}
<div className="flex items-end justify-between h-40 px-2 border-b border-[#1b3454] pb-2">
{data.map((item, idx) => (
<div key={idx} className="flex flex-col items-center flex-1 group">
<div className={`w-5 ${item.height} bg-teal-400 rounded-t transition-all duration-300 group-hover:bg-teal-300`} />
</div>
))}
</div>
{/* X-Axis */}
<div className="flex justify-between pt-3 px-2 text-xs font-medium text-gray-500">
{data.map((item, idx) => (
<span key={idx} className="w-5 text-center">{item.month}</span>
))}
</div>
</div>
);
}

View File

@@ -0,0 +1,18 @@
import { ProgressBarProps } from "@/types/types";
export function ProgressBarRow({ label, value, maxValue }: ProgressBarProps) {
const percentage = (value / maxValue) * 100;
return (
<div className="flex items-center justify-between py-1.5 text-sm">
<span className="text-[#899db7] w-32 truncate">{label}</span>
<div className="flex-1 mx-4 bg-[#122238] h-2.5 rounded-full overflow-hidden">
<div
className="bg-[#17cbb5] h-full rounded-full transition-all duration-500"
style={{ width: `${percentage}%` }}
/>
</div>
<span className="text-white font-bold w-6 text-right">{value}</span>
</div>
);
}

View File

@@ -0,0 +1,21 @@
import { StatusProgressProps } from "@/types/types";
export function StatusProgressRow({ label, value, total, barColor = "bg-[#17cbb5]" }: StatusProgressProps) {
const percentage = (value / total) * 100;
return (
<div className="space-y-2 py-1.5">
<div className="flex justify-between text-xs font-semibold">
<span className="text-white">{label}</span>
<span className="text-[#5b7391]">{value}/{total}</span>
</div>
<div className="bg-[#122238] h-3 rounded-full overflow-hidden">
<div
className={`${barColor} h-full rounded-full transition-all duration-500`}
style={{ width: `${percentage}%` }}
/>
</div>
</div>
);
}