diff --git a/app/components/dashboard/project-management/green-innovation-page.tsx b/app/components/dashboard/project-management/green-innovation-page.tsx index 150fb92..78e2891 100644 --- a/app/components/dashboard/project-management/green-innovation-page.tsx +++ b/app/components/dashboard/project-management/green-innovation-page.tsx @@ -21,19 +21,34 @@ import { DialogTitle, } from "~/components/ui/dialog"; import { - ChevronUp, - ChevronDown, - RefreshCw, - ExternalLink, - Building2, - PickaxeIcon, - UserIcon, - UsersIcon, -} from "lucide-react"; + BarChart, + Bar, + XAxis, + YAxis, + CartesianGrid, + Tooltip, + ResponsiveContainer, + LineChart, + Line, + Rectangle, + Legend, +} from "recharts"; + import apiService from "~/lib/api"; import toast from "react-hot-toast"; -import { Funnel, Wrench, CirclePause, DollarSign } from "lucide-react"; -import ProjectDetail from "../projects/project-detail"; +import { + LoaderCircle, + TrendingUp, + Key, + Sparkle, + Zap, + Flame, + Building2, + PickaxeIcon, + UsersIcon, + UserIcon, + RefreshCw, +} from "lucide-react"; import DashboardLayout from "../layout"; moment.loadPersian({ usePersianDigits: true }); @@ -80,6 +95,19 @@ interface InnovationStats { percentFailuresReduction: number; // درصد مقایسه‌ای کاهش خرابی‌های پرتکرار } +interface Params { + icon: any; + label: string; + value: string; + suffix: string; +} +interface RecycleParams { + water: Params; + food: Params; + power: Params; + oil: Params; +} + const columns = [ { key: "select", label: "", sortable: false, width: "50px" }, { key: "project_no", label: "شماره پروژه", sortable: true, width: "140px" }, @@ -131,6 +159,32 @@ export function GreenInnovationPage() { const [detailsDialogOpen, setDetailsDialogOpen] = useState(false); const [selectedProjectDetails, setSelectedProjectDetails] = useState(null); + const [recycleParams, setRecycleParams] = useState({ + water: { + icon: , + label: "آب", + value: "1,520", + suffix: "لیتر", + }, + food: { + icon: , + label: "خوراک", + value: "520", + suffix: "تن", + }, + oil: { + icon: , + label: "سوخت", + value: "250", + suffix: "متر مربع", + }, + power: { + icon: , + label: "برق", + value: "650", + suffix: "میلیون مگاوات", + }, + }); const observerRef = useRef(null); const fetchingRef = useRef(false); @@ -579,109 +633,204 @@ export function GreenInnovationPage() { } }; + const data = [ + { name: recycleParams.water.label, pv: 70, amt: 80 }, + { name: recycleParams.power.label, pv: 45, amt: 60 }, + { name: recycleParams.oil.label, pv: 90, amt: 75 }, + { name: recycleParams.food.label, pv: 30, amt: 50 }, + ]; + return (
{/* Stats Cards */} -
-
+
+
{/* Stats Grid */} -
- {loading || statsLoading - ? // Loading skeleton for stats cards - matching new design - Array.from({ length: 2 }).map((_, index) => ( - - -
-
-
-
-
-
-
-
-
-
+ {loading || statsLoading + ? // Loading skeleton for stats cards - matching new design + Array.from({ length: 2 }).map((_, index) => ( + + +
+
+
+
+
- - - )) - : statsCards.map((card) => ( - - -
-
-

- {card.title} -

+
+
+
+
+
+ + + )) + : statsCards.map((card) => ( + + +
+
+

+ {card.title} +

+
+
+
+ + % {card.percent.value} + + + {card.percent.description} +
-
- + +
+ {card.total.value} - - - {card.percent.value} + + {card.total.description}
- - - ))} -
+
+
+
+ ))}
{/* Process Impacts Chart */} - - + +
+
+ بازیافت و بازیابی منابع +
+
+
+
+ {Object.entries(recycleParams).map((el, index) => { + return ( +
+
+ {el[1].icon} + + {el[1].label}: + +
+
+ + {el[1].value} + + {el[1].suffix} +
+
+ ); + })} +
+ +
+
+ + + + + `${val}%`} + /> + + + +
+
+
+
+
+ + + +
+
+ استاندارد ها و مقررات + +
+
+
+ {Array.from({ length: 10 }, (index) => { + return ( +
+ + استاندارد Iso 2005 +
+ ); + })} +