From c31eba3c19a7a5f544c97a9ae560284a27633233 Mon Sep 17 00:00:00 2001 From: mahmoodsht <106068383+mahmoodsht@users.noreply.github.com> Date: Fri, 17 Oct 2025 17:19:54 +0330 Subject: [PATCH] =?UTF-8?q?=D8=AA=D9=88=D8=B3=D8=B9=D9=87=20=D9=86=D9=88?= =?UTF-8?q?=D8=A2=D9=88=D8=B1=DB=8C=20=D8=AF=D8=B1=20=D9=81=D8=B1=D8=A2?= =?UTF-8?q?=DB=8C=D9=86=D8=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../process-innovation-page.tsx | 23 +++++++++++++++++++ .../product-innovation-page.tsx | 4 +--- 2 files changed, 24 insertions(+), 3 deletions(-) diff --git a/app/components/dashboard/project-management/process-innovation-page.tsx b/app/components/dashboard/project-management/process-innovation-page.tsx index 9823087..65d73d5 100644 --- a/app/components/dashboard/project-management/process-innovation-page.tsx +++ b/app/components/dashboard/project-management/process-innovation-page.tsx @@ -67,9 +67,11 @@ interface ProjectStats { percent_reduction_value_currency: string; percent_sum_stopping_production: string; percent_throat_removal: string; + percent_operating_cost_before_innovation: string; sum_reducing_breakdowns: number; sum_reduction_value_currency: number; sum_stopping_production: number; + sum_operating_cost_reduction: number; } interface SortConfig { @@ -94,9 +96,11 @@ interface InnovationStats { currencyReductionSum: number; // مجموع کاهش ارز بری (میلیون ریال) frequentFailuresReductionSum: number; // مجموع کاهش خرابی های پرتکرار percentProductionStops: number | string; // درصد مقایسه‌ای جلوگیری از توقفات تولید + reductionCostOprationSum: number; // مجموع کاهش هزینه عملیاتی percentBottleneckRemoval: number | string; // درصد مقایسه‌ای رفع گلوگاه percentCurrencyReduction: number | string; // درصد مقایسه‌ای کاهش ارز بری percentFailuresReduction: number | string; // درصد مقایسه‌ای کاهش خرابی‌های پرتکرار + percentOperatingCostBeforeInnovation: number | string; // درصد مقایسه‌ای کاهش هزینه عملیاتی } const columns = [ @@ -132,6 +136,7 @@ export function ProcessInnovationPage() { totalProjects: 0, averageScore: 0, productionStopsPreventionSum: 0, + reductionCostOprationSum: 0, bottleneckRemovalCount: 0, currencyReductionSum: 0, frequentFailuresReductionSum: 0, @@ -139,6 +144,7 @@ export function ProcessInnovationPage() { percentBottleneckRemoval: 0, percentCurrencyReduction: 0, percentFailuresReduction: 0, + percentOperatingCostBeforeInnovation: 0, }); const [sortConfig, setSortConfig] = useState({ field: "start_date", @@ -181,6 +187,16 @@ export function ProcessInnovationPage() { icon: DollarSign, color: "text-pr-green", }, + currencyreduction1: { + id: "currencyreduction1", + title: "کاهش هزینه عملیاتی", + value: formatNumber( + stats.reductionCostOprationSum.toFixed?.(0) ?? stats.reductionCostOprationSum + ), + description: "میلیون ریال یافته", + icon: DollarSign, + color: "text-pr-green", + }, frequentfailuresreduction: { id: "frequentfailuresreduction", title: "کاهش خرابی های پرتکرار", @@ -468,10 +484,12 @@ export function ProcessInnovationPage() { totalProjects: parseNum(stats?.count_innovation_process_projects), averageScore: parseFloat(data[0].average_project_score), productionStopsPreventionSum: parseNum(stats?.sum_stopping_production), + reductionCostOprationSum: parseNum(stats?.sum_operating_cost_reduction), bottleneckRemovalCount: parseNum(stats?.count_throat_removal), currencyReductionSum: parseNum(stats?.sum_reduction_value_currency), frequentFailuresReductionSum: parseNum(stats?.sum_reducing_breakdowns), percentProductionStops: stats?.percent_sum_stopping_production, + percentOperatingCostBeforeInnovation: stats?.percent_operating_cost_before_innovation, percentBottleneckRemoval: stats?.percent_throat_removal, percentCurrencyReduction: stats?.percent_reduction_value_currency, percentFailuresReduction: stats?.percent_reducing_breakdowns, @@ -716,6 +734,11 @@ export function ProcessInnovationPage() { value: Number(stats.percentCurrencyReduction) || 0, labelColor: "text-white", }, + { + label: "کاهش هزینه عملیاتی", + value: Number(stats.percentOperatingCostBeforeInnovation) || 0, + labelColor: "text-white", + }, { label: "کاهش خرابی پر تکرار", value: Number(stats.percentFailuresReduction) || 0, diff --git a/app/components/dashboard/project-management/product-innovation-page.tsx b/app/components/dashboard/project-management/product-innovation-page.tsx index 9d2097b..e621af8 100644 --- a/app/components/dashboard/project-management/product-innovation-page.tsx +++ b/app/components/dashboard/project-management/product-innovation-page.tsx @@ -285,9 +285,7 @@ export function ProductInnovationPage() { // Fetch popup stats const statsResponse = await apiService.call({ innovation_product_popup_function1: { - project_id: project.project_id, - start_date: startDate || null, - end_date: endDate || null, + project_id: project.project_id }, });