diff --git a/src/app/dashboard/reports/business/page.tsx b/src/app/dashboard/reports/business/page.tsx new file mode 100644 index 0000000..b54af4d --- /dev/null +++ b/src/app/dashboard/reports/business/page.tsx @@ -0,0 +1,228 @@ +'use client'; + +import Link from 'next/link'; +import { useQuery } from '@tanstack/react-query'; +import { apiFetch } from '../../../../lib/api'; +import type { Goal, Decision, Task } from '../../../../lib/api'; +import { useSession } from '../../../../components/session-provider'; + +const B = '/dashboard'; + +interface Organization { id: string; name: string; country?: string | null; createdAt: string; } +interface Opportunity { id: string; source: string; probability?: string | null; expiresAt?: string | null; } + +function StatCard({ label, value, sub, href, color = 'text-ink' }: { + label: string; value: number | string; sub?: string; href?: string; color?: string; +}) { + const inner = ( +
{label}
+{value}
+ {sub &&{sub}
} ++ Metrici cheie — organizații, taskuri, obiective, decizii, oportunități +
+Niciun obiectiv înregistrat
+ ) : ( +Nicio decizie înregistrată
+ ) : ( +{org.name}
+ {org.country &&{org.country}
} ++ {new Date(org.createdAt).toLocaleDateString('ro-RO', { day: 'numeric', month: 'short', year: 'numeric' })} +
+