feat(discovery): 진단 리포트에서 개선 제안(Action Plan) 단계 분리
증거(진단)와 처방(할 일)을 한 페이지에 두면 스크롤이 너무 길어져 둘 다 읽기 힘들다는 지적에 따라 단계를 나눴다. - /actions/:id 신규: Action Plan(P0~P2) + What We Don't Sell + 빌드 제안 (ActionPlanSection·IntegritySection 신규 컴포넌트, Tag는 두 페이지가 같이 써서 공용 컴포넌트로 뺌) - /discovery/🆔 위 섹션 제거, 진단(점수·근거·Scorecard·Rubric)만 남김. 페이지 맨 아래 중복으로 박혀 있던 확인 항목 패널(ClinicInputsPanel)도 제거 — /supporters/:id 전용 단계가 이미 있어 두 번 보여줄 필요가 없었다 - 진단 데이터가 없는 병원이 /actions/:id 로 오면 /discovery/:id 로 되돌림 - ClinicNav: 5단계로 확장(진단 리포트→개선 제안→사이트 빌드→사진 확인→ 확인 항목), 다음 단계 플로팅 버튼 추가(기존엔 이전 단계만 있었다) - App.tsx: 라우트 전환 시 스크롤을 맨 위로 되돌림. 스크롤을 내린 채 다음 단계를 누르면 새 페이지가 같은 위치(짧으면 빈 하단)에서 시작하던 문제 수정. 인앱 해시 앵커(#breakdown)가 있으면 건드리지 않음 - 사이트 빌드/확인 항목 화면의 미리보기 버튼을 "초안 사이트 열기"로 통일(공개 후에는 "공개본 사이트 열기") Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
1 parent
36731d3ad1
commit
890da0ecdf
10 files changed
+267
-127
No files matched your search
@@ -15,6 +15,7 @@ type Step = { key: string; label: string; to: (id: string) => string; match: Reg
|
||||
|
||||
const STEPS: Step[] = [
|
||||
{ key: 'report', label: '진단 리포트', to: (id) => `/discovery/${id}`, match: /^\/discovery\/[^/]+/ },
|
||||
{ key: 'actions', label: '개선 제안', to: (id) => `/actions/${id}`, match: /^\/actions\/[^/]+/ },
|
||||
{ key: 'build', label: '사이트 빌드', to: (id) => `/build/${id}`, match: /^\/build\/[^/]+/ },
|
||||
{ key: 'images', label: '사진 확인', to: (id) => `/images/${id}`, match: /^\/images\/[^/]+/ },
|
||||
{ key: 'inputs', label: '확인 항목', to: (id) => `/supporters/${id}`, match: /^\/supporters\/[^/]+/ },
|
||||
@@ -32,6 +33,7 @@ export default function ClinicNav({ clinicId }: { clinicId: string }) {
|
||||
const { pathname } = useLocation();
|
||||
const currentIndex = STEPS.findIndex((s) => s.match.test(pathname));
|
||||
const prev = currentIndex > 0 ? STEPS[currentIndex - 1] : null;
|
||||
const next = currentIndex > -1 && currentIndex < STEPS.length - 1 ? STEPS[currentIndex + 1] : null;
|
||||
|
||||
return (
|
||||
<>
|
||||
@@ -87,7 +89,11 @@ export default function ClinicNav({ clinicId }: { clinicId: string }) {
|
||||
</nav>
|
||||
|
||||
{/* 이전 단계로. 상단 절차 메뉴는 좁은 화면에서 가로 스크롤 안으로 밀려 눈에 안 들어온다.
|
||||
되돌아가는 길은 늘 같은 자리에 있어야 한다. 첫 단계에서는 돌아갈 곳이 없어 띄우지 않는다. */}
|
||||
되돌아가는 길은 늘 같은 자리에 있어야 한다. 첫 단계에서는 돌아갈 곳이 없어 띄우지 않는다.
|
||||
|
||||
다음 단계로 가는 길도 같은 이유로 여기에 둔다. 화면마다 따로 심으면 빠지는 곳이 생긴다.
|
||||
실제로 사이트 빌드 화면은 빌드가 끝났을 때만 다음 단계 카드를 그려서, 빌드 중이거나
|
||||
멈췄을 때는 상단 메뉴 말고는 넘어갈 길이 없었다. 마지막 단계에서는 갈 곳이 없어 띄우지 않는다. */}
|
||||
{prev && (
|
||||
<motion.div
|
||||
initial={{ opacity: 0, x: -12 }}
|
||||
@@ -114,6 +120,33 @@ export default function ClinicNav({ clinicId }: { clinicId: string }) {
|
||||
</Link>
|
||||
</motion.div>
|
||||
)}
|
||||
|
||||
{next && (
|
||||
<motion.div
|
||||
initial={{ opacity: 0, x: 12 }}
|
||||
animate={{ opacity: 1, x: 0 }}
|
||||
transition={{ delay: 0.3, duration: 0.3 }}
|
||||
className="fixed right-4 bottom-4 md:right-6 md:bottom-6 z-40"
|
||||
data-no-print
|
||||
>
|
||||
<Link
|
||||
to={next.to(clinicId)}
|
||||
className="group inline-flex items-center gap-2.5 rounded-full bg-gradient-to-r from-[#4F1DA1] to-[#021341] text-white
|
||||
shadow-[0_4px_20px_rgba(29,0,36,0.24)] pl-5 pr-3 py-3 transition-shadow hover:shadow-[0_6px_26px_rgba(29,0,36,0.32)]"
|
||||
>
|
||||
<span className="text-right leading-tight">
|
||||
<span className="block text-[11px] font-semibold text-white/60">다음 단계</span>
|
||||
<span className="block text-sm font-bold whitespace-nowrap">{next.label}</span>
|
||||
</span>
|
||||
<span className="w-7 h-7 rounded-full bg-white/15 flex items-center justify-center
|
||||
transition-colors group-hover:bg-white/25">
|
||||
<svg width="14" height="14" viewBox="0 0 14 14" aria-hidden="true">
|
||||
<path d="M5.1 1.4 10.7 7l-5.6 5.6a1.1 1.1 0 0 1-1.6-1.6L7.5 7l-4-4A1.1 1.1 0 0 1 5.1 1.4Z" fill="currentColor" />
|
||||
</svg>
|
||||
</span>
|
||||
</Link>
|
||||
</motion.div>
|
||||
)}
|
||||
</>
|
||||
);
|
||||
}
|
||||
Reference in new issue
Block a user