diff --git a/app/components/dashboard/project-management/green-innovation-page.tsx b/app/components/dashboard/project-management/green-innovation-page.tsx index 93b3a56..fc9c47a 100644 --- a/app/components/dashboard/project-management/green-innovation-page.tsx +++ b/app/components/dashboard/project-management/green-innovation-page.tsx @@ -100,6 +100,7 @@ interface InnovationStats { water_recovery_reduction_percent: number; average_project_score: number; count_innovation_green_projects: number; + standard_regulations: string } interface Params { @@ -173,6 +174,7 @@ export function GreenInnovationPage() { const [selectedProjects, setSelectedProjects] = useState>( new Set() ); + const [standartRegulation, setStandardRegulation] = useState>([]) const [detailsDialogOpen, setDetailsDialogOpen] = useState(false); const [selectedProjectDetails, setSelectedProjectDetails] = useState(null); @@ -469,7 +471,6 @@ export function GreenInnovationPage() { payload?.innovation_green_function ); const stats = data[0]; - const normalized: any = { food: { value: formatNumber(parseNum(stats?.feed_recovery_reduction)), @@ -502,7 +503,9 @@ export function GreenInnovationPage() { }, avarage: stats.average_project_score, countInnovationGreenProjects: stats.count_innovation_green_projects, + standardRegulation: stats.standard_regulations.replace('\r', '').split('\n') }; + setStandardRegulation(normalized.standardRegulation) setActualTotalCount(normalized.countInnovationGreenProjects); setTblAvarage(normalized.avarage); setPageData(normalized); @@ -906,21 +909,22 @@ export function GreenInnovationPage() { -
+
{statsLoading ? Array.from({ length: 10 }).map((_, index) => ( -
+
)) - : Array.from({ length: 4 }).map((_, index) => ( -
+ : standartRegulation.map((item, index) => ( +
- استاندارد Iso 2005 + {item}
))}
diff --git a/app/components/dashboard/project-management/innovation-built-inside-page.tsx b/app/components/dashboard/project-management/innovation-built-inside-page.tsx index 13c5ac7..b8a3bbf 100644 --- a/app/components/dashboard/project-management/innovation-built-inside-page.tsx +++ b/app/components/dashboard/project-management/innovation-built-inside-page.tsx @@ -190,37 +190,7 @@ export function InnovationBuiltInsidePage() { const [innovationMetric, setInnovationMetric] = useState({ }) - // const [recycleParams, setRecycleParams] = useState({ - // water: { - // icon: , - // label: "آب", - // value: 0, - // suffix: "لیتر", - // percent: 0, - // }, - // food: { - // icon: , - // label: "خوراک", - // value: 0, - // suffix: "تن", - // percent: 0, - // }, - // power: { - // icon: , - // label: "برق", - // value: 0, - // suffix: "میلیون مگاوات", - // percent: 0, - // }, - // oil: { - // icon: , - // label: "سوخت", - // value: 0, - // suffix: "متر مربع", - // percent: 0, - // }, - // }); const [sustainabilityStats, setSustainabilityStats] = useState({ currencySaving: { id: "reduce-pollution", @@ -762,57 +732,98 @@ export function InnovationBuiltInsidePage() { ))} - - -
-
-

- بر طرف کردن گلوگاه -

- -
-
- { - Object.entries(bottleNeck).map(([key, value]) => { - return
+ + { + loading ?
+
+
+
+
+
+
+
+ {[1, 2, 3].map((i) => ( +
- - {value.value} - - { - value.unit && - {value.unit} - - } - +
+
-
- {value.label} -
- - - { - value.description && value.description - } - - - {value.increasePercent} - -
+
+
+
- }) - } + ))} +
- - - - - تعداد فناوری سطح بالا - {countOfHighTech} - - +
: + +
+
+

+ بر طرف کردن گلوگاه +

+ +
+
+ { + Object.entries(bottleNeck).map(([key, value]) => { + return
+
+ + {value.value} + + { + value.unit && + {value.unit} + + } + +
+
+ {value.label} +
+ + + { + value.description && value.description + } + + + {value.increasePercent} + +
+
+
+ }) + } +
+
+
+
+ } + + + + { + loading ?
+
+
+
+
+
: + + تعداد فناوری سطح بالا + {countOfHighTech} + + + } + +