fix some useless changes

This commit is contained in:
Saeed AB 2025-09-08 22:53:16 +03:30
parent d69a7c1e05
commit bcfd2f4ce3
3 changed files with 42 additions and 116 deletions

View File

@ -1,74 +0,0 @@
import {
Bar,
BarChart,
CartesianGrid,
XAxis,
YAxis,
LabelList,
ResponsiveContainer,
} from "recharts";
import { Card, CardContent } from "~/components/ui/card";
import {
type ChartConfig,
ChartContainer,
} from "~/components/ui/chart";
import { formatNumber } from "~/lib/utils";
export type PopupChartDatum = {
name: string;
value: number;
};
const chartConfig = {
value: {
label: "Operational Fee",
color: "#4ADE80", // Green-400
},
} satisfies ChartConfig;
export function PopupBarChart({
data,
}: {
data: PopupChartDatum[];
}) {
return (
<Card className="py-0 bg-transparent mt-4 border-none h-full">
<CardContent className="px-2 sm:p-6 bg-transparent">
<ChartContainer config={chartConfig} className="aspect-auto h-80 w-full">
<ResponsiveContainer width="100%" height="100%">
<BarChart
accessibilityLayer
data={data}
margin={{ top: 20, right: 20, left: 20, bottom: 5 }}
>
<CartesianGrid vertical={false} stroke="#475569" />
<XAxis
dataKey="name"
tickLine={false}
axisLine={false}
tickMargin={8}
tick={{ fill: "#94a3b8", fontSize: 12 }}
/>
<YAxis
tickLine={false}
axisLine={false}
tickMargin={8}
tick={{ fill: "#94a3b8", fontSize: 12 }}
tickFormatter={(value) => `${formatNumber(Math.round(value))}`}
/>
<Bar dataKey="value" fill={chartConfig.value.color} radius={[8, 8, 0, 0]}>
<LabelList
dataKey="value"
position="top"
style={{ fill: "#ffffff", fontSize: "12px", fontWeight: "bold" }}
formatter={(v: number) => `${formatNumber(Math.round(v))}`}
/>
</Bar>
</BarChart>
</ResponsiveContainer>
</ChartContainer>
</CardContent>
</Card>
);
}

View File

@ -31,7 +31,7 @@ interface SidebarProps {
interface MenuItem {
id: string;
label: string;
icon: React.ComponentType<{ className?: string }>;
icon: React.ComponentType<{ className?: string }> | null;
href?: string;
children?: MenuItem[];
badge?: string | number;
@ -109,7 +109,7 @@ const menuItems: MenuItem[] = [
{
id: "strategic-alignment",
label: "میزان انطباق راهبردی",
icon: BarChart3,
icon: null,
href: "#", // This is not a route, it opens a popup
},
];