"use client"; import { useState, useCallback } from "react"; import { BarChart3, MapPin, Users, Building2, TreePine, Ruler, Sparkles, FileQuestion, Lightbulb, X, Loader2, ChevronDown, ChevronUp, } from "lucide-react"; import { Card, CardContent } from "@/shared/components/ui/card"; import { Button } from "@/shared/components/ui/button"; import { Badge } from "@/shared/components/ui/badge"; import { cn } from "@/shared/lib/utils"; import type { UatDashboardData } from "@/app/api/eterra/uat-dashboard/route"; /* ------------------------------------------------------------------ */ /* Bar component (CSS only) */ /* ------------------------------------------------------------------ */ function Bar({ pct, color = "bg-emerald-500", className, }: { pct: number; color?: string; className?: string; }) { return (
); } /* ------------------------------------------------------------------ */ /* KPI Card */ /* ------------------------------------------------------------------ */ function KpiCard({ icon: Icon, label, value, sub, accent = "text-foreground", }: { icon: React.ComponentType<{ className?: string }>; label: string; value: string | number; sub?: string; accent?: string; }) { return ({label}
{typeof value === "number" ? value.toLocaleString("ro-RO") : value}
{sub && ({sub}
)}Fără date
; const maxPct = Math.max(...items.map((d) => Number(d[pctKey] ?? 0)), 1); return (Se calculează dashboard-ul pentru {uatName}…
{error}
Fără date proprietari (necesită îmbogățire Magic)
) : ( data.topOwners.map((o, i) => (