fix: chnage procees innovation progress bar logic

This commit is contained in:
MehrdadAdabi 2025-09-20 21:31:50 +03:30
parent 38534d599a
commit 85ae658c85
4 changed files with 2123 additions and 237 deletions

View File

@ -552,13 +552,13 @@ export function ManageIdeasTechPage() {
const getImportanceColor = (importance: string) => { const getImportanceColor = (importance: string) => {
switch (importance?.toLowerCase()) { switch (importance?.toLowerCase()) {
case "تایید شده": case "تایید شده":
return "var(--success)"; // سبز return "var(--color-pr-green)"; // green
case "در حال بررسی": case "در حال بررسی":
return "var(--info)"; // آبی return "var(--info)"; // آبی
case "رد شده": case "رد شده":
return "var(--destructive)"; // قرمز return "#F76276"; // red
case "اجرا شده": case "اجرا شده":
return "var(--warning)"; // زرد/نارنجی return "#69C8EA";
default: default:
return "var(--muted)"; // خاکستری پیش‌فرض return "var(--muted)"; // خاکستری پیش‌فرض
} }
@ -576,7 +576,12 @@ export function ManageIdeasTechPage() {
if (days == null) { if (days == null) {
return <span className="text-muted-foreground">-</span>; return <span className="text-muted-foreground">-</span>;
} }
const color = days > 0 ? "var(--success)" : days < 0 ? "var(--destructive)" : undefined; const color =
days > 0
? "var(--success)"
: days < 0
? "var(--destructive)"
: undefined;
return ( return (
<span <span
dir="ltr" dir="ltr"
@ -602,7 +607,9 @@ export function ManageIdeasTechPage() {
); );
case "idea_registration_date": case "idea_registration_date":
return ( return (
<span className="text-muted-foreground">{formatDate(String(value))}</span> <span className="text-muted-foreground">
{formatDate(String(value))}
</span>
); );
case "project_no": case "project_no":
return ( return (
@ -614,7 +621,9 @@ export function ManageIdeasTechPage() {
</Badge> </Badge>
); );
case "idea_title": case "idea_title":
return <span className="font-medium text-foreground">{String(value)}</span>; return (
<span className="font-medium text-foreground">{String(value)}</span>
);
case "idea_status": case "idea_status":
return ( return (
<Badge <Badge

View File

@ -67,12 +67,13 @@ export function CustomBarChart({
return ( return (
<div className={`space-y-6 ${className}`} style={{ height }}> <div className={`space-y-6 ${className}`} style={{ height }}>
{title && <div className="border-b-[#3F415A] border-b-2"> {title && (
<div className="border-b-[#3F415A] border-b-2">
<h3 className="text-sm font-semibold text-white font-persian text-right p-4"> <h3 className="text-sm font-semibold text-white font-persian text-right p-4">
{title} {title}
</h3> </h3>
</div>} </div>
)}
<div className="space-y-4 px-4 pb-4"> <div className="space-y-4 px-4 pb-4">
{data.map((item, index) => { {data.map((item, index) => {
@ -101,13 +102,16 @@ export function CustomBarChart({
> >
<div className="inset-0 bg-gradient-to-r from-transparent to-white/10 rounded-full"></div> <div className="inset-0 bg-gradient-to-r from-transparent to-white/10 rounded-full"></div>
</div> </div>
<span {displayValue != 100 && (
className={`text-base font-normal text-left text-white`} <span
> className={`text-base font-normal text-left text-white`}
{item.valuePrefix || ""} >
{formatNumber(parseFloat(displayValue))} {item.valuePrefix || ""}
{item.valueSuffix || ""}
</span> {formatNumber(parseFloat(displayValue))}
{item.valueSuffix || ""}
</span>
)}
</div> </div>
</div> </div>
); );

View File

@ -3,7 +3,7 @@ import { ManageIdeasTechPage } from "~/components/dashboard/project-management/m
export function meta() { export function meta() {
return [ return [
{ title: "مدیریت فنواری و ایده ها" }, { title: "مدیریت فناوری و ایده ها" },
{ name: "description", content: "مدیریت پروژه‌های فناوری و نوآوری" }, { name: "description", content: "مدیریت پروژه‌های فناوری و نوآوری" },
]; ];
} }

2313
package-lock.json generated

File diff suppressed because it is too large Load Diff