feat(CC-087): add Document Inbox placeholder (Paperless-ngx setup steps + architecture)
This commit is contained in:
parent
1e995ae12a
commit
a773675f25
1 changed files with 75 additions and 0 deletions
75
src/app/dashboard/documents/inbox/page.tsx
Normal file
75
src/app/dashboard/documents/inbox/page.tsx
Normal file
|
|
@ -0,0 +1,75 @@
|
||||||
|
'use client';
|
||||||
|
|
||||||
|
import Link from 'next/link';
|
||||||
|
|
||||||
|
const SETUP_STEPS = [
|
||||||
|
{ n: 1, label: 'Paperless-ngx server activ', status: 'done', desc: 'Paperless-ngx rulează pe serverul Hetzner (port 8010).' },
|
||||||
|
{ n: 2, label: 'Webhook POST configurat', status: 'todo', desc: 'În Paperless-ngx → Settings → Workflows → adaugă webhook POST la ceo-api /v1/data-sources/paperless/webhook.' },
|
||||||
|
{ n: 3, label: 'Adapter ceo-api', status: 'todo', desc: 'Endpoint /v1/documents/inbox care consumă webhook-ul și creează documente în CEO OS.' },
|
||||||
|
{ n: 4, label: 'UI Document Inbox', status: 'planned', desc: 'Lista documentelor primite cu preview, tag automat, și flux de aprobare.' },
|
||||||
|
];
|
||||||
|
|
||||||
|
export default function DocumentInboxPage() {
|
||||||
|
return (
|
||||||
|
<div className="max-w-3xl space-y-6 p-6">
|
||||||
|
<div>
|
||||||
|
<nav className="text-xs text-ink-faint mb-1">
|
||||||
|
<Link href="/dashboard/documents" className="hover:underline">Documente</Link> / Inbox
|
||||||
|
</nav>
|
||||||
|
<h1 className="font-display text-2xl font-semibold text-ink">Document Inbox</h1>
|
||||||
|
<p className="text-sm text-ink-faint mt-1">Documente scanate și procesate automat din Paperless-ngx.</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div className="card p-4 bg-warn/5 border-warn/30 space-y-1">
|
||||||
|
<p className="text-xs font-semibold text-warn">Paperless-ngx neconectat</p>
|
||||||
|
<p className="text-xs text-ink-faint">
|
||||||
|
Paperless-ngx rulează pe server (port 8010) dar nu este conectat la ceo-api.
|
||||||
|
Configurează webhook-ul pentru a activa inbox-ul automat.
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{/* Setup steps */}
|
||||||
|
<div className="space-y-3">
|
||||||
|
<p className="text-xs font-semibold uppercase tracking-wider text-ink-faint">Pași de configurare</p>
|
||||||
|
{SETUP_STEPS.map((step) => (
|
||||||
|
<div key={step.n} className="card p-4 flex items-start gap-4">
|
||||||
|
<div className={`w-7 h-7 rounded-full flex items-center justify-center text-xs font-bold shrink-0 ${
|
||||||
|
step.status === 'done' ? 'bg-signal-ok/20 text-signal-ok' :
|
||||||
|
step.status === 'todo' ? 'bg-warn/20 text-warn' :
|
||||||
|
'bg-muted text-ink-faint'}`}>
|
||||||
|
{step.status === 'done' ? '✓' : step.n}
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<p className="text-sm font-medium text-ink">{step.label}</p>
|
||||||
|
<p className="text-[10px] text-ink-faint mt-0.5">{step.desc}</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
))}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{/* Architecture */}
|
||||||
|
<div className="card p-4 space-y-3">
|
||||||
|
<p className="text-xs font-semibold text-ink">Flux de date planificat</p>
|
||||||
|
<div className="space-y-1 text-[10px] text-ink-faint font-mono">
|
||||||
|
{[
|
||||||
|
'Scanner → Paperless-ngx (OCR + tagging)',
|
||||||
|
'Paperless-ngx → webhook POST → ceo-api /v1/documents/inbox',
|
||||||
|
'ceo-api → creare document în CEO OS (cu metadate Paperless)',
|
||||||
|
'CEO OS UI → Document Inbox (previzualizare, aprobare, taguri)',
|
||||||
|
].map((line, i) => (
|
||||||
|
<div key={i} className="flex items-center gap-2">
|
||||||
|
<span className="text-primary">{i < 3 ? '→' : '✓'}</span>
|
||||||
|
<span>{line}</span>
|
||||||
|
</div>
|
||||||
|
))}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div className="flex gap-3 flex-wrap text-xs">
|
||||||
|
<Link href="/dashboard/documents" className="text-primary hover:underline">← Toate documentele</Link>
|
||||||
|
<Link href="/dashboard/integrations/documents" className="text-primary hover:underline">Integrare Paperless-ngx →</Link>
|
||||||
|
<Link href="/dashboard/data/ingestion" className="text-primary hover:underline">Ingestie date →</Link>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
}
|
||||||
Loading…
Reference in a new issue