Files
clienthub/src/components/public/proposal/sections/VisionSection.tsx
T
simone fdcc938252 feat(21-22): agente AI generazione preventivo + pagina pubblica deck
- Migration 0010: tabella proposals (id, slug, lead_id, client_id,
  offer_macro_id, content jsonb, state, selected_tier, accepted_at)
  applicata a prod via SSH tunnel
- @anthropic-ai/sdk@0.105.0 installato; ANTHROPIC_API_KEY in .env.local
- src/lib/proposal/: schema Zod ProposalContent, agente Claude Opus 4.8,
  assemble (AI + offerta DB + config consulente), queries, profile.ts
- Admin: /admin/preventivi lista + /genera (pre-fill ?lead_id=X) + /[id] review
- Sidebar: voce Preventivi + CTA globale lime "Genera preventivo"
- LeadDetail: pulsante "Genera preventivo" → /admin/preventivi/genera?lead_id=X
- Pagina pubblica /preventivo/[slug]: deck 20+ slide light-mode iamcavalli,
  navigazione frecce + dot + keyboard, accept/reject con guard immutabilità
- STATE.md aggiornato (80%), 21-PLAN.md scritto nel formato GSD

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-20 14:37:05 +02:00

34 lines
1.0 KiB
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
import type { AssembledProposal } from "@/lib/proposal/assemble";
import type { ProposalContent } from "@/lib/proposal/schema";
type Props = {
vision: ProposalContent["vision"];
header: AssembledProposal["header"];
};
export function VisionSection({ vision, header }: Props) {
const words = vision.headline.split(" ");
const mid = Math.floor(words.length / 2);
return (
<div className="min-h-screen flex flex-col justify-center px-16 py-24 space-y-8">
<p className="text-xs font-mono tracking-widest text-muted-foreground uppercase">
Dove andiamo
</p>
<h2 className="text-5xl font-light leading-tight tracking-tight text-foreground">
{words.slice(0, mid).join(" ")}{" "}
<span className="text-primary">{words.slice(mid).join(" ")}</span>
</h2>
<p className="text-lg text-muted-foreground max-w-2xl leading-relaxed">
{vision.body}
</p>
<p className="text-sm text-muted-foreground">
{header.clientName} × {header.consultantName}
</p>
</div>
);
}