diff --git a/app/components/auth/login-form.tsx b/app/components/auth/login-form.tsx index 2b177d8..fd79ad5 100644 --- a/app/components/auth/login-form.tsx +++ b/app/components/auth/login-form.tsx @@ -212,8 +212,8 @@ export function LoginForm({ onSuccess }: LoginFormProps) { {/* Right Side - Branding */}
-
- Brand Logo { - e.target.style.display = 'none'; - console.log('Image failed to load'); - }} - /> -
+
+ Brand Logo { + e.target.style.display = 'none'; + console.log('Image failed to load'); + }} + /> +
+
diff --git a/app/components/dashboard/d3-image-info.tsx b/app/components/dashboard/d3-image-info.tsx index 572ae7a..f5e81b4 100644 --- a/app/components/dashboard/d3-image-info.tsx +++ b/app/components/dashboard/d3-image-info.tsx @@ -1,6 +1,5 @@ //این فایل مخصوص -//شماتیک آپادانا - +//شماتیک نوری import React from "react"; import { formatNumber } from "~/lib/utils"; @@ -11,10 +10,10 @@ export type CompanyInfo = { costReduction: number; revenue?: number; capacity?: number; - costI: number; - capacityI: number; - revenueI: number; - cost: number | string; + costI : number, + capacityI : number, + revenueI : number, + cost : number | string, }; export type D3ImageInfoProps = { @@ -23,91 +22,80 @@ export type D3ImageInfoProps = { height?: number; }; -const InfoBox = ({ company, style }: { company: CompanyInfo; style: any }) => { - // const hideCapacity = company.name === "واحد 300"; // اگر واحد 300 بود ظرفیت مخفی شود - const hideCapacity = false; +const InfoBox = ({ company, style }: { company: CompanyInfo; style :any }) => { return ( -
+
-
درآمد:
-
{formatNumber(company?.revenue || 0)}
+
هزینه عملیاتی:
+
{formatNumber(company?.cost || 0)}
میلیون ریال
-
هزینه:
- {hideCapacity ? ( -
{formatNumber(company?.cost || 0)}
- ) : ( -
{formatNumber(company?.cost || 0)}
- )} -
میلیون ریال
+
افزایش ظرفیت:
+
{formatNumber(company?.capacity || 0)}
+
تن در سال
- {!hideCapacity && ( -
-
ظرفیت:
-
{formatNumber(company?.capacity || 0)}
-
تن در سال
-
- )}
); }; export function D3ImageInfo({ companies }: D3ImageInfoProps) { - // واحدهای جدید - 4 واحد const sample = [ - { id: "واحد 100", name: "واحد 100", imageUrl: "/abniro.png" }, - { id: "واحد 200", name: "واحد 200", imageUrl: "/besparan.png" }, - { id: "واحد 300", name: "واحد 300", imageUrl: "/khwarazmi.png" }, - { id: "واحد 400", name: "واحد 400", imageUrl: "/faravash1.png" } + { id: "PX", name: "PX", imageUrl: "/abniro.png" }, + { id: "LLTE&HLTE", name: "LLTE&HLTE", imageUrl: "/besparan.png" }, + { id: "BTX", name: "BTX", imageUrl: "/khwarazmi.png" }, + { id: "Utility", name: "Utility", imageUrl: "/faravash1.png" }, + { id: "Reforming", name: "Reforming", imageUrl: "/faravash2.png" }, + { id: "Storage Tank", name: "Storage Tank", imageUrl: "/kimia.png" } ]; - const merged = sample.map(company => { - const found = companies.find(item => item.id === company.id); + const found = companies.find(item => item.id == company.id); return found ? found - : { ...company, cost: 0, capacity: 0, revenue: 0, costReduction: 0, costI: 0, capacityI: 0, revenueI: 0 }; + : { ...company, cost: 0, capacity: 0, revenue: 0 }; }); const displayCompanies = merged; - console.log(displayCompanies); - // موقعیت‌های جدید برای چیدمان لوزی شکل (3 ردیف - 1-2-1) - // گرید 5x4 نگه داشته شده اما موقعیت‌ها تغییر کرده + // Positions inside a 5x4 grid (col, row) + // Layout keeps same visual logic: left/middle/right on two bands with spacing grid around const gridPositions = [ - { col: 2, row: 1, colI: 1, rowI: 1, name: "واحد 100" }, // ردیف اول - ستون اول - { col: 4, row: 1, colI: 5, rowI: 1, name: "واحد 200" }, // ردیف اول - ستون دوم - { col: 2, row: 3, colI: 1, rowI: 3, name: "واحد 300" }, // ردیف دوم - ستون اول - { col: 4, row: 3, colI: 5, rowI: 3, name: "واحد 400" }, // ردیف دوم - ستون دوم + { col: 2, row: 2 , colI : 1 , rowI : 2 , name : "LLTE&HLTE"}, // left - top band + { col: 3, row: 2 , colI : 3 , rowI : 1 , name : "BTX"}, // middle top (image sits in row 2, info box goes to row 1) + { col: 4, row: 2 ,colI : 5 , rowI : 2 , name : "Utility"}, // right - top band + { col: 2, row: 3 , colI : 1 , rowI : 3 , name : "Storage Tank"}, // left - bottom band + { col: 3, row: 3 , colI : 3, rowI : 4 , name : "PX"}, // middle bottom (image sits in row 3, info box goes to row 4) + { col: 4, row: 3 , colI : 5 , rowI : 3 , name : "Reforming"}, // right - bottom band ]; return (
{displayCompanies.map((company, index) => { - const gp = gridPositions.find(v => v.name === company.name); + const gp = gridPositions.find(v => v.name === company.name); return ( - -
-
- {company.name} -
- {company.name} + <> +
+
+ {company.name}
- - - ); + + {company.name} +
+ + ); })}
@@ -139,17 +127,17 @@ export function D3ImageInfo({ companies }: D3ImageInfoProps) { .company-image { object-fit: contain; - height: 100px; + height : 100px; } .info-box { border: 1px solid #3F415A; border-radius: 10px; height: max-content; - align-self: center; - justify-self: center; - padding: .2rem 1.2rem; - min-width: 8rem; + align-self : center; + justify-self : center; + padding : .2rem 1.2rem; + min-width : 8rem; background-color: transparent; } @@ -160,28 +148,25 @@ export function D3ImageInfo({ companies }: D3ImageInfoProps) { } .info-row { - position: relative; + position : relative; margin: .1rem 0; display: flex; - gap: .5rem; - justify-content: space-between; + gap : .5rem; + justify-content : space-between; direction: rtl; } - .info-row:has(.info-value.revenue) { - border-bottom: 1px solid #3AEA83; - } - .info-row:has(.info-value.cost) { border-bottom: 1px solid #F76276; } + .info-label { color: #FFFFFF; font-size: 11px; font-weight: 300; text-align: right; - margin: auto 0; + margin : auto 0; } .info-value { @@ -189,12 +174,10 @@ export function D3ImageInfo({ companies }: D3ImageInfoProps) { font-size: 14px; font-weight: 500; text-align: right; - margin-bottom: .5rem; + margin-bottom : .5rem; } - .info-value.revenue { color: #fff; } .info-value.cost { color: #fff; } - .info-value.cost2 { color: #fff; } .info-value.capacity { color: #fff; } .info-unit { @@ -208,4 +191,4 @@ export function D3ImageInfo({ companies }: D3ImageInfoProps) { `}
); -} \ No newline at end of file +} diff --git a/app/components/dashboard/d3-image-info3.tsx b/app/components/dashboard/d3-image-info2.tsx similarity index 99% rename from app/components/dashboard/d3-image-info3.tsx rename to app/components/dashboard/d3-image-info2.tsx index 2083b67..572ae7a 100644 --- a/app/components/dashboard/d3-image-info3.tsx +++ b/app/components/dashboard/d3-image-info2.tsx @@ -1,5 +1,5 @@ //این فایل مخصوص -//شماتیک نوری +//شماتیک آپادانا import React from "react"; import { formatNumber } from "~/lib/utils"; diff --git a/app/components/dashboard/dashboard-home.tsx b/app/components/dashboard/dashboard-home.tsx index d3fcc42..ed275b3 100644 --- a/app/components/dashboard/dashboard-home.tsx +++ b/app/components/dashboard/dashboard-home.tsx @@ -655,15 +655,6 @@ export function DashboardHome() { //پتروشیمی آپادانا - companies={companyChartData.map((item) => { - const imageMap: Record = { - "واحد 100": "/abniro.png" , - "واحد 200": "/besparan.png" , - "واحد 300": "/khwarazmi.png" , - "واحد 400": "/faravash1.png" - }; - - //پتروشیمی نوری // companies={companyChartData.map((item) => { // const imageMap: Record = { // "واحد 100": "/abniro.png" , @@ -672,6 +663,17 @@ export function DashboardHome() { // "واحد 400": "/faravash1.png" // }; + //پتروشیمی نوری + companies={companyChartData.map((item) => { + const imageMap: Record = { + "LLTE&HLTE": "/besparan.png", + BTX: "/khwarazmi.png", + Utility: "/faravash1.png", + Reforming: "/faravash2.png", + "Storage Tank": "/kimia.png", + PX: "/abniro.png", + }; + return { diff --git a/app/components/dashboard/header.tsx b/app/components/dashboard/header.tsx index 822d576..1d2159c 100644 --- a/app/components/dashboard/header.tsx +++ b/app/components/dashboard/header.tsx @@ -237,9 +237,9 @@ export function Header({ //بندر امام // const url = `https://inogen-bpms.pelekan.org/redirect/${getData.data}`; //آپادانا - const url = `https://APADANA-IATM-bpms.pelekan.org/redirect/${getData.data}`; + // const url = `https://APADANA-IATM-bpms.pelekan.org/redirect/${getData.data}`; //نوری - // const url = `https://NOPC-IATM-bpms.pelekan.org/redirect/${getData.data}`; + const url = `https://NOPC-IATM-bpms.pelekan.org/redirect/${getData.data}`; window.open(url, "_blank"); } catch (error) { diff --git a/app/components/dashboard/interactive-bar-chart.tsx b/app/components/dashboard/interactive-bar-chart.tsx index 18e9344..3292e7c 100644 --- a/app/components/dashboard/interactive-bar-chart.tsx +++ b/app/components/dashboard/interactive-bar-chart.tsx @@ -27,19 +27,22 @@ const chartConfig = { }, revenue: { label: "افزایش درآمد", - color: "#4ADE80", // Green-400 + color: "#4ADE80", }, cost: { - label: "کاهش هزینه", - color: "#F87171", // Red-400 + // آپادانا بندرامام + //label: "کاهش هزینه", + label: "هزینه عملیاتی", // نوری + color: "#F87171", }, } satisfies ChartConfig; - export function InteractiveBarChart({ data, + showRevenue = "نوری"!="نوری", // آپادانا بندرامام }: { data: CompanyChartDatum[]; + showRevenue?: boolean; }) { return ( @@ -48,7 +51,7 @@ export function InteractiveBarChart({ @@ -66,31 +69,67 @@ export function InteractiveBarChart({ axisLine={false} tickMargin={25} style={{ fill: "#ACACAC", fontSize: 11 }} - tickFormatter={(value) => `${formatNumber(Math.round(value))}%`} + tickFormatter={(value) => + `${formatNumber(Math.round(value))}%` + } /> - + `${formatNumber(Math.round(v))}%`} + style={{ + fill: "#ffffff", + fontSize: "16px", + fontWeight: "bold", + }} + formatter={(v: number) => + `${formatNumber(Math.round(v))}%` + } /> - - `${formatNumber(Math.round(v))}%`} - /> - - + fill={chartConfig.revenue.color} + radius={[8, 8, 0, 0]} + > + + `${formatNumber(Math.round(v))}%` + } + /> + + )} + + `${formatNumber(Math.round(v))}%`} + style={{ + fill: "#ffffff", + fontSize: "16px", + fontWeight: "bold", + }} + formatter={(v: number) => + `${formatNumber(Math.round(v))}%` + } /> @@ -103,23 +142,32 @@ export function InteractiveBarChart({ className="w-6 h-2 rounded" style={{ backgroundColor: chartConfig.capacity.color }} >
- {chartConfig.capacity.label} + + {chartConfig.capacity.label} +
-
+ +
- {chartConfig.cost.label} + + {chartConfig.cost.label} +
-
-
- {chartConfig.revenue.label} -
- + + {showRevenue && ( +
+
+ + {chartConfig.revenue.label} + +
+ )}
diff --git a/app/components/dashboard/sidebar.tsx b/app/components/dashboard/sidebar.tsx index 2355a2a..fe45f60 100644 --- a/app/components/dashboard/sidebar.tsx +++ b/app/components/dashboard/sidebar.tsx @@ -415,17 +415,41 @@ export function Sidebar({
{!isCollapsed ? (
- + + {/* آپادانا بندرامام */} + {"نوری" == "نوری" ? ( + logo + + +) : ( +)} +
+ + {/* آپادانا بندرامام */} + {"نوری" == "نوری" ? ( +
+
+ پتروشیمی نوری +
+
نسخه ۰.۱
+
+ + ):( +
داشبورد مدیریت فناوری و نوآوری
- {/*
نسخه ۰.۱
*/} + )}
) : ( diff --git a/app/components/ecosystem/network-graph.tsx b/app/components/ecosystem/network-graph.tsx index 4ac8263..58a3b06 100644 --- a/app/components/ecosystem/network-graph.tsx +++ b/app/components/ecosystem/network-graph.tsx @@ -10,9 +10,9 @@ const API_BASE_URL = //بندر امام // import.meta.env.VITE_API_URL || "https://inogen-back.pelekan.org/api"; //آپادانا -import.meta.env.VITE_API_URL || "https://APADANA-IATM-back.pelekan.org/api"; +// import.meta.env.VITE_API_URL || "https://APADANA-IATM-back.pelekan.org/api"; //نوری -// import.meta.env.VITE_API_URL || "https://NOPC-IATM-back.pelekan.org/api"; +import.meta.env.VITE_API_URL || "https://NOPC-IATM-back.pelekan.org/api"; export interface Node { @@ -150,8 +150,8 @@ export function NetworkGraph({ const centerNode: Node = { id: "center", // label: "پتروشیمی بندر امام", - // label: "پتروشیمی نوری", - label: "پتروشیمی آپادانا", + label: "پتروشیمی نوری", + // label: "پتروشیمی آپادانا", category: "center", stageid: 0, isCenter: true, @@ -414,16 +414,16 @@ export function NetworkGraph({ if (d.isCenter) { //آپادانا -const fixedWidth = 198; -const fixedHeight = 200; // یا می‌توانید براساس نسبت تصویر محاسبه کنید +// const fixedWidth = 196; +// const fixedHeight = 200; // یا می‌توانید براساس نسبت تصویر محاسبه کنید //بندر امام // const fixedWidth = 100; // const fixedHeight = 80; // یا می‌توانید براساس نسبت تصویر محاسبه کنید //نوری -// const fixedWidth = 100; -// const fixedHeight = 80; // یا می‌توانید براساس نسبت تصویر محاسبه کنید +const fixedWidth = 186; +const fixedHeight = 70; // یا می‌توانید براساس نسبت تصویر محاسبه کنید const rect = group .append("rect") @@ -450,7 +450,7 @@ const fixedHeight = 200; // یا می‌توانید براساس نسبت تص .append("image") .attr("x", 0) .attr("y", 0) - .attr("width", fixedWidth) + .attr("width", fixedWidth) .attr("height", fixedHeight) .attr("href", d.isCenter ? "/main-circle.png" : d.imageUrl) .attr("preserveAspectRatio", "xMidYMid meet"); // حفظ نسبت تصویر @@ -505,13 +505,13 @@ const fixedHeight = 200; // یا می‌توانید براساس نسبت تص if (d.isCenter) { //آپادانا - const centerNodeHeight = 200; // ارتفاع نود مرکزی + // const centerNodeHeight = 200; // ارتفاع نود مرکزی //بندر امام // const centerNodeHeight = 80; // ارتفاع نود مرکزی //نوری - // const centerNodeHeight = 80; // ارتفاع نود مرکزی + const centerNodeHeight = 80; // ارتفاع نود مرکزی return centerNodeHeight / 2 + 20; // نصف ارتفاع + فاصله 20px } diff --git a/app/lib/api.ts b/app/lib/api.ts index 13fc730..374b5fe 100644 --- a/app/lib/api.ts +++ b/app/lib/api.ts @@ -163,22 +163,15 @@ class ApiService { // Innovation process function call wrapper public async call(payload: any) { //بندر امام - const url = "https://inogen-back.pelekan.org/api/call"; + // const url = "https://inogen-back.pelekan.org/api/call"; //آپادانا - const url = "https://APADANA-IATM-back.pelekan.org/api/call"; + // const url = "https://APADANA-IATM-back.pelekan.org/api/call"; //نوری const url = "https://NOPC-IATM-back.pelekan.org/api/call"; return this.postAbsolute(url, payload); } - const API_BASE_URL = - //بندر امام - // import.meta.env.VITE_API_URL || "https://inogen-bpms-back.pelekan.org/api"; - //آپادانا - import.meta.env.VITE_API_URL || "https://APADANA-IATM-back.pelekan.org/api"; - //نوری - // import.meta.env.VITE_API_URL || "https://NOPC-IATM-back.pelekan.org/api"; // GET request public async get(endpoint: string): Promise> { diff --git a/app/routes/ecosystem.tsx b/app/routes/ecosystem.tsx index ff741c7..91115c3 100644 --- a/app/routes/ecosystem.tsx +++ b/app/routes/ecosystem.tsx @@ -19,9 +19,9 @@ const API_BASE_URL = //بندر امام // import.meta.env.VITE_API_URL || "https://inogen-back.pelekan.org/api"; //آپادانا -import.meta.env.VITE_API_URL || "https://APADANA-IATM-back.pelekan.org/api"; +// import.meta.env.VITE_API_URL || "https://APADANA-IATM-back.pelekan.org/api"; //نوری -// import.meta.env.VITE_API_URL || "https://NOPC-IATM-back.pelekan.org/api"; +import.meta.env.VITE_API_URL || "https://NOPC-IATM-back.pelekan.org/api"; diff --git a/public/Isolation_Mode - Copy.png b/public/Isolation_Mode - Copy.png new file mode 100644 index 0000000..a716d6e Binary files /dev/null and b/public/Isolation_Mode - Copy.png differ diff --git a/public/Isolation_Mode.png b/public/Isolation_Mode.png new file mode 100644 index 0000000..008a42c Binary files /dev/null and b/public/Isolation_Mode.png differ diff --git a/public/brand.svg b/public/brand.svg index d3fb0d1..b47737b 100644 --- a/public/brand.svg +++ b/public/brand.svg @@ -1,23 +1,13 @@ - - - - - - - - - - - - - - - - + + + + + + - - + + diff --git a/public/brand3.svg b/public/brand3.svg new file mode 100644 index 0000000..cca2e8e --- /dev/null +++ b/public/brand3.svg @@ -0,0 +1,53 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/public/brand_11zon.png b/public/brand_11zon.png new file mode 100644 index 0000000..e57076c Binary files /dev/null and b/public/brand_11zon.png differ diff --git a/public/main-circle.png b/public/main-circle.png index 27e63e6..5b6cddf 100644 Binary files a/public/main-circle.png and b/public/main-circle.png differ diff --git a/public/main-circle11.png b/public/main-circle11.png new file mode 100644 index 0000000..27e63e6 Binary files /dev/null and b/public/main-circle11.png differ