From 9d13809d0169f2f1686007eb175ac8cd228e2078 Mon Sep 17 00:00:00 2001 From: bicochan Date: Mon, 13 Jul 2026 14:28:10 +0900 Subject: [PATCH] =?UTF-8?q?[as]=20feat:=20=EC=B2=B4=ED=81=AC=EB=A6=AC?= =?UTF-8?q?=EC=8A=A4=ED=8A=B8=20=ED=95=AD=EB=AA=A9=20=EA=B4=80=EB=A6=AC?= =?UTF-8?q?=EC=97=90=20'=EC=A0=95=EB=A0=AC=20=EC=88=9C=EC=84=9C'=20?= =?UTF-8?q?=EC=BB=AC=EB=9F=BC=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../model/build-rvw-display-rows.ts | 16 +++++----------- .../checklist-management/ui/cklst-rvw-grid.tsx | 12 +++++++----- .../checklist-management/ui/cklst-rvw-row.tsx | 14 ++++++++++++++ 3 files changed, 26 insertions(+), 16 deletions(-) diff --git a/apps/as/src/pages/checklist-management/model/build-rvw-display-rows.ts b/apps/as/src/pages/checklist-management/model/build-rvw-display-rows.ts index f82fc9a96..55e0250bc 100644 --- a/apps/as/src/pages/checklist-management/model/build-rvw-display-rows.ts +++ b/apps/as/src/pages/checklist-management/model/build-rvw-display-rows.ts @@ -49,21 +49,15 @@ export function formatTreeBranchPrefix(depth: number): string { return ""; } -function compareSortSeq(a: CklstRvwRow, b: CklstRvwRow): number { - return (a.sortSeq ?? 0) - (b.sortSeq ?? 0); -} - export function buildRvwDisplayRows(rows: CklstRvwRow[]): CklstRvwDisplayRow[] { const result: CklstRvwDisplayRow[] = []; - const roots = rows - .filter((row) => (row.rvwCnLvNo ?? 1) === 1 && row.upCklstRvwSn == null) - .sort(compareSortSeq); + const roots = rows.filter((row) => (row.rvwCnLvNo ?? 1) === 1 && row.upCklstRvwSn == null); function appendSubtree(parent: CklstRvwRow, depth: number) { - const children = rows - .filter((row) => row.upCklstRvwSn != null && row.upCklstRvwSn === parent.cklstRvwSn) - .sort(compareSortSeq); + const children = rows.filter( + (row) => row.upCklstRvwSn != null && row.upCklstRvwSn === parent.cklstRvwSn, + ); for (const child of children) { result.push({ row: child, depth }); @@ -82,7 +76,7 @@ export function buildRvwDisplayRows(rows: CklstRvwRow[]): CklstRvwDisplayRow[] { (row) => !result.some((display) => display.row.rowKey === row.rowKey), ); - for (const orphan of orphans.sort(compareSortSeq)) { + for (const orphan of orphans) { result.push({ row: orphan, depth: Math.max(0, (orphan.rvwCnLvNo ?? 1) - 1) }); } diff --git a/apps/as/src/pages/checklist-management/ui/cklst-rvw-grid.tsx b/apps/as/src/pages/checklist-management/ui/cklst-rvw-grid.tsx index 7b44ba2b5..bf9884324 100644 --- a/apps/as/src/pages/checklist-management/ui/cklst-rvw-grid.tsx +++ b/apps/as/src/pages/checklist-management/ui/cklst-rvw-grid.tsx @@ -279,12 +279,13 @@ function CklstRvwGrid({ selectedCklst }: CklstRvwGridProps) { ) : ( - - - - + + + + + - + @@ -292,6 +293,7 @@ function CklstRvwGrid({ selectedCklst }: CklstRvwGridProps) { 주요 검토내용 사용 여부 체크 사용 + 정렬 순서 구분 관리 diff --git a/apps/as/src/pages/checklist-management/ui/cklst-rvw-row.tsx b/apps/as/src/pages/checklist-management/ui/cklst-rvw-row.tsx index c8bc7cb76..c31a6ee2a 100644 --- a/apps/as/src/pages/checklist-management/ui/cklst-rvw-row.tsx +++ b/apps/as/src/pages/checklist-management/ui/cklst-rvw-row.tsx @@ -107,6 +107,20 @@ function CklstRvwRowComponent({ + + + onChange({ + sortSeq: e.target.value ? Number(e.target.value) : undefined, + isDirty: true, + }) + } + className="w-20" + /> + {levelLabel}