From d451cc438a2c05efa97b28e451c877b1da6888ff Mon Sep 17 00:00:00 2001 From: Saeed Abadiyan Date: Mon, 6 Oct 2025 06:51:09 +0330 Subject: [PATCH 1/3] hotfix: in product-innovation --- .../project-management/product-innovation-page.tsx | 12 ++++++------ app/components/ui/metric-card.tsx | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/app/components/dashboard/project-management/product-innovation-page.tsx b/app/components/dashboard/project-management/product-innovation-page.tsx index bef1a1f..a03d974 100644 --- a/app/components/dashboard/project-management/product-innovation-page.tsx +++ b/app/components/dashboard/project-management/product-innovation-page.tsx @@ -237,11 +237,11 @@ export function ProductInnovationPage() { revenueNewProducts: { id: "revenueNewProducts", title: "سهم از درآمد برای محصولات جدید", - value: "0", + value: 0, description: "میلیون ریال", descriptionPercent: "درصد به کل درآمد", color: "text-[#3AEA83]", - percent : "0" + percent :0 }, newProductExports: { id: "newProductExports", @@ -466,8 +466,8 @@ export function ProductInnovationPage() { ...prev, revenueNewProducts: { ...prev.revenueNewProducts, - value: formatNumber(normalized?.new_products_revenue_share), - percent: formatNumber(normalized?.new_products_revenue_share_percent), + value: normalized.new_products_revenue_share, + percent: normalized.new_products_revenue_share_percent, }, impactOnImports: { ...prev.impactOnImports, @@ -716,8 +716,8 @@ export function ProductInnovationPage() {
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 +} From efb1990a5546169ce07e8202cdae1f83c350a438 Mon Sep 17 00:00:00 2001 From: mahmoodsht <106068383+mahmoodsht@users.noreply.github.com> Date: Mon, 6 Oct 2025 10:49:00 +0330 Subject: [PATCH 2/3] =?UTF-8?q?=D8=AC=D8=B2=DB=8C=DB=8C=D8=A7=D8=AA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dashboard/strategic-alignment-popup.tsx | 12 ++++++------ app/components/ecosystem/network-graph.tsx | 9 ++++++--- 2 files changed, 12 insertions(+), 9 deletions(-) diff --git a/app/components/dashboard/strategic-alignment-popup.tsx b/app/components/dashboard/strategic-alignment-popup.tsx index ad39e81..d430dc3 100644 --- a/app/components/dashboard/strategic-alignment-popup.tsx +++ b/app/components/dashboard/strategic-alignment-popup.tsx @@ -24,7 +24,7 @@ import { TruncatedText } from "../ui/truncatedText"; interface StrategicAlignmentData { strategic_theme: string; - operational_fee_sum: number; + operational_fee_count: number; percentage?: number; } @@ -138,7 +138,7 @@ export function StrategicAlignmentPopup({ ProcessName: "project", OutputFields: [ "strategic_theme", - "sum(operational_fee) as operational_fee_sum", + "count(operational_fee)", ], GroupBy: ["strategic_theme"], }); @@ -168,7 +168,7 @@ export function StrategicAlignmentPopup({ ProcessName: "project", OutputFields: [ "value_technology_and_innovation", - "sum(operational_fee)", + "count(operational_fee)", ], Conditions: [["strategic_theme", "=", item]], GroupBy: ["value_technology_and_innovation"], @@ -233,13 +233,13 @@ export function StrategicAlignmentPopup({ .map((item: any) => ({ 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 From 275e49f678b6f775524f2c1a9426de4b2eb69cd6 Mon Sep 17 00:00:00 2001 From: Saeed Abadiyan Date: Wed, 8 Oct 2025 17:21:33 +0330 Subject: [PATCH 3/3] fix: the styles,and components --- app/components/dashboard/dashboard-home.tsx | 4 ++-- .../mange-ideas-tech-page.tsx | 21 ++++++++++--------- .../product-innovation-page.tsx | 2 +- app/components/ui/funnel-chart.tsx | 13 ++++++------ app/components/ui/progress.tsx | 2 +- app/components/ui/tabs.tsx | 2 +- 6 files changed, 23 insertions(+), 21 deletions(-) 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 */} - {/* Funnel Chart */} - + 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/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, )}