[CLAUDE] FE-User+FE-Admin: cay 4 folder GD duoi tung goi thau (Duyet NCC / Ke hoach HD / Duyet HD / HD cung) x2 app + 5 fix review F-1/3/4/6/7
All checks were successful
Deploy SOLUTION_ERP / build-deploy (push) Successful in 5m50s

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
pqhuy1987
2026-07-30 10:04:32 +07:00
parent 8eba1379b2
commit bfc7b79f72
17 changed files with 1839 additions and 12 deletions

View File

@ -29,6 +29,8 @@ import { PeDetailTabs } from '@/components/pe/PeDetailTabs'
import { PeUrgentChips } from '@/components/pe/PeUrgentChips'
import { PeFinalizeChip } from '@/components/pe/PeFinalizeChip'
import { PeWorkflowPanel } from '@/components/pe/PeWorkflowPanel'
import { PipelineStageFolders } from '@/components/pipeline/PipelineStageFolders'
import { usePipelineStages } from '@/hooks/usePipelineStages'
export function PurchaseEvaluationsListPage() {
const qc = useQueryClient()
@ -47,6 +49,14 @@ export function PurchaseEvaluationsListPage() {
const selectedId = sp.get('id')
const isExpand = sp.get('expand') === '1' // S79 — overlay mở rộng
// [S162] Nguồn 4 folder giai đoạn dưới từng gói thầu (GĐ2 KHKK / GĐ3 HĐ /
// GĐ4 HĐ cứng). Hook tự gate quyền TRƯỚC khi fetch — không quyền thì không
// gọi API, folder hiện dạng khoá.
const { buildStages } = usePipelineStages()
// Đang lọc (tìm kiếm / trạng thái / "Chờ tôi" / "Đã xóa") ⇒ chỉ hiện folder
// CÓ nội dung khớp, tránh đổ 4 folder rỗng dưới mọi gói thầu.
const filterActive = search.trim() !== '' || phase !== '' || pendingMe || deletedView
// Mig 23 — list quy trình duyệt V2 cho dropdown filter (filter theo type screen)
const approvalWorkflows = useQuery({
queryKey: ['approval-workflows-v2-filter', typeFilter],
@ -507,7 +517,12 @@ export function PurchaseEvaluationsListPage() {
<span className={cn('flex-1 truncate text-[12px]', wg.workItemId ? 'font-medium text-slate-700' : 'italic text-slate-400')}>{wg.workItemName}</span>
<span className="rounded bg-slate-100 px-1.5 py-0.5 text-[10px] text-slate-600">{wg.items.length}</span>
</summary>
<ul className="ml-3 divide-y divide-slate-100 border-l border-slate-200">
{/* [S162] 4 folder giai đoạn dưới GÓI THẦU (owner chốt AskUser 30-07).
Khối <li> phiếu bên dưới GIỮ NGUYÊN từng byte — kể cả thụt lề — để
diff chứng minh không đụng behavior chọn phiếu / chip GẤP / nút
"Xem mở rộng"; nó chỉ được RE-PARENT vào folder GĐ1 "Duyệt NCC". */}
<PipelineStageFolders className="ml-3 border-l border-slate-200" currentStage={1} hideEmpty={filterActive} stages={buildStages(wg.items, { stage1Content: (
<ul className="divide-y divide-slate-100">
{wg.items.map(p => (
<li key={p.id}>
{/* S79 — dòng phiếu: vùng bấm chính (chọn → inline) + nút
@ -607,6 +622,7 @@ export function PurchaseEvaluationsListPage() {
</li>
))}
</ul>
) })} />
</details>
)
})}