fa5672025f
phase complete 14: ROADMAP plans/progress, STATE position (Phase 15 next, blocked on user mockup), REQUIREMENTS CRM-08..12 -> Complete.
138 lines
9.7 KiB
Markdown
138 lines
9.7 KiB
Markdown
# Roadmap: ClientHub v2.1 Offer Studio + Proposal AI
|
||
|
||
## Overview
|
||
|
||
**v2.0 (Phases 1–10, Complete)**: ClientHub è una suite operativa completa — catalogo servizi unificato, offerte con fasi, preventivo pubblico (`/quote/[token]`), CRM pipeline lead con activity log. Archiviato in `.planning/milestones/v2.0-ROADMAP.md`.
|
||
|
||
**v2.1 (Phases 11–17, Planning)**: Rifare la UX di catalogo/offerte in stile database-view (Notion-like), ristrutturare il workspace progetto (Preventivo → Servizi Attivi, rimozione Forecast), ricostruire il CRM in stile Attio/Pipedrive (inline edit, tag, fix bug residui), e chiudere il loop commerciale con un builder preventivi AI + invio email + auto-provisioning. Numerazione fasi: v2.0 ha chiuso a Phase 10; v2.1 parte da Phase 11.
|
||
|
||
## Phases
|
||
|
||
- [x] **Phase 11: Catalog Database-View UX & Legacy Consolidation** - Catalogo `services` come tabella con inline edit, tag multi-select, quick-add, ricerca istantanea; consolidamento `service_catalog`/`offer_services` → `services`
|
||
- [ ] **Phase 12: Offer Composition Drag&Drop & CSV Import** - Composizione offerte via drag&drop dal catalogo (`@dnd-kit`) con totale live; import CSV one-shot
|
||
- [ ] **Phase 13: Workspace — Servizi Attivi** - Tab "Preventivo" rimossa (UI-only), "Offerte" → "Servizi attivi" (one-shot/ricorrenti + tracking incassi mensili), rimozione pagina Forecast
|
||
- [x] **Phase 14: CRM Attio-style & Fix** - Redesign `/admin/leads` stile Attio/Pipedrive (inline edit + tag), fix FollowUpWidget IT / LeadForm types / SendQuoteModal rami irraggiungibili (completed 2026-06-14)
|
||
- [ ] **Phase 15: Dashboard Revenue Stats** - Dashboard admin mostra statistiche revenue mensile (ex `/admin/forecast`) da `project_offers` — **BLOCCATA**, attesa mockup utente
|
||
- [ ] **Phase 16: Proposal AI — Data Foundations & Auto-Provisioning** - Campo Stripe Payment Link su offerte/preventivi + auto-provisioning (client+progetto+fasi+pagamenti) all'accettazione
|
||
- [ ] **Phase 17: Proposal AI — Builder, Pagina Pubblica & Email** - Builder AI proposta da cliente+offerta+note, redesign `/quote/[token]`, invio email Resend con link proposta
|
||
|
||
## Phase Details
|
||
|
||
### Phase 11: Catalog Database-View UX & Legacy Consolidation
|
||
**Goal**: L'utente vede ed edita il catalogo servizi come una tabella stile database (Notion-like) — inline editing, tag multi-select, quick-add, ricerca istantanea — su un'unica tabella `services` consolidata senza perdita di dati legacy
|
||
**Mode:** migration + ui
|
||
**Depends on**: Phase 10 (CRM Pipeline, ultima fase v2.0)
|
||
**Requirements**: OFFER-07, OFFER-08, OFFER-09, OFFER-10, OFFER-13
|
||
**Success Criteria** (what must be TRUE):
|
||
1. L'utente edita inline ogni cella del catalogo `services` (click sulla cella → edit → invio salva) senza apertura di modali
|
||
2. L'utente assegna tag multi-select a servizi/offerte, creando nuovi tag al volo senza uscire dalla tabella
|
||
3. L'utente aggiunge un nuovo servizio tramite riga vuota in fondo alla tabella (nome + invio)
|
||
4. L'utente filtra/cerca servizi e offerte istantaneamente (ricerca client-side, nessun reload)
|
||
5. I dati legacy di `service_catalog` e `offer_services` sono consolidati in `services` senza perdita (migration additiva, audit trail `migrated_from`/`migrated_id`)
|
||
**Plans**: 4 plans
|
||
**Plan list**:
|
||
- [x] 11-01-PLAN.md
|
||
- [x] 11-02-PLAN.md
|
||
- [x] 11-03-PLAN.md
|
||
- [x] 11-04-PLAN.md
|
||
**UI hint**: yes
|
||
**Status**: ✅ Complete (2026-06-13) — migration 0007 (`services.fase`) applicata in prod, commit pushato su `gitea/main`
|
||
|
||
### Phase 12: Offer Composition Drag&Drop & CSV Import
|
||
**Goal**: L'utente compone un'offerta trascinando servizi dal catalogo con un totale live durante il drag, e può importare un CSV one-shot per popolare servizi/offerte esistenti
|
||
**Mode:** ui
|
||
**Depends on**: Phase 11 (tabella `services` unificata)
|
||
**Requirements**: OFFER-11, OFFER-12
|
||
**Success Criteria** (what must be TRUE):
|
||
1. L'utente compone un'offerta trascinando servizi dal catalogo (`@dnd-kit`)
|
||
2. Durante il drag, il totale dell'offerta si aggiorna live
|
||
3. L'utente importa un CSV one-shot per popolare servizi/offerte esistenti (solo seed iniziale, non sync continuo)
|
||
**Plans**: TBD
|
||
**UI hint**: yes
|
||
**Status**: Pending planning
|
||
|
||
### Phase 13: Workspace — Servizi Attivi
|
||
**Goal**: Il workspace progetto sostituisce le tab "Preventivo"/"Offerte"/"Forecast" con un'unica tab "Servizi attivi" che traccia servizi one-shot e ricorrenti con incassi mensili, senza perdere `accepted_total`/`quote_items`
|
||
**Mode:** ui + schema
|
||
**Depends on**: Phase 5 (`project_offers`), Phase 9 (flusso `accepted_total` via quote)
|
||
**Requirements**: PROJ-06, PROJ-07, PROJ-08, PROJ-09, PROJ-10
|
||
**Success Criteria** (what must be TRUE):
|
||
1. La tab "Preventivo" è rimossa dal workspace progetto (solo UI — `quote_items` resta intatta, `accepted_total` resta editabile via tab Pagamenti)
|
||
2. La tab "Offerte" diventa "Servizi attivi" e mostra tutte le offerte assegnate al progetto (`project_offers`)
|
||
3. L'utente marca ogni "servizio attivo" come one-shot o ricorrente mensile
|
||
4. Per i servizi ricorrenti, l'utente registra in quali mesi è stata incassata la fattura (schema nuovo, additivo)
|
||
5. La pagina "Forecast" e la relativa voce di sidebar sono rimosse
|
||
**Plans**: TBD
|
||
**UI hint**: yes
|
||
**Status**: Pending planning
|
||
|
||
### Phase 14: CRM Attio-style & Fix
|
||
**Goal**: La tabella lead (`/admin/leads`) è ridisegnata in stile Attio/Pipedrive — inline editing dei campi principali e tag multi-select — e i bug residui del modulo CRM (FollowUpWidget non in italiano, LeadForm con type-relaxation, SendQuoteModal con rami irraggiungibili) sono risolti
|
||
**Mode:** ui
|
||
**Depends on**: Phase 10 (CRM Pipeline base)
|
||
**Requirements**: CRM-08, CRM-09, CRM-10, CRM-11, CRM-12
|
||
**Success Criteria** (what must be TRUE):
|
||
1. La tabella lead supporta inline editing dei campi principali (status, next_action, ecc.) senza apertura di modale
|
||
2. L'utente assegna tag multi-select ai lead, creando nuovi tag al volo
|
||
3. Il `FollowUpWidget` è interamente in italiano, coerente col resto dell'app
|
||
4. Il form lead (`LeadForm`) valida i campi senza workaround di type-relaxation su react-hook-form
|
||
5. Il flusso `SendQuoteModal` (preventivo esistente vs nuovo) non contiene rami di codice irraggiungibili
|
||
**Plans:** 3/3 plans complete
|
||
Plans:
|
||
**Wave 1**
|
||
- [x] 14-01-PLAN.md — Data-layer foundation: getLeadsWithTags/getLeadFieldOptions query helpers + updateLeadField/addLeadTag/removeLeadTag/renameLeadTag server actions (requireAdmin-guarded)
|
||
- [x] 14-03-PLAN.md — Bug fixes: FollowUpWidget Italian translation (CRM-10), LeadForm typed useForm (CRM-11), SendQuoteModal dead branch removal (CRM-12)
|
||
|
||
**Wave 2** *(blocked on Wave 1 completion)*
|
||
- [x] 14-02-PLAN.md — LeadTable raw-table rewrite (inline edit + status dropdown + tag multi-select), LeadsSearch instant filter, page wiring, LeadDetail tags
|
||
**UI hint**: yes — riferimento design Pipedrive/Attio (confermato dall'utente 2026-06-13)
|
||
**Status**: ✅ Complete (2026-06-14) — 5/5 success criteria verified, code review 0 critical/6 warnings/3 info
|
||
|
||
### Phase 15: Dashboard Revenue Stats
|
||
**Goal**: La Dashboard admin mostra le statistiche di revenue mensile (ex `/admin/forecast`), calcolate da `project_offers`
|
||
**Mode:** ui
|
||
**Depends on**: Phase 13 (modello dati Servizi attivi)
|
||
**Requirements**: DASH-11
|
||
**Success Criteria** (what must be TRUE):
|
||
1. La Dashboard admin mostra un breakdown di revenue mensile calcolato da `project_offers`
|
||
**Plans**: TBD
|
||
**UI hint**: yes
|
||
**Status**: Blocked — attesa mockup dashboard dall'utente (isolata/skippabile, non blocca Phase 16/17)
|
||
|
||
### Phase 16: Proposal AI — Data Foundations & Auto-Provisioning
|
||
**Goal**: Ogni offerta/preventivo ha un campo link di pagamento Stripe mostrato come CTA pubblica, e all'accettazione del preventivo il sistema crea automaticamente cliente + progetto, copia le fasi dall'offerta e configura 1-4 pagamenti
|
||
**Mode:** schema + automation
|
||
**Depends on**: Phase 9 (flusso accettazione preventivo), Phase 13 (Servizi attivi come target del provisioning)
|
||
**Requirements**: PROP-03, PROP-04
|
||
**Success Criteria** (what must be TRUE):
|
||
1. Ogni offerta/preventivo ha un campo "link di pagamento" (Stripe Payment Link) mostrato come CTA nella pagina pubblica
|
||
2. All'accettazione del preventivo, il sistema crea automaticamente cliente + progetto, copia le fasi dall'offerta e configura 1-4 pagamenti
|
||
**Plans**: TBD
|
||
**UI hint**: yes
|
||
**Status**: Pending planning
|
||
|
||
### Phase 17: Proposal AI — Builder, Pagina Pubblica & Email
|
||
**Goal**: Un builder AI genera una proposta a partire da cliente + offerta(e) selezionata(e) + note extra; la pagina pubblica `/quote/[token]` è ridisegnata; il link della proposta viene inviato via email (Resend) al lead
|
||
**Mode:** ai + ui
|
||
**Depends on**: Phase 16
|
||
**Requirements**: PROP-01, PROP-02, PROP-05
|
||
**Success Criteria** (what must be TRUE):
|
||
1. L'admin avvia un builder AI che genera una proposta a partire da cliente + offerta(e) selezionata(e) + note extra fornite manualmente
|
||
2. La pagina pubblica `/quote/[token]` è ridisegnata (HTML/CSS) per presentare la proposta generata
|
||
3. Il sistema invia via email (Resend) il link della proposta pubblica al lead
|
||
**Plans**: TBD
|
||
**UI hint**: yes
|
||
**Status**: Pending planning
|
||
|
||
## Progress
|
||
|
||
| Phase | Plans | Status | Completed |
|
||
|-------|-------|--------|-----------|
|
||
| 11. Catalog Database-View UX & Legacy Consolidation | 4/4 | ✅ Done | 2026-06-13 |
|
||
| 12. Offer Composition Drag&Drop & CSV Import | — | Pending planning | — |
|
||
| 13. Workspace — Servizi Attivi | — | Pending planning | — |
|
||
| 14. CRM Attio-style & Fix | 3/3 | Complete | 2026-06-14 |
|
||
| 15. Dashboard Revenue Stats | — | Blocked (mockup utente) | — |
|
||
| 16. Proposal AI — Data Foundations & Auto-Provisioning | — | Pending planning | — |
|
||
| 17. Proposal AI — Builder, Pagina Pubblica & Email | — | Pending planning | — |
|