diff --git a/app/components/dashboard/dashboard-home.tsx b/app/components/dashboard/dashboard-home.tsx index 2237841..a3074f2 100644 --- a/app/components/dashboard/dashboard-home.tsx +++ b/app/components/dashboard/dashboard-home.tsx @@ -594,8 +594,8 @@ export function DashboardHome() {

تحقق ارزش ها

- - + + شماتیک diff --git a/app/components/dashboard/project-management/mange-ideas-tech-page.tsx b/app/components/dashboard/project-management/mange-ideas-tech-page.tsx index e7dd9d3..e4be03d 100644 --- a/app/components/dashboard/project-management/mange-ideas-tech-page.tsx +++ b/app/components/dashboard/project-management/mange-ideas-tech-page.tsx @@ -932,15 +932,7 @@ export function ManageIdeasTechPage() { {/* Infinite scroll trigger */}
- {loadingMore && ( -
-
- - - -
-
- )} +
@@ -951,10 +943,19 @@ export function ManageIdeasTechPage() { + {loadingMore && ( +
+
+ + + +
+
+ )} {/* Chart Section */} - @@ -756,7 +756,7 @@ export function ProductInnovationPage() { {/* Funnel Chart */} - + ({ strategic_theme: item.strategic_theme || item.value_technology_and_innovation || "N/A", - operational_fee_sum: Math.max(0, Number(item.operational_fee_sum)), + operational_fee_count: Math.max(0, Number(item.operational_fee_count)), })) .filter((item: StrategicAlignmentData) => item.strategic_theme !== ""); const total = processedData.reduce( (acc: number, item: StrategicAlignmentData) => - acc + item.operational_fee_sum, + acc + item.operational_fee_count, 0 ); @@ -247,7 +247,7 @@ export function StrategicAlignmentPopup({ (item: StrategicAlignmentData) => ({ ...item, percentage: - total > 0 ? Math.round((item.operational_fee_sum / total) * 100) : 0, + total > 0 ? Math.round((item.operational_fee_count / total) * 100) : 0, }) ); setData(dataWithPercentage || []); diff --git a/app/components/ecosystem/network-graph.tsx b/app/components/ecosystem/network-graph.tsx index 15b7e44..6cf0d9e 100644 --- a/app/components/ecosystem/network-graph.tsx +++ b/app/components/ecosystem/network-graph.tsx @@ -305,8 +305,8 @@ export function NetworkGraph({ onNodeClick, onLoadingChange }: NetworkGraphProps .enter() .append("g") .attr("class", "node") - .style("cursor", "pointer"); - + .style("cursor", d => d.stageid === -1 ? "default" : "pointer"); + const drag = d3 .drag() .on("start", (event, d) => { @@ -437,9 +437,12 @@ export function NetworkGraph({ onNodeClick, onLoadingChange }: NetworkGraphProps .attr("stroke-width", 3); }); + nodeGroup.on("click", async function (event, d) { event.stopPropagation(); - if (d.isCenter) return; + + // جلوگیری از کلیک روی مرکز و دسته‌بندی‌ها + if (d.isCenter || d.stageid === -1) return; if (onNodeClick && d.stageid) { // Open dialog immediately with basic info diff --git a/app/components/ui/funnel-chart.tsx b/app/components/ui/funnel-chart.tsx index 2327755..f94ce37 100644 --- a/app/components/ui/funnel-chart.tsx +++ b/app/components/ui/funnel-chart.tsx @@ -13,6 +13,7 @@ interface FunnelChartProps { title?: string; className?: string; } +const greenColors = ["#3C9F71","#3BC47A","#3BC47A","#3BD77E","#3AEA83"] export function FunnelChart({ data, title, className = "" }: FunnelChartProps) { const maxValue = Math.max(...data.map(d => d.value)); @@ -20,7 +21,7 @@ export function FunnelChart({ data, title, className = "" }: FunnelChartProps) { if (!maxValue || maxValue <= 0) return 0; return Math.round((value / maxValue) * 100); }; - + return (
{title && ( @@ -28,7 +29,7 @@ export function FunnelChart({ data, title, className = "" }: FunnelChartProps) { {title} )} - +
{/* Start Process Line */}
@@ -47,18 +48,18 @@ export function FunnelChart({ data, title, className = "" }: FunnelChartProps) { {data.map((item, index) => { const widthPercentage = toPercent(item.value); const barWidth = Math.max(20, widthPercentage); // Minimum 20% width - + return (
-
+
{item.label}
-
+
{item.value.toLocaleString('fa-IR')} diff --git a/app/components/ui/metric-card.tsx b/app/components/ui/metric-card.tsx index ae0e47e..8f44c24 100644 --- a/app/components/ui/metric-card.tsx +++ b/app/components/ui/metric-card.tsx @@ -45,4 +45,4 @@ export function MetricCard({
); -} \ No newline at end of file +} diff --git a/app/components/ui/progress.tsx b/app/components/ui/progress.tsx index 8fdf955..9a82b53 100644 --- a/app/components/ui/progress.tsx +++ b/app/components/ui/progress.tsx @@ -19,7 +19,7 @@ const Progress = React.forwardRef< {formatNumber(Math.ceil(value || 0 * 10) / 10)}% diff --git a/app/components/ui/tabs.tsx b/app/components/ui/tabs.tsx index e9354c2..28e662a 100644 --- a/app/components/ui/tabs.tsx +++ b/app/components/ui/tabs.tsx @@ -81,7 +81,7 @@ export function TabsTrigger({ className={cn( "inline-flex items-center justify-center whitespace-nowrap rounded-sm px-3 py-1.5 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50", isActive - ? "bg-gray-700 text-foreground shadow-sm" + ? "bg-pr-gray text-foreground shadow-sm" : "hover:bg-muted/50", className, )}