feat(CC-082): add ERP & Accounting integration (ERPNext adapter guide + restrictions)
This commit is contained in:
parent
5a478cbf4e
commit
3cbdab7541
1 changed files with 67 additions and 0 deletions
67
src/app/dashboard/integrations/erp/page.tsx
Normal file
67
src/app/dashboard/integrations/erp/page.tsx
Normal file
|
|
@ -0,0 +1,67 @@
|
|||
'use client';
|
||||
|
||||
import Link from 'next/link';
|
||||
|
||||
const ERP_ENTITIES = [
|
||||
{ name: 'Factturi', direction: 'ERPNext → CEO OS', desc: 'Facturile emise și primite sunt citite din ERPNext și afișate în Finances.' },
|
||||
{ name: 'Contacte', direction: 'CEO OS ↔ ERPNext', desc: 'Sincronizare bi-direcțională clienți/furnizori. CEO OS este sursa primară.' },
|
||||
{ name: 'Contracte', direction: 'ERPNext → CEO OS', desc: 'Contractele semnate digital în ERPNext sunt preluate în Documents.' },
|
||||
{ name: 'Tranzacții', direction: 'ERPNext → CEO OS', desc: 'Jurnalul contabil este citit read-only pentru vizualizare în Finances.' },
|
||||
];
|
||||
|
||||
export default function ERPIntegrationPage() {
|
||||
return (
|
||||
<div className="max-w-3xl space-y-6 p-6">
|
||||
<div>
|
||||
<h1 className="font-display text-2xl font-semibold text-ink">ERP & Contabilitate</h1>
|
||||
<p className="text-sm text-ink-faint mt-1">Conectare ERPNext prin adapter API. CEO OS nu scrie direct în baza ERP.</p>
|
||||
</div>
|
||||
|
||||
<div className="card p-4 bg-warn/5 border-warn/30 space-y-1">
|
||||
<p className="text-xs font-semibold text-warn">ERPNext rulează pe server — adapter neconectat</p>
|
||||
<p className="text-xs text-ink-faint">
|
||||
ERPNext este instalat pe <code className="bg-muted px-1 rounded">152.53.112.35</code> dar adapterul CEO OS → ERPNext nu este configurat.
|
||||
Sunt necesare: API key ERPNext, endpoint, și maparea câmpurilor.
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div className="card p-4 bg-signal-danger/5 border-signal-danger/30 space-y-1">
|
||||
<p className="text-xs font-semibold text-signal-danger">⛔ Restricție arhitecturală</p>
|
||||
<p className="text-xs text-ink-faint">
|
||||
CEO OS nu scrie niciodată direct în baza de date ERPNext. Toate operațiunile de scriere se fac
|
||||
exclusiv prin ERPNext REST API cu autentificare și audit complet.
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div className="space-y-3">
|
||||
<p className="text-xs font-semibold uppercase tracking-wider text-ink-faint">Entități sincronizate</p>
|
||||
{ERP_ENTITIES.map((e) => (
|
||||
<div key={e.name} className="card p-4 flex items-start gap-4">
|
||||
<div className="flex-1">
|
||||
<p className="text-sm font-medium text-ink">{e.name}</p>
|
||||
<p className="text-[10px] text-ink-faint mt-0.5">{e.desc}</p>
|
||||
</div>
|
||||
<span className="text-[9px] bg-muted text-ink-faint rounded-full px-2 py-0.5 shrink-0 font-mono">{e.direction}</span>
|
||||
</div>
|
||||
))}
|
||||
</div>
|
||||
|
||||
<div className="space-y-3">
|
||||
<p className="text-xs font-semibold uppercase tracking-wider text-ink-faint">Pași configurare adapter</p>
|
||||
{[
|
||||
'Generează API key în ERPNext: Settings → API → Generate Keys',
|
||||
'Configurează endpoint în CEO OS Data Sources: https://erp.boardmind.dev',
|
||||
'Testează conexiunea: GET /api/resource/Customer',
|
||||
'Activează sincronizarea periodică în n8n (cron zilnic, 02:00)',
|
||||
].map((step, i) => (
|
||||
<div key={i} className="flex items-start gap-3">
|
||||
<span className="w-5 h-5 rounded-full bg-muted text-ink-faint text-[10px] flex items-center justify-center shrink-0">{i+1}</span>
|
||||
<p className="text-xs text-ink-faint">{step}</p>
|
||||
</div>
|
||||
))}
|
||||
</div>
|
||||
|
||||
<Link href="/dashboard/integrations" className="text-xs text-primary hover:underline">← Toate integrările</Link>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
Loading…
Reference in a new issue