fix some useless changes
This commit is contained in:
parent
d69a7c1e05
commit
bcfd2f4ce3
|
|
@ -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>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
@ -31,7 +31,7 @@ interface SidebarProps {
|
||||||
interface MenuItem {
|
interface MenuItem {
|
||||||
id: string;
|
id: string;
|
||||||
label: string;
|
label: string;
|
||||||
icon: React.ComponentType<{ className?: string }>;
|
icon: React.ComponentType<{ className?: string }> | null;
|
||||||
href?: string;
|
href?: string;
|
||||||
children?: MenuItem[];
|
children?: MenuItem[];
|
||||||
badge?: string | number;
|
badge?: string | number;
|
||||||
|
|
@ -109,7 +109,7 @@ const menuItems: MenuItem[] = [
|
||||||
{
|
{
|
||||||
id: "strategic-alignment",
|
id: "strategic-alignment",
|
||||||
label: "میزان انطباق راهبردی",
|
label: "میزان انطباق راهبردی",
|
||||||
icon: BarChart3,
|
icon: null,
|
||||||
href: "#", // This is not a route, it opens a popup
|
href: "#", // This is not a route, it opens a popup
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
|
||||||
80
app/root.tsx
80
app/root.tsx
|
|
@ -41,51 +41,51 @@ export function Layout({ children }: { children: React.ReactNode }) {
|
||||||
</head>
|
</head>
|
||||||
<body className="font-persian bg-gray-900 text-white">
|
<body className="font-persian bg-gray-900 text-white">
|
||||||
<AuthProvider>
|
<AuthProvider>
|
||||||
<GlobalRouteGuard>{children}</GlobalRouteGuard>
|
<GlobalRouteGuard>{children}</GlobalRouteGuard>
|
||||||
<Toaster
|
<Toaster
|
||||||
position="top-center"
|
position="top-center"
|
||||||
reverseOrder={false}
|
reverseOrder={false}
|
||||||
gutter={8}
|
gutter={8}
|
||||||
containerClassName=""
|
containerClassName=""
|
||||||
containerStyle={{}}
|
containerStyle={{}}
|
||||||
toastOptions={{
|
toastOptions={{
|
||||||
// Define default options
|
// Define default options
|
||||||
className: "",
|
className: "",
|
||||||
|
duration: 4000,
|
||||||
|
style: {
|
||||||
|
background: "rgba(31, 41, 55, 0.95)",
|
||||||
|
color: "#fff",
|
||||||
|
fontFamily:
|
||||||
|
"Vazirmatn, Inter, ui-sans-serif, system-ui, sans-serif",
|
||||||
|
direction: "rtl",
|
||||||
|
textAlign: "right",
|
||||||
|
border: "1px solid rgba(16, 185, 129, 0.3)",
|
||||||
|
},
|
||||||
|
// Default options for specific types
|
||||||
|
success: {
|
||||||
|
duration: 3000,
|
||||||
|
style: {
|
||||||
|
background: "rgba(16, 185, 129, 0.9)",
|
||||||
|
color: "#fff",
|
||||||
|
},
|
||||||
|
iconTheme: {
|
||||||
|
primary: "#fff",
|
||||||
|
secondary: "#10b981",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
error: {
|
||||||
duration: 4000,
|
duration: 4000,
|
||||||
style: {
|
style: {
|
||||||
background: "rgba(31, 41, 55, 0.95)",
|
background: "rgba(239, 68, 68, 0.9)",
|
||||||
color: "#fff",
|
color: "#fff",
|
||||||
fontFamily:
|
|
||||||
"Vazirmatn, Inter, ui-sans-serif, system-ui, sans-serif",
|
|
||||||
direction: "rtl",
|
|
||||||
textAlign: "right",
|
|
||||||
border: "1px solid rgba(16, 185, 129, 0.3)",
|
|
||||||
},
|
},
|
||||||
// Default options for specific types
|
iconTheme: {
|
||||||
success: {
|
primary: "#fff",
|
||||||
duration: 3000,
|
secondary: "#ef4444",
|
||||||
style: {
|
|
||||||
background: "rgba(16, 185, 129, 0.9)",
|
|
||||||
color: "#fff",
|
|
||||||
},
|
|
||||||
iconTheme: {
|
|
||||||
primary: "#fff",
|
|
||||||
secondary: "#10b981",
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
error: {
|
},
|
||||||
duration: 4000,
|
}}
|
||||||
style: {
|
/>
|
||||||
background: "rgba(239, 68, 68, 0.9)",
|
|
||||||
color: "#fff",
|
|
||||||
},
|
|
||||||
iconTheme: {
|
|
||||||
primary: "#fff",
|
|
||||||
secondary: "#ef4444",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
}}
|
|
||||||
/>
|
|
||||||
</AuthProvider>
|
</AuthProvider>
|
||||||
<ScrollRestoration />
|
<ScrollRestoration />
|
||||||
<Scripts />
|
<Scripts />
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user