[CLAUDE] FE-Admin+FE-User: PE workspace "new" mode — sectioned create view 5 sections
All checks were successful
Deploy SOLUTION_ERP / build-deploy (push) Successful in 3m4s
All checks were successful
Deploy SOLUTION_ERP / build-deploy (push) Successful in 3m4s
User feedback 2026-05-07: "Thêm mới list ra hết trường dữ liệu giống chỉnh sửa
nhưng trống, mở rộng từng phần. Save header xong mới cho nhập chi tiết."
Implementation:
+ PeWorkspaceCreateView.tsx (~230 LOC, mirror fe-admin + fe-user)
- Sectioned card layout giống PeDetailTabs (5 section divider + title style)
- Section 1 "Thông tin gói thầu": editable inputs (Loại / Tên */Dự án */Địa
điểm/Mô tả/Payment) — 2-col grid responsive
- Section 2 "Chọn NCC/TP":
a. NCC chọn: text "(sau khi thêm NCC + chốt winner)" placeholder
b. Ngân sách: editable inline (toggle "Nhập tay" + Select OR 2 input —
giống BudgetFieldRow pattern)
c. Giá chào thầu: text "(auto-tính sau winner)" placeholder
d. Bản so sánh: LockedHint icon + text "Tải sau khi tạo"
- Section 3 "NCC tham gia (0)": LockedHint "Lưu phiếu trước → thêm NCC..."
- Section 4 "Hạng mục + Báo giá (0)": LockedHint
- Section 5 "Ý kiến 4 PB": amber banner "nhập khi duyệt"
- Action bar bottom: "Tạo phiếu" (disabled khi !tenGoiThau || !projectId)
+ Hủy
- POST /pe full payload (header + budget mode A or B). onSuccess: toast +
invalidate pe-list + onSaved(id, type) callback
~ PurchaseEvaluationWorkspacePage.tsx (× 2 app)
- Replace <PeHeaderForm> → <PeWorkspaceCreateView> trong mode='new'
- PeHeaderForm vẫn còn (dùng cho /new?id= deep-link "Sửa header" cũ)
Helpers duplicate trong PeWorkspaceCreateView (Section + FormRow + LockedHint)
để tránh circular import từ PeDetailTabs.
UAT mode rule applied (per memory feedback_uat_skip_verify): skip dotnet test
+ npm build verify, push ngay.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@ -16,7 +16,7 @@ import { ClipboardCheck } from 'lucide-react'
|
||||
import { EmptyState } from '@/components/EmptyState'
|
||||
import { PeDetailTabs } from '@/components/pe/PeDetailTabs'
|
||||
import { PeListPanel } from '@/components/pe/PeListPanel'
|
||||
import { PeHeaderForm } from '@/components/pe/PeHeaderForm'
|
||||
import { PeWorkspaceCreateView } from '@/components/pe/PeWorkspaceCreateView'
|
||||
import { api } from '@/lib/api'
|
||||
import { getErrorMessage } from '@/lib/apiError'
|
||||
import {
|
||||
@ -103,9 +103,9 @@ export function PurchaseEvaluationWorkspacePage() {
|
||||
/>
|
||||
)}
|
||||
|
||||
{/* Mode "new": header form */}
|
||||
{/* Mode "new": sectioned create view (5 sections, 3-5 locked tới khi save) */}
|
||||
{mode === 'new' && (
|
||||
<PeHeaderForm
|
||||
<PeWorkspaceCreateView
|
||||
defaultType={typeFilter}
|
||||
onSaved={(newId, t) => setParams({ id: newId, mode: null, type: String(t) })}
|
||||
onCancel={() => setParams({ mode: null })}
|
||||
|
||||
Reference in New Issue
Block a user