fix the conflicts

This commit is contained in:
Saeed AB 2025-10-05 11:40:51 +03:30
commit ef97d8f9b6
3 changed files with 51 additions and 34 deletions

View File

@ -212,7 +212,7 @@ export function DigitalInnovationPage() {
value: formatNumber(stats.reduceCosts.toFixed?.(1) ?? stats.reduceCosts), value: formatNumber(stats.reduceCosts.toFixed?.(1) ?? stats.reduceCosts),
description: "میلیون ریال کاهش یافته", description: "میلیون ریال کاهش یافته",
icon: <TrendingDown />, icon: <TrendingDown />,
color: "text-emerald-400", color: "text-pr-green",
}, },
{ {
id: "bottleneck-removal", id: "bottleneck-removal",
@ -220,7 +220,7 @@ export function DigitalInnovationPage() {
value: formatNumber(stats.increasedRevenue), value: formatNumber(stats.increasedRevenue),
description: "میلیون ریال افزایش یافته", description: "میلیون ریال افزایش یافته",
icon: <TrendingUp />, icon: <TrendingUp />,
color: "text-emerald-400", color: "text-pr-green",
}, },
{ {
@ -231,7 +231,7 @@ export function DigitalInnovationPage() {
), ),
description: "هزار تن صرفه جوریی شده", description: "هزار تن صرفه جوریی شده",
icon: <Database />, icon: <Database />,
color: "text-emerald-400", color: "text-pr-green",
}, },
{ {
id: "frequent-failures-reduction", id: "frequent-failures-reduction",
@ -242,7 +242,7 @@ export function DigitalInnovationPage() {
), ),
description: "مگاوات کاهش یافته", description: "مگاوات کاهش یافته",
icon: <Zap />, icon: <Zap />,
color: "text-emerald-400", color: "text-pr-green",
}, },
]; ];
@ -599,14 +599,18 @@ export function DigitalInnovationPage() {
variant="ghost" variant="ghost"
size="sm" size="sm"
onClick={() => handleProjectDetails(item)} onClick={() => handleProjectDetails(item)}
<<<<<<< HEAD
className="text-pr-green underline-offset-4 underline font-normal p-2 h-auto" className="text-pr-green underline-offset-4 underline font-normal p-2 h-auto"
=======
className="text-pr-green hover:text-pr-green underline-offset-4 underline font-normal hover:bg-emerald-500/20 p-2 h-auto"
>>>>>>> a14faab82da07fc3009ec8503f8bf6b143633a4c
> >
جزئیات بیشتر جزئیات بیشتر
</Button> </Button>
); );
case "amount_currency_reduction": case "amount_currency_reduction":
return ( return (
<span className="font-medium text-emerald-400"> <span className="font-medium text-pr-green">
{formatCurrency(String(value))} {formatCurrency(String(value))}
</span> </span>
); );
@ -617,7 +621,9 @@ export function DigitalInnovationPage() {
</Badge> </Badge>
); );
case "title": case "title":
return <span className="font-medium text-white">{String(value)}</span>; return (
<span className="font-light text-sm text-white">{String(value)}</span>
);
case "project_status": case "project_status":
return ( return (
<div className="flex items-center gap-1"> <div className="flex items-center gap-1">
@ -652,7 +658,7 @@ export function DigitalInnovationPage() {
return ( return (
<DashboardLayout title="نوآوری دیجیتال"> <DashboardLayout title="نوآوری دیجیتال">
<div className="space-y-4 grid justify-between gap-8 pl-6 sm:grid-cols-1 xl:grid-cols-[40%_60%]"> <div className="space-y-4 grid justify-between gap-7 pl-6 sm:grid-cols-1 xl:grid-cols-[40%_60%]">
{/* Stats Cards */} {/* Stats Cards */}
<div className="flex flex-col gap-6 w-full mb-0"> <div className="flex flex-col gap-6 w-full mb-0">
<div className="space-y-6 w-full"> <div className="space-y-6 w-full">
@ -725,7 +731,7 @@ export function DigitalInnovationPage() {
</div> </div>
{/* Process Impacts Chart */} {/* Process Impacts Chart */}
<Card className="bg-[linear-gradient(to_bottom_left,#464861,50%,#111628)] backdrop-blur-sm rounded-lg w-full overflow-hidden h-full "> <Card className="bg-[linear-gradient(to_bottom_left,#464861,50%,#111628)] backdrop-blur-sm rounded-lg w-full overflow-hidden h-[18rem]">
{/* <CardContent > */} {/* <CardContent > */}
<CustomBarChart <CustomBarChart
title="تاثیرات نوآوری دیجیتال به صورت درصد مقایسه ای" title="تاثیرات نوآوری دیجیتال به صورت درصد مقایسه ای"
@ -735,25 +741,25 @@ export function DigitalInnovationPage() {
{ {
label: DigitalCardLabel.decreasCost, label: DigitalCardLabel.decreasCost,
value: stats.reduceCostsPercent || 0, value: stats.reduceCostsPercent || 0,
color: "bg-emerald-400", color: "bg-pr-green",
labelColor: "text-white", labelColor: "text-white",
}, },
{ {
label: DigitalCardLabel.increaseRevenue, label: DigitalCardLabel.increaseRevenue,
value: stats.increasedRevenuePercent || 0, value: stats.increasedRevenuePercent || 0,
color: "bg-emerald-400", color: "bg-pr-green",
labelColor: "text-white", labelColor: "text-white",
}, },
{ {
label: DigitalCardLabel.performance, label: DigitalCardLabel.performance,
value: stats.resourceProductivityPercent || 0, value: stats.resourceProductivityPercent || 0,
color: "bg-emerald-400", color: "bg-pr-green",
labelColor: "text-white", labelColor: "text-white",
}, },
{ {
label: DigitalCardLabel.decreaseEnergy, label: DigitalCardLabel.decreaseEnergy,
value: stats.reduceEnergyConsumptionPercent || 0, value: stats.reduceEnergyConsumptionPercent || 0,
color: "bg-emerald-400", color: "bg-pr-green",
labelColor: "text-white", labelColor: "text-white",
}, },
]} ]}
@ -765,10 +771,10 @@ export function DigitalInnovationPage() {
</div> </div>
{/* Data Table */} {/* Data Table */}
<Card className="bg-transparent backdrop-blur-sm rounded-lg overflow-hidden w-full h-[39.7rem]"> <Card className="bg-transparent backdrop-blur-sm rounded-lg overflow-hidden w-full h-max">
<CardContent className="p-0"> <CardContent className="p-0">
<div className="relative h-full"> <div className="relative h-full">
<Table containerClassName="overflow-auto custom-scrollbar w-full h-[36.8rem] "> <Table containerClassName="overflow-auto custom-scrollbar w-full h-[calc(100vh-160px)] ">
<TableHeader> <TableHeader>
<TableRow className="bg-[#3F415A]"> <TableRow className="bg-[#3F415A]">
{columns.map((column) => ( {columns.map((column) => (

View File

@ -602,14 +602,18 @@ export function GreenInnovationPage() {
variant="ghost" variant="ghost"
size="sm" size="sm"
onClick={() => handleProjectDetails(item)} onClick={() => handleProjectDetails(item)}
<<<<<<< HEAD
className="text-pr-green underline-offset-4 underline font-normal p-2 h-auto" className="text-pr-green underline-offset-4 underline font-normal p-2 h-auto"
=======
className="text-pr-green hover:text-pr-green underline-offset-4 underline font-normal hover:bg-emerald-500/20 p-2 h-auto"
>>>>>>> a14faab82da07fc3009ec8503f8bf6b143633a4c
> >
جزئیات بیشتر جزئیات بیشتر
</Button> </Button>
); );
case "amount_currency_reduction": case "amount_currency_reduction":
return ( return (
<span className="font-medium text-emerald-400"> <span className="font-medium text-pr-green">
{formatCurrency(String(value))} {formatCurrency(String(value))}
</span> </span>
); );
@ -620,7 +624,9 @@ export function GreenInnovationPage() {
</Badge> </Badge>
); );
case "title": case "title":
return <span className="font-medium text-white">{String(value)}</span>; return (
<span className="font-light text-sm text-white">{String(value)}</span>
);
case "project_status": case "project_status":
return ( return (
<div className="flex items-center gap-1"> <div className="flex items-center gap-1">
@ -733,7 +739,7 @@ export function GreenInnovationPage() {
</div> </div>
<div className="flex items-center justify-between p-6 flex-row-reverse"> <div className="flex items-center justify-between p-6 flex-row-reverse">
<div className="flex flex-col"> <div className="flex flex-col">
<span className="text-3xl font-bold text-emerald-400 mb-1 font-persian"> <span className="text-3xl font-bold text-pr-green mb-1 font-persian">
% {value.percent?.value} % {value.percent?.value}
</span> </span>
<span className="text-sm text-gray-400 font-persian"> <span className="text-sm text-gray-400 font-persian">
@ -742,7 +748,7 @@ export function GreenInnovationPage() {
</div> </div>
<b className="block w-0.5 h-8 bg-gray-600 rotate-45" /> <b className="block w-0.5 h-8 bg-gray-600 rotate-45" />
<div className="flex flex-col"> <div className="flex flex-col">
<span className="text-3xl font-bold text-emerald-400 mb-1 font-persian"> <span className="text-3xl font-bold text-pr-green mb-1 font-persian">
{value.total?.value} {value.total?.value}
</span> </span>
<span className="text-sm text-gray-400 font-persian"> <span className="text-sm text-gray-400 font-persian">
@ -1113,7 +1119,7 @@ export function GreenInnovationPage() {
شرح پروژه شرح پروژه
</DialogTitle> </DialogTitle>
</DialogHeader> </DialogHeader>
<div className="space-y-4 flex justify-between text-right px-6"> <div className="space-y-4 flex justify-between text-right p-6">
{/* Project Description */} {/* Project Description */}
<div className="flex-[4] border-l-2 border-gray-600"> <div className="flex-[4] border-l-2 border-gray-600">
<h2 className="font-bold">{selectedProjectDetails?.title}</h2> <h2 className="font-bold">{selectedProjectDetails?.title}</h2>

View File

@ -152,8 +152,8 @@ enum projectStatus {
const columns = [ const columns = [
{ key: "select", label: "", sortable: false, width: "50px" }, { key: "select", label: "", sortable: false, width: "50px" },
{ key: "project_no", label: "شماره پروژه", sortable: true, width: "140px" }, { key: "project_no", label: "شماره پروژه", sortable: true, width: "120px" },
{ key: "title", label: "عنوان پروژه", sortable: true, width: "400px" }, { key: "title", label: "عنوان پروژه", sortable: true, width: "300px" },
{ {
key: "project_status", key: "project_status",
label: "وضعیت پروژه", label: "وضعیت پروژه",
@ -164,7 +164,7 @@ const columns = [
key: "project_rating", key: "project_rating",
label: "امتیاز پروژه", label: "امتیاز پروژه",
sortable: true, sortable: true,
width: "140px", width: "120px",
}, },
{ key: "details", label: "جزئیات پروژه", sortable: false, width: "140px" }, { key: "details", label: "جزئیات پروژه", sortable: false, width: "140px" },
]; ];
@ -624,14 +624,18 @@ export function InnovationBuiltInsidePage() {
variant="ghost" variant="ghost"
size="sm" size="sm"
onClick={() => handleProjectDetails(item)} onClick={() => handleProjectDetails(item)}
<<<<<<< HEAD
className="text-pr-green underline-offset-4 underline font-normal p-2 h-auto" className="text-pr-green underline-offset-4 underline font-normal p-2 h-auto"
=======
className="text-pr-green hover:text-pr-green underline-offset-4 underline font-normal hover:bg-emerald-500/20 p-2 h-auto"
>>>>>>> a14faab82da07fc3009ec8503f8bf6b143633a4c
> >
جزئیات بیشتر جزئیات بیشتر
</Button> </Button>
); );
case "amount_currency_reduction": case "amount_currency_reduction":
return ( return (
<span className="font-medium text-emerald-500"> <span className="font-medium text-pr-green">
{formatCurrency(String(value))} {formatCurrency(String(value))}
</span> </span>
); );
@ -642,7 +646,9 @@ export function InnovationBuiltInsidePage() {
</Badge> </Badge>
); );
case "title": case "title":
return <span className="font-medium text-white">{String(value)}</span>; return (
<span className="font-light text-sm text-white">{String(value)}</span>
);
case "project_status": case "project_status":
return ( return (
<div className="flex items-center gap-1"> <div className="flex items-center gap-1">
@ -701,10 +707,10 @@ export function InnovationBuiltInsidePage() {
return ( return (
<DashboardLayout title="نوآوری ساخت داخل"> <DashboardLayout title="نوآوری ساخت داخل">
<div className="space-y-4 justify-between gap-8 grid pl-3.5 sm:grid-cols-1 xl:grid-cols-[40%_60%]"> <div className="space-y-4 justify-between gap-8 grid pl-3.5 sm:grid-cols-1 xl:grid-cols-[35%_65%]">
{/* Stats Cards */} {/* Stats Cards */}
<div className="flex gap-6 w-full mb-0"> <div className="flex w-full mb-0">
<div className="flex flex-col justify-between w-full gap-6"> <div className="flex flex-col w-full justify-between gap-2">
{statsLoading {statsLoading
? // Loading skeleton for stats cards - matching new design ? // Loading skeleton for stats cards - matching new design
Array.from({ length: 2 }).map((_, index) => ( Array.from({ length: 2 }).map((_, index) => (
@ -748,7 +754,7 @@ export function InnovationBuiltInsidePage() {
</div> </div>
<div className="flex items-center justify-between p-6 flex-row-reverse"> <div className="flex items-center justify-between p-6 flex-row-reverse">
<div className="flex flex-col"> <div className="flex flex-col">
<span className="text-3xl font-bold text-emerald-500 mb-1 font-persian"> <span className="text-3xl font-bold text-pr-green mb-1 font-persian">
% {value.percent?.value} % {value.percent?.value}
</span> </span>
<span className="text-sm text-gray-400 font-persian"> <span className="text-sm text-gray-400 font-persian">
@ -757,7 +763,7 @@ export function InnovationBuiltInsidePage() {
</div> </div>
<b className="block w-0.5 h-8 bg-gray-600 rotate-45" /> <b className="block w-0.5 h-8 bg-gray-600 rotate-45" />
<div className="flex flex-col"> <div className="flex flex-col">
<span className="text-3xl font-bold text-emerald-500 mb-1 font-persian"> <span className="text-3xl font-bold text-pr-green mb-1 font-persian">
{value.total?.value} {value.total?.value}
</span> </span>
<span className="text-sm text-gray-400 font-persian"> <span className="text-sm text-gray-400 font-persian">
@ -867,7 +873,7 @@ export function InnovationBuiltInsidePage() {
<Card className="bg-transparent backdrop-blur-sm rounded-lg overflow-hidden w-full h-max"> <Card className="bg-transparent backdrop-blur-sm rounded-lg overflow-hidden w-full h-max">
<CardContent className="p-0"> <CardContent className="p-0">
<div className="relative "> <div className="relative ">
<Table containerClassName="overflow-auto custom-scrollbar h-[calc(90vh-15px)]"> <Table containerClassName="overflow-auto custom-scrollbar h-[calc(100vh-160px)]">
<TableHeader> <TableHeader>
<TableRow className="bg-[#3F415A]"> <TableRow className="bg-[#3F415A]">
{columns.map((column) => ( {columns.map((column) => (
@ -1030,7 +1036,7 @@ export function InnovationBuiltInsidePage() {
{/* Project Details Dialog */} {/* Project Details Dialog */}
<Dialog open={detailsDialogOpen} onOpenChange={setDetailsDialogOpen}> <Dialog open={detailsDialogOpen} onOpenChange={setDetailsDialogOpen}>
<DialogContent className="bg-[linear-gradient(to_bottom_left,#464861,50%,#111628)] max-w-6xl overflow-y-auto"> <DialogContent className="bg-[linear-gradient(to_bottom_left,#464861,50%,#111628)] max-w-5xl overflow-y-auto">
<DialogHeader> <DialogHeader>
<DialogTitle className="text-white mr-4 border-b-2 border-gray-600 pb-4 font-persian text-right"> <DialogTitle className="text-white mr-4 border-b-2 border-gray-600 pb-4 font-persian text-right">
شرح پروژه شرح پروژه
@ -1092,7 +1098,6 @@ export function InnovationBuiltInsidePage() {
<div className="flex flex-col justify-center items-center"> <div className="flex flex-col justify-center items-center">
<span className="block w-0.5 h-14 bg-white"></span> <span className="block w-0.5 h-14 bg-white"></span>
<span className="text-white border border-white p-1 px-2 text-xs rounded-lg"> <span className="text-white border border-white p-1 px-2 text-xs rounded-lg">
{" "}
سطح تکنولوژی سطح تکنولوژی
</span> </span>
</div> </div>
@ -1256,7 +1261,7 @@ export function InnovationBuiltInsidePage() {
))} ))}
</div> </div>
) : ( ) : (
<ResponsiveContainer width="100%" height={420}> <ResponsiveContainer width="100%" height={400}>
<LineChart <LineChart
data={dialogChartData} data={dialogChartData}
margin={{ top: 20, right: 70, left: 30, bottom: 80 }} margin={{ top: 20, right: 70, left: 30, bottom: 80 }}