From 7e580315287220a742df233844e5cc6394b963fa Mon Sep 17 00:00:00 2001 From: Simone Cavalli Date: Thu, 20 Aug 2026 23:08:00 +0200 Subject: [PATCH] feat(portale): progress bar compatta, meno altezza MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Segue il mock design-reference/Client-Portal-Progress-Bar: "Step N" e lo stato passano sulla stessa riga, il titolo fase resta sotto — due righe di testo invece di tre — e il padding del contenitore scende da py-8 a py-3. Altezza della sezione da ~147px a ~90px. Co-Authored-By: Claude Opus 5 --- design-reference/Client-Portal-Progress-Bar | 170 ++++++++++++++++++++ design-reference/DESIGN-SYSTEM.md | 2 +- src/components/client/MilestoneStepper.tsx | 42 +++-- 3 files changed, 196 insertions(+), 18 deletions(-) create mode 100644 design-reference/Client-Portal-Progress-Bar diff --git a/design-reference/Client-Portal-Progress-Bar b/design-reference/Client-Portal-Progress-Bar new file mode 100644 index 0000000..7ad8550 --- /dev/null +++ b/design-reference/Client-Portal-Progress-Bar @@ -0,0 +1,170 @@ +
+ +
+
+
+ + +
+ +
+
+ + + +
+
+
+ Step 1 + COMPLETATA +
+
Fase 1 → Onboarding / Setup
+
+
+ + +
+
2
+
+
+ Step 2 + DA INIZIARE +
+
Fase 2 → Analisi / Strategia
+
+
+ + +
+
3
+
+
+ Step 3 + DA INIZIARE +
+
Fase 3 → Esecuzione / Core
+
+
+ + +
+
4
+
+
+ Step 4 + DA INIZIARE +
+
Fase 4 → Raffinamento / Extra
+
+
+
+
+ + \ No newline at end of file diff --git a/design-reference/DESIGN-SYSTEM.md b/design-reference/DESIGN-SYSTEM.md index 2ad7c7e..c411dee 100644 --- a/design-reference/DESIGN-SYSTEM.md +++ b/design-reference/DESIGN-SYSTEM.md @@ -146,7 +146,7 @@ across all future admin pages. | `LeadTable` | `src/components/admin/leads/LeadTable.tsx` | Luxury table restyle: `bg-card rounded-xl shadow-card`, uppercase muted headers, `hover:bg-muted/40` rows, uses `StatusBadge`. | | `LeadsKanbanBoard` | `src/components/admin/leads/LeadsKanbanBoard.tsx` | Kanban restyle: `bg-muted/60` columns with count pills, `bg-card` cards with `hover:border-primary/30`. Uses `@dnd-kit`, keeps all 6 lead stages. | | `LeadsViewToggle` | `src/components/admin/leads/LeadsViewToggle.tsx` | Wires `SearchInput` + `SegmentedToggle` together with the table/kanban views. | -| `MilestoneStepper` | `src/components/client/MilestoneStepper.tsx` | Client-portal horizontal milestone stepper: one node per real phase, connecting line filled by `global_progress_pct`. Done = filled `bg-primary` ✓, active = `border-primary` outline, upcoming = `bg-muted`. | +| `MilestoneStepper` | `src/components/client/MilestoneStepper.tsx` | Client-portal horizontal milestone stepper: one node per real phase, connecting line filled by `global_progress_pct`. Done = filled `bg-primary` ✓, active = `border-primary` outline, upcoming = `bg-muted`. Layout **compatto** (`py-3`, due sole righe di testo: `Step N` + stato in linea, titolo fase sotto) — mock: `design-reference/Client-Portal-Progress-Bar`. | | `LeadDetail` | `src/components/admin/leads/LeadDetail.tsx` | Lead detail page (`/admin/pipeline/[id]`): bespoke header (name + inline `StatusBadge` + action bar), asymmetric `lg:grid-cols-3` layout (1/3 profile card w/ icon-chip rows + tags, 2/3 Note/Follow-up + unified timeline). | | `ClientProfitability` | `src/components/admin/dashboard/ClientProfitability.tsx` | Dashboard widget: valore orario reale per cliente (`getClientProfitability` → contrattualizzato ÷ ore tracciate) con badge margine (Ottimo `bg-primary/10 text-primary` / In Linea `bg-muted`). | | `YearSelector` | `src/components/admin/YearSelector.tsx` | Selettore anno restilizzato a pill (`rounded-full border-border bg-card shadow-card`), frecce ←/→, valore `font-mono`. Guida i dati year-scoped della dashboard via `?year=`. | diff --git a/src/components/client/MilestoneStepper.tsx b/src/components/client/MilestoneStepper.tsx index de79e89..1c34c5d 100644 --- a/src/components/client/MilestoneStepper.tsx +++ b/src/components/client/MilestoneStepper.tsx @@ -18,6 +18,10 @@ const statusWordClass: Record<"upcoming" | "active" | "done", string> = { * Horizontal milestone stepper — replica del "STEP PROGRESS TIMELINE" del mock. * Un nodo per fase reale (non 5 fissi); la linea di fondo si riempie in base a * global_progress_pct. + * + * Layout compatto (design-reference/Client-Portal-Progress-Bar): il nodo occupa + * due righe di testo — "Step N" e lo stato sulla stessa riga, il titolo fase + * sotto — con padding ridotto, così la barra ruba poca altezza alla dashboard. */ export function MilestoneStepper({ phases, @@ -29,10 +33,10 @@ export function MilestoneStepper({ if (phases.length === 0) return null; return ( -
+
- {/* Linea di connessione + riempimento dinamico */} -
+ {/* Linea di connessione + riempimento dinamico (centrata sui cerchi) */} +
{phases.map((phase, i) => { const s = phase.status; return ( -
+
{s === "done" ? "✓" : i + 1}
- - Step {i + 1} - - +
+ + Step {i + 1} + + + {statusWord[s]} + +
+ {phase.title} - - {statusWord[s]} -
); })}