[CLAUDE] FE-User: PE + HĐ toggle "Nhập tay" + 2 fields manual budget mirror fe-admin
Chunk 4/5 — mirror y hệt Chunk 3 sang fe-user (rule §3.9 duplicate có chủ đích).
Files:
~ fe-user/src/types/purchaseEvaluation.ts — PeDetailBundle +2 field
~ fe-user/src/types/contracts.ts — ContractDetail +2 field
~ fe-user/src/components/pe/PeHeaderForm.tsx (copy từ fe-admin)
~ fe-user/src/components/pe/PeDetailTabs.tsx — Section "b. Ngân sách"
fallback display khi !ev.budget + có manual data
~ fe-user/src/pages/pe/PurchaseEvaluationCreatePage.tsx (copy refactor wrap)
~ fe-user/src/pages/contracts/ContractCreatePage.tsx — toggle pattern cho
NewContractForm + EditContractForm (giống fe-admin)
Verify: npm run build fe-user pass · 1904 modules · 0 TS error.
Next: Chunk 5 docs + push.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@ -343,6 +343,17 @@ function ChonNccSection({ ev, readOnly = false }: { ev: PeDetailBundle; readOnly
|
||||
{' · '}{ev.budget.tenNganSach}
|
||||
{' · '}<span className="text-slate-500">{ev.budget.tongNganSach.toLocaleString('vi-VN')} đ</span>
|
||||
</a>
|
||||
) : ev.budgetManualAmount != null || ev.budgetManualName ? (
|
||||
// Mig 17 — manual budget fallback: hiển thị tên + số tiền nhập tay,
|
||||
// không phải link vào /budgets/{id} (không có Budget entity).
|
||||
<span className="text-slate-700">
|
||||
{ev.budgetManualName && <span>{ev.budgetManualName}</span>}
|
||||
{ev.budgetManualName && ev.budgetManualAmount != null && ' · '}
|
||||
{ev.budgetManualAmount != null && (
|
||||
<span className="font-semibold text-slate-900">{ev.budgetManualAmount.toLocaleString('vi-VN')} đ</span>
|
||||
)}
|
||||
<span className="ml-2 rounded bg-slate-100 px-1.5 py-0.5 text-[10px] text-slate-500">nhập tay</span>
|
||||
</span>
|
||||
) : <span className="text-slate-400">— (chưa link)</span>}
|
||||
/>
|
||||
<FormRow
|
||||
|
||||
Reference in New Issue
Block a user