+
+
+
Statistiche
+
Panoramica per anno
+
+
+
+
+ {/* Sezione economica */}
+
+
Fatturato
+
+
+
+
+
+
+
+
+
+ {/* Sezione time tracking */}
+
+
Tempo tracciato
+
+
+
+ {/* ... tabella ore per cliente (copia da analytics/page.tsx) ... */}
+
+
+ ```
+ Ricopia fedelmente il blocco "ore per cliente" da analytics/page.tsx (righe 127-160)
+ nella sezione time tracking della dashboard.
+
+ Calcola collectedPct prima del return:
+ ```typescript
+ const collectedPct = data.contracted > 0
+ ? Math.round((data.collected / data.contracted) * 100) : 0;
+ const maxClientSeconds = timeByClient[0]?.totalSeconds ?? 1;
+ ```
+
+ STEP 2 — Aggiorna YearSelector per navigare verso /admin:
+ In src/components/admin/YearSelector.tsx, riga ~18:
+ ```typescript
+ // PRIMA:
+ router.push(`/admin/analytics?year=${y}`);
+ // DOPO:
+ router.push(`/admin?year=${y}`);
+ ```
+
+ NON modificare: MonthlyChart (rimane nello stesso file), struttura esistente della dashboard
+ (FollowUpWidget, KPI card, activity feed — tutto invariato sopra la nuova sezione).
+