Treasury & Bank Transfer Management System — سامانه مدیریت خزانهداری و حوالههای بانکی
phase-7-sql-readonly-ux-20261015
ci/public-windows-bridge-probe-20261017
ci/windows-dispatch-bootstrap-20261016
ci/windows-dual-app-lab-20261016
dev/v7-production-failclosed-20261021
feature/reconciliation-guard-20261013
main
phase-1-foundation
phase-1-implementation
phase-2-treasury-core
phase-3-banking-reconciliation
phase-4-operations-enterprise-ux
phase-5-hardening-release
phase-6-production-platform
phase-7-production-infrastructure-bank-golive
phase-7-sql-readonly-ux-20261015
transfer-exe-to-drive-20261006
| 1 | import Link from 'next/link'; |
| 2 | import {getDesktopTreasuryService} from '../../../platform/application/server-service'; |
| 3 | import {createPaymentAction} from '../payment-actions'; |
| 4 | |
| 5 | export const dynamic='force-dynamic'; |
| 6 | |
| 7 | export default async function NewPaymentPage({searchParams}:{searchParams:Promise<{error?:string}>}){ |
| 8 | const params=await searchParams; |
| 9 | const service=getDesktopTreasuryService(); |
| 10 | const accounts=service.listAccounts(); |
| 11 | const beneficiaries=service.listBeneficiaries().filter(b=>b.whitelisted); |
| 12 | const ready=accounts.length>0&&beneficiaries.length>0; |
| 13 | return <div className="form-page"> |
| 14 | <section className="page-head"><div><p className="eyebrow">NEW TRANSFER</p><h2>ثبت حواله جدید</h2><p>اطلاعات حواله را وارد کنید. ارسال بانکی در محیط محلی غیرفعال است و ثبت فقط بهصورت پیشنویس انجام میشود.</p></div><Link className="btn btn-secondary" href="/payments">بازگشت به حوالهها</Link></section> |
| 15 | {!ready&&<div className="alert-banner warning"><strong>پیشنیاز ثبت حواله کامل نیست.</strong><span>ابتدا حداقل یک حساب بانکی و یک طرفحساب مجاز تعریف کنید.</span><div><Link href="/accounts">تعریف حساب</Link><Link href="/beneficiaries">تعریف طرفحساب</Link></div></div>} |
| 16 | {params.error&&<div className="alert-banner danger"><strong>اطلاعات فرم کامل یا معتبر نیست.</strong><span>{params.error}</span></div>} |
| 17 | <form action={createPaymentAction} className="transfer-form panel"> |
| 18 | <div className="form-section"><div className="section-caption"><span>۱</span><div><h3>مبدأ و مقصد</h3><p>حساب برداشت و ذینفع تأییدشده را انتخاب کنید.</p></div></div> |
| 19 | <div className="form-grid two"> |
| 20 | <label><span>حساب مبدأ</span><select name="sourceAccountId" required disabled={!ready}><option value="">انتخاب حساب</option>{accounts.map(a=><option key={a.id} value={a.id}>{a.name} — {a.bankName}</option>)}</select></label> |
| 21 | <label><span>ذینفع</span><select name="beneficiaryId" required disabled={!ready}><option value="">انتخاب طرفحساب</option>{beneficiaries.map(b=><option key={b.id} value={b.id}>{b.name} — {b.iban}</option>)}</select></label> |
| 22 | </div> |
| 23 | </div> |
| 24 | <div className="form-section"><div className="section-caption"><span>۲</span><div><h3>مشخصات پرداخت</h3><p>مبلغ در دیتابیس به ریال نگهداری میشود.</p></div></div> |
| 25 | <div className="form-grid two"> |
| 26 | <label><span>مبلغ (ریال)</span><input name="amountIrr" type="number" min="1" step="1" required inputMode="numeric" placeholder="مثلاً 25000000"/></label> |
| 27 | <label><span>تاریخ پرداخت</span><input name="paymentDate" type="date" required/></label> |
| 28 | <label><span>شماره/مرجع داخلی</span><input name="clientReference" required maxLength={80} placeholder="مثلاً PAY-1405-001"/></label> |
| 29 | <label><span>شرح حواله</span><input name="description" maxLength={240} placeholder="شرح اختیاری"/></label> |
| 30 | </div> |
| 31 | </div> |
| 32 | <div className="form-footer"><div><strong>مرحله بعد</strong><span>حواله بهصورت پیشنویس ثبت میشود و سپس برای تأیید ارسال خواهد شد.</span></div><button className="btn btn-primary" type="submit" disabled={!ready}>ثبت پیشنویس حواله</button></div> |
| 33 | </form> |
| 34 | </div> |
| 35 | } |