setSearch(e.target.value)}
placeholder="Search transactions"
style={{flex:1, border:'none', outline:'none', fontSize:13, fontFamily:'inherit', color:'hsl(var(--fg))', background:'transparent'}}
/>
setCatFilter(e.target.value)}
style={{height:36, padding:'0 10px', borderRadius:10, border:'1px solid hsl(var(--border))', fontSize:13, fontFamily:'inherit', color:'hsl(var(--fg))', background:'hsl(var(--surface))', cursor:'pointer'}}
>
{categories.map(c => {c} )}
{filtered.length} transactions
{filtered.length === 0 ? (
No transactions match your filter
) : (
Date
Description
Category
Amount
Balance
{filtered.map((t, i) => {
const isCredit = (t.type || '').toLowerCase() === 'credit';
const amt = parseFloat(t.amount) || 0;
const bal = parseFloat(t.balance);
const cat = t.category || 'Uncategorized';
return (
{t.date || '—'}
{t.description || '—'}
{cat}
{isCredit ? '+' : '-'}{fmtAmt(amt, cur)}
{isNaN(bal) ? '—' : fmtAmt(bal, cur)}
);
})}
)}
);
}
function DailyBalancePane() {
const data = Array.from({length:90}, (_,i)=>600+Math.sin(i/8)*80+i*3+Math.random()*40);
return (
Daily closing balance — 90 days
);
}
function CounterpartiesPane() {
const rows = [
{name:'PT BUMI RESOURCES', type:'Business', txns:24, total:'Rp 1.2B', direction:'in'},
{name:'CV KARYA JAYA', type:'Vendor', txns:18, total:'Rp 485M', direction:'out'},
{name:'PT SINAR MAS AGRO', type:'Employer', txns:4, total:'Rp 192M', direction:'in'},
{name:'BCA CREDIT CARD', type:'Card', txns:12, total:'Rp 294M', direction:'out'},
{name:'BNI HOME LOAN', type:'EMI', txns:4, total:'Rp 73M', direction:'out'},
];
return (
Counterparty
Type
Transactions
Volume
{rows.map((r,i)=>(
{r.type}
{r.txns}
{r.direction==='in'?'+':'−'}{r.total}
))}
);
}
function CamPane() {
return (
Credit Appraisal Memo
Generated Apr 21, 2026 · Model v2.1
Executive Summary
Borrower demonstrates a consistent inflow pattern with an average daily balance of Rp 842M over 90 days. Stable business income from PT BUMI RESOURCES accounts for 48% of credits. Two cheque returns in the period warrant a soft enquiry. Overall cashflow profile is supportive of the proposed facility.
{[
{h:'Cashflow Analysis', b:'Net cashflow positive in 11 of 12 months. Inflow concentration from 3 counterparties (72%) is within acceptable limits for SME lending. No material seasonality observed.'},
{h:'Obligation Servicing', b:'Existing EMI commitments total Rp 73M/month (BNI Home Loan) with 100% on-time servicing. Credit card utilisation averaged 34% with full-payment behaviour.'},
{h:'Red Flags', b:'Four round-number deposits of Rp 100M detected between Feb 8–11; review recommended. Two cheque returns in the period (Rp 20.7M total). No adverse bureau record identified.'},
{h:'Recommendation', b:'APPROVE with a facility size up to Rp 5.2B, 24-month tenor, at a contracted rate of 11.5% p.a. Condition: quarterly bank statement refresh.'},
].map((s,i)=>(
))}
Credit score
Ratios
{[['DSCR','1.86','success'],['Debt/Income','0.24','success'],['Cash buffer','3.2 mo','brand'],['Inflow stability','Low Var','success']].map(([l,v,t])=>
{l}
{v}
)}
}>Approve & issue term sheet
Return for more info
);
}
// ——— Credit Bureau ———
function CreditBureauReport({onBack}) {
return (
Credit Bureau Report
Completed
Borrower BRW-2931 · Budi Santoso · CIBIL + Experian
} size="sm">Download PDF
CIBIL Score
782
Excellent
Credit Utilisation
24%
Healthy
Active accounts
6
3 CC
2 Loans
1 Home
Payment history — 24 months
{Array.from({length:24}).map((_,i)=>{
const v = i===7?'30':i===15?'30':'OK';
return
{v==='OK'?'':v}
;
})}
Apr 2024 Apr 2025 Apr 2026
);
}
// ——— Invoice ———
function InvoiceReport({onBack}) {
return (
Invoice Analysis
Completed
Invoice #INV-2024-8842 · PT Sinar Mas Agro
} size="sm">Export
Supplier
PT Karya Manufaktur Indonesia
Jl. Sudirman Kav. 52, Jakarta 12190 NPWP: 01.234.567.8-901.000
Buyer
PT Sinar Mas Agro
Jl. Thamrin No. 51, Jakarta 10350 NPWP: 02.345.678.9-012.000
Item
Qty
Rate
Amount
{[['Palm oil refinery equipment — Module A',2,'85,000,000','170,000,000'],['Installation & commissioning',1,'42,500,000','42,500,000'],['Training (on-site, 5 days)',1,'18,000,000','18,000,000'],['Spare parts kit',3,'18,000,000','54,000,000']].map((r,i)=>(
{r[0]}
{r[1]}
Rp {r[2]}
Rp {r[3]}
))}
Extraction confidence
All fields extracted. Manual review recommended for 2 line items.
Cross-checks
{[['NPWP format','pass'],['GST calculation','pass'],['Sum of line items','pass'],['Duplicate invoice','warn']].map(([l,s])=>
)}
);
}
// ——— Admin / Team ———
function AdminTeam() {
const members = [
{name:'Fina Lestari', email:'fina.lestari@bankx.id', role:'Admin', last:'Active now'},
{name:'Aditya Rahman', email:'aditya.rahman@bankx.id', role:'Analyst', last:'12 min ago'},
{name:'Siti Nuraini', email:'siti.n@bankx.id', role:'Analyst', last:'2 hours ago'},
{name:'Rendra Pratama', email:'rendra.p@bankx.id', role:'Viewer', last:'Yesterday'},
{name:'Dewi Kusuma', email:'dewi.k@bankx.id', role:'Analyst', last:'3 days ago'},
];
return (
Members
5 / 15
Active today
3
Plan
Growth
Pro-rated billing
Name
Role
Last active
{members.map((m,i)=>(
{m.role}
{m.last}
))}
);
}
// ——— Borrowers ———
function BorrowersList({ borrowers }) {
const list = borrowers || [];
if (borrowers === undefined) return (
Loading borrowers…
);
if (list.length === 0) return (
No borrowers yet.
);
return (
{list.map((b) => (
{b.total_sessions ?? 0} sessions
{(b.completed_sessions ?? 0) > 0 && {b.completed_sessions} completed }
))}
);
}
// ——— Logout confirmation ———
function LogoutConfirm({onCancel, onConfirm}) {
return (
Log out of CredNX?
You'll need to sign in again to access your sessions. Any in-progress uploads will continue in the background.
Cancel
}>Log out
);
}
Object.assign(window, { Bars, Line, Donut, KPI, BankStatementReport, CreditBureauReport, InvoiceReport, AdminTeam, BorrowersList, LogoutConfirm });