이호영 이호영 7 days ago
fix: 권리처리 유형변경 건수 카드 표시
@490e79ee99f37e5238d9310119440e5b18d928ca
frontend/src/components/RightsDashboard.test.tsx
--- frontend/src/components/RightsDashboard.test.tsx
+++ frontend/src/components/RightsDashboard.test.tsx
@@ -33,6 +33,8 @@
   it('기관 검색과 상태 필터가 동작한다', async () => {
     render(<RightsDashboard mode="process" onOpenOrg={() => {}} />)
     await screen.findByText('완료기관')
+    expect(screen.getByText('유형변경 건수')).toBeTruthy()
+    expect(screen.getByText('기존 유형과 최종 판정 유형이 다른 건')).toBeTruthy()
     fireEvent.change(screen.getByLabelText('기관명 검색'), { target: { value: '대기' } })
     expect(screen.queryByText('완료기관')).toBeNull()
     expect(screen.getByText('대기기관')).toBeTruthy()
frontend/src/components/RightsDashboard.tsx
--- frontend/src/components/RightsDashboard.tsx
+++ frontend/src/components/RightsDashboard.tsx
@@ -113,13 +113,14 @@
         ))}
       </section>
 
-      <section className="mt-3 grid gap-3 lg:grid-cols-[1.2fr_1fr_1fr]">
+      <section className={`mt-3 grid gap-3 ${isReview ? 'lg:grid-cols-[1.2fr_1fr_1fr]' : 'lg:grid-cols-[1.1fr_1fr_1fr_1fr]'}`}>
         <article className="flex items-center gap-5 rounded-lg border border-gray-200 bg-white p-5 shadow-sm">
           <ProgressRing done={done} total={total} color={accent} />
           <div><p className="text-xs font-medium text-gray-500">전체 진행률</p><p className="mt-1 text-lg font-bold">{rate}%</p><p className="mt-2 text-xs text-gray-500">잔여 {format(remaining)}건</p></div>
         </article>
         <article className="rounded-lg border border-gray-200 bg-white p-5 shadow-sm"><p className="text-xs font-medium text-gray-500">대상 기관</p><p className="mt-2 text-2xl font-bold tabular-nums">{orgsWithWork}</p><p className="mt-2 text-xs text-gray-500">{title} 자료가 등록된 기관</p></article>
         <article className="rounded-lg border border-gray-200 bg-white p-5 shadow-sm"><p className="text-xs font-medium text-gray-500">진행 기관</p><p className="mt-2 text-2xl font-bold tabular-nums">{data.orgs.filter((row) => { const t=isReview?row.reviewTotal:row.processTotal; const d=isReview?row.reviewDone:row.processDone; return d>0&&d<t }).length}</p><p className="mt-2 text-xs text-gray-500">일부 처리가 완료된 기관</p></article>
+        {!isReview && <article className="rounded-lg border border-gray-200 bg-white p-5 shadow-sm"><p className="text-xs font-medium text-gray-500">유형변경 건수</p><p className="mt-2 text-2xl font-bold tabular-nums text-pink-600">{format(rights?.changedKoglCount ?? 0)}</p><p className="mt-2 text-xs text-gray-500">기존 유형과 최종 판정 유형이 다른 건</p><div className="mt-3 h-1 rounded-full bg-gray-200"><div className="h-full rounded-full bg-pink-500" style={{width:`${total ? Math.min((rights?.changedKoglCount ?? 0)/total*100,100) : 0}%`}} /></div></article>}
       </section>
 
       {rights && (isReview ? (
Add a comment
List