fix some issues in header and add loading for load the popup

This commit is contained in:
Saeed AB 2025-08-20 00:06:35 +03:30
parent 879e78eb59
commit d813803f35
3 changed files with 14 additions and 8 deletions

View File

@ -398,15 +398,15 @@ export function InfoPanel({ selectedCompany }: InfoPanelProps) {
return ( return (
<div className="space-y-4"> <div className="space-y-4">
<Card className="bg-[linear-gradient(to_bottom_left,#464861,50%,#111628)]"> <Card className="bg-[linear-gradient(to_bottom_left,#464861,50%,#111628)]">
<CardHeader className="text-center pt-2 pb-3 border-b-2 border-[#3F415A]"> <CardHeader className="text-center pt-4 pb-3 border-b-2 border-[#3F415A]">
<CardTitle className="font-persian text-xl text-white"> <CardTitle className="font-persian text-xl text-white">
وضعیت بازیگران اکوسیستم نوآوری و فناوری وضعیت زیستبوم فناوری و نوآوری
</CardTitle> </CardTitle>
</CardHeader> </CardHeader>
<CardHeader className="text-center pb-2 border-b-2 border-[#3F415A]"> <CardHeader className="text-center pb-2 border-b-2 border-[#3F415A]">
<CardTitle className="font-persian text-xl text-white flex justify-between px-4"> <CardTitle className="font-persian text-xl text-white flex justify-between px-4">
تعداد بازیگران اکوسیستم تعداد بازیگران
<span className="font-bold text-3xl"> <span className="font-bold text-3xl">
{formatNumber(counts.actor_count)} {formatNumber(counts.actor_count)}
</span> </span>
@ -415,7 +415,7 @@ export function InfoPanel({ selectedCompany }: InfoPanelProps) {
{/* Actor Count Display */} {/* Actor Count Display */}
<CardHeader className="text-right text-xl py-2 pb-4 font-bold w-full"> <CardHeader className="text-right text-xl py-2 pb-4 font-bold w-full">
تنوع بازیگران اکوسیستم تنوع بازیگران
</CardHeader> </CardHeader>
{/* Middle - Bar Chart */} {/* Middle - Bar Chart */}
<CardContent className="flex-1 px-6 border-b-2 border-[#3F415A]"> <CardContent className="flex-1 px-6 border-b-2 border-[#3F415A]">

View File

@ -419,6 +419,7 @@ export function NetworkGraph({ onNodeClick }: NetworkGraphProps) {
// Add click handlers // Add click handlers
nodeGroup.on("click", async function (event, d) { nodeGroup.on("click", async function (event, d) {
setIsLoading(true);
event.stopPropagation(); event.stopPropagation();
// Don't handle center node clicks // Don't handle center node clicks
@ -470,6 +471,7 @@ export function NetworkGraph({ onNodeClick }: NetworkGraphProps) {
onNodeClick(basicDetails); onNodeClick(basicDetails);
} }
} }
setIsLoading(false);
}); });
// Update positions on simulation tick // Update positions on simulation tick

View File

@ -92,8 +92,9 @@ export default function EcosystemPage() {
> >
<DialogContent className="font-persian max-w-6xl max-h-[75vh] overflow-y-auto bg-[linear-gradient(to_bottom_left,#464861,20%,#111628)]"> <DialogContent className="font-persian max-w-6xl max-h-[75vh] overflow-y-auto bg-[linear-gradient(to_bottom_left,#464861,20%,#111628)]">
<DialogHeader> <DialogHeader>
<DialogTitle className="text-right border-b-2 border-gray-600 py-1 mr-4 text-xl"> <DialogTitle className="text-right border-b-2 border-gray-600 py-2 mr-4 text-xl">
معرفی شرکت معرفی
<span> {selectedCompany?.category}</span>
</DialogTitle> </DialogTitle>
<DialogDescription className="text-center text-green-400"></DialogDescription> <DialogDescription className="text-center text-green-400"></DialogDescription>
</DialogHeader> </DialogHeader>
@ -103,7 +104,7 @@ export default function EcosystemPage() {
<div className="space-y-4 p-6 border-l-2 border-gray-600"> <div className="space-y-4 p-6 border-l-2 border-gray-600">
{/* Company Image */} {/* Company Image */}
<div className="flex justify-between px-10 items-center text-3xl font-bold mb-4"> <div className="flex justify-between px-10 items-center text-3xl font-bold mb-4">
{selectedCompany?.label || "اطلاعات شرکت"} {selectedCompany?.label || ""}
{selectedCompany?.stageid && token?.accessToken ? ( {selectedCompany?.stageid && token?.accessToken ? (
<img <img
src={getImageUrl(selectedCompany.stageid)} src={getImageUrl(selectedCompany.stageid)}
@ -158,7 +159,10 @@ export default function EcosystemPage() {
</div> </div>
{/* Left Column - Company Fields */} {/* Left Column - Company Fields */}
<div className="space-y-2"> <div className="space-y-2">
<h3 className="font-persian text-lg font-bold">اطلاعات شرکت</h3> <h3 className="font-persian gap-1 flex text-lg font-bold">
اطلاعات
<span>{selectedCompany?.category}</span>
</h3>
{selectedCompany?.fields && {selectedCompany?.fields &&
selectedCompany.fields.length > 0 ? ( selectedCompany.fields.length > 0 ? (
<div className="space-y-3"> <div className="space-y-3">