/** * 개선 제안(/actions/:id) 1부: 우선순위별 실행 항목. * 원래 진단 리포트 안의 "Action Plan" 섹션이었다. 진단(증거)과 처방(할 일)은 읽는 목적이 달라 * 별도 단계로 뗐다. 내용은 그대로다. */ import { motion } from 'motion/react'; import { SectionWrapper } from '../report/ui/SectionWrapper'; import { Tag } from './Tag'; import type { ActionPriority, DiscoveryResult } from '../../types/discovery'; const PRIORITY_STYLE: Record = { P0: 'bg-[#FFF0F0] text-[#7C3A4B] border-[#F5D5DC]', P1: 'bg-[#FFF6ED] text-[#7C5C3A] border-[#F5E0C5]', P2: 'bg-[#F3F0FF] text-[#4A3A7C] border-[#D5CDF5]', }; const PRIORITY_HEADING: Record = { P0: '즉시: 크롤러 접근·엔티티·측정', P1: '4주 내: 콘텐츠 구조', P2: '지속: 신선도·시딩', }; export function ActionPlanSection({ result }: { result: DiscoveryResult }) { return (
{(['P0', 'P1', 'P2'] as ActionPriority[]).map((p) => (
{p} {PRIORITY_HEADING[p]}
{result.actions.filter((a) => a.priority === p).map((a, i) => (

{a.title}

{a.effort}

{a.detail}

{a.criterionIds.map((cid) => ( {cid} ))}
))}
))}
); }