simone
745f8a78c0
feat(05-04): OffersSection component + client dashboard wiring + /admin/forecast page
...
- Create src/components/client/OffersSection.tsx — displays public_name, cumulative_price, accepted_total (no internal_name)
- Extend client-dashboard.tsx — import OffersSection, add Offerte Attive sidebar block conditional on view.activeOffers
- Extend client/[token]/page.tsx adapter — map activeOffers from ProjectView to ClientView
- Create src/app/admin/forecast/page.tsx — RSC with 12-month revenue table using getRevenueForecast12Months(), bar chart column, totals row, empty-state message
2026-05-30 16:43:14 +02:00
simone
5efb433c23
fix(04-07): remove debug code — public page restored
...
Root cause: INTERNAL_SECRET was on same line as HOST= in .env (no trailing
newline when appended), so proxy middleware got empty secret and rejected
all /api/internal/validate-* calls → rewrote every /client/* request to
/not-found without running the page component.
2026-05-23 09:03:06 +02:00
simone
25ae19c9d2
debug: page-level file logging
2026-05-22 20:34:19 +02:00
simone
bc2fcc8670
debug: add generateMetadata log
...
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com >
2026-05-22 18:54:58 +02:00
simone
fca86fde73
debug: log token param in ClientPage
...
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com >
2026-05-22 18:44:56 +02:00
simone
e6a9774cfe
fix(04-05): three post-deploy bug fixes
...
- Admin client list: remove Timer column, rename Acconto→Importo incassato
and Saldo→Importo da saldare (calculated from payment amounts, not badges)
- Project workspace timer: pass projectId prop to TimerCell so it calls
startTimer(projectId) directly instead of startTimerForClient(projectId)
which was failing with "nessun progetto trovato"
- Public client page: pass client.token (real DB token) not the URL path
segment (which may be a slug) to ClientDashboard → fixes approve/chat APIs
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com >
2026-05-22 12:13:31 +02:00
simone
5d785a1c1c
feat(04-04): slug resolution + multi-project client dashboard + slug edit
...
- validate-slug API route: resolves clients.slug for Edge middleware
- proxy.ts: slug-first resolution (D-06) — tries slug then falls back to token
- client-view.ts: complete rewrite — getClientWithProjectsByToken + getProjectView
- No quote_items, no payment amounts in client API (CLAUDE.md security invariants)
- client/[token]/page.tsx: multi-project dashboard — 1 project = direct view,
2+ projects = shadcn Tabs with project names (D-09/D-10)
- edit/page.tsx: slug field with link preview + unique constraint error handling
- actions.ts: updateClient now persists slug, redirects on success/slug_taken
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com >
2026-05-22 11:31:32 +02:00
simone
5bf5dfce71
infra(04-00): route /c/ → /client/, Dockerfile, Gitea deploy
...
- Rename src/app/c/[token] → src/app/client/[token]
- Update proxy.ts, ClientRow, admin client detail with /client/ path
- Add output: "standalone" to next.config.ts for Docker build
- Add Dockerfile (multi-stage, node:20-alpine) and .dockerignore
- Push schema to Coolify Postgres via SSH tunnel (drizzle-kit push ✓)
- Update CLAUDE.md constraint 4 to reflect /client/ route
- Add Phase 4 planning artifacts (04-00, 04-RESEARCH, 04-PATTERNS)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com >
2026-05-21 16:12:05 +02:00