콘솔 구조 개편 — 시나리오 4분면 선택·상품 정보 섹션·체크 스텝퍼·긴장도 구간 게이지
- 협상 케이스를 4분면(매출 규모×경쟁 강도) 시나리오 A/B/D/C 그리드로 교체 - 상품 정보 섹션 신설: 공급가·인터넷 최저가·공급 유형·거래 기간·응답률/VOC 이동 - 가격 패널 하단(시나리오·최저가·내부기준 문구) 제거 - 협상 진행을 체크 원형 세로 스텝퍼로 교체 - 긴장도를 3구간(낮음·보통·높음) 게이지로, 페르소나를 구간 결과로 묶어 인과 표시 - 차트 첫 제안 점 값 라벨의 좌측 클립 보정 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01UFZ7JWdwCaQAwNYJErL8pP
This commit is contained in:
1 parent
66c0429ea2
commit
2e5fefada7
3 files changed
+141
-81
No files matched your search
@@ -1,5 +1,13 @@
|
||||
import { DIST_LABEL, type DemoCase } from '../content/cases'
|
||||
|
||||
// 시나리오 4분면 — 행: 매출 규모(높음/낮음), 열: 경쟁 강도(높음/낮음)
|
||||
const QUADRANTS = [
|
||||
{ scenario: 'Scenario_A', letter: 'A', axis: '매출 높음 · 경쟁 높음' },
|
||||
{ scenario: 'Scenario_B', letter: 'B', axis: '매출 높음 · 경쟁 낮음' },
|
||||
{ scenario: 'Scenario_D', letter: 'D', axis: '매출 낮음 · 경쟁 높음' },
|
||||
{ scenario: 'Scenario_C', letter: 'C', axis: '매출 낮음 · 경쟁 낮음' },
|
||||
]
|
||||
|
||||
export function CasePanel({
|
||||
cases, selected, started, busy, onStart,
|
||||
}: {
|
||||
@@ -13,51 +21,68 @@ export function CasePanel({
|
||||
<aside className="flex flex-col gap-4 min-[960px]:min-h-0 min-[960px]:overflow-y-auto">
|
||||
<section className="rounded-box bg-base-100 p-5">
|
||||
<h2 className="text-xs font-semibold text-base-content/55">협상 케이스</h2>
|
||||
<ul className="mt-3 flex flex-col gap-1.5">
|
||||
{cases.map((c) => {
|
||||
<div className="mt-3 grid grid-cols-2 gap-2">
|
||||
{QUADRANTS.map((q) => {
|
||||
const c = cases.find((x) => x.scenario === q.scenario)
|
||||
if (!c) return null
|
||||
const active = started && c.id === selected.id
|
||||
return (
|
||||
<li key={c.id}>
|
||||
<button
|
||||
type="button"
|
||||
disabled={busy}
|
||||
onClick={() => onStart(c)}
|
||||
aria-pressed={active}
|
||||
className={`w-full cursor-pointer rounded-field p-3 text-left transition-colors focus-visible:ring-2 focus-visible:ring-primary focus-visible:outline-none ${
|
||||
active ? 'bg-primary/8 ring-1 ring-primary/30' : 'hover:bg-base-200'
|
||||
} ${busy ? 'opacity-60' : ''}`}
|
||||
>
|
||||
<div className="flex items-center justify-between gap-2">
|
||||
<span className={`text-sm font-bold ${active ? 'text-primary' : ''}`}>{c.item_name}</span>
|
||||
<span className="shrink-0 rounded-full bg-base-200 px-2 py-0.5 text-[10px] font-medium text-base-content/55">
|
||||
{c.label}
|
||||
</span>
|
||||
</div>
|
||||
<div className="num mt-1 text-xs text-base-content/55">
|
||||
기존 공급가 <span className="font-semibold text-base-content/80">{c.item_price.toLocaleString()}원</span>
|
||||
</div>
|
||||
{active && (
|
||||
<dl className="mt-2.5 grid grid-cols-2 gap-x-2 gap-y-1 border-t border-primary/15 pt-2.5 text-[11px]">
|
||||
<dt className="text-base-content/50">공급 유형</dt>
|
||||
<dd className="text-right font-medium">{DIST_LABEL[c.dist]} · {c.partners_yn}</dd>
|
||||
<dt className="text-base-content/50">거래 기간</dt>
|
||||
<dd className="num text-right font-medium">{c.card_data.trading_period}년</dd>
|
||||
<dt className="text-base-content/50">응답률 / VOC</dt>
|
||||
<dd className="num text-right font-medium">{c.card_data.response_rate}% / {c.card_data.voc_count}건</dd>
|
||||
</dl>
|
||||
)}
|
||||
</button>
|
||||
</li>
|
||||
<button
|
||||
key={q.scenario}
|
||||
type="button"
|
||||
disabled={busy}
|
||||
onClick={() => onStart(c)}
|
||||
aria-pressed={active}
|
||||
className={`cursor-pointer rounded-field p-3 text-left transition-colors focus-visible:ring-2 focus-visible:ring-primary focus-visible:outline-none ${
|
||||
active ? 'bg-primary/8 ring-1 ring-primary/30' : 'bg-base-200/60 hover:bg-base-200'
|
||||
} ${busy ? 'opacity-60' : ''}`}
|
||||
>
|
||||
<div className="flex items-baseline gap-1.5">
|
||||
<span className={`text-lg font-extrabold ${active ? 'text-primary' : ''}`}>{q.letter}</span>
|
||||
<span className="text-[10px] font-medium text-base-content/45">시나리오</span>
|
||||
</div>
|
||||
<p className="mt-0.5 text-[10px] leading-tight text-base-content/50">{q.axis}</p>
|
||||
<p className={`mt-1.5 truncate text-xs font-semibold ${active ? 'text-primary' : 'text-base-content/80'}`}>
|
||||
{c.item_name}
|
||||
</p>
|
||||
</button>
|
||||
)
|
||||
})}
|
||||
</ul>
|
||||
</div>
|
||||
{!started && (
|
||||
<p className="mt-3 text-xs leading-relaxed text-base-content/50">
|
||||
케이스를 선택하면 협상이 시작됩니다. 챗봇은 구매 담당자(MD) 역할이고,
|
||||
시나리오를 선택하면 협상이 시작됩니다. 챗봇은 구매 담당자(MD) 역할이고,
|
||||
당신은 공급사로서 가격 제안에 응답합니다.
|
||||
</p>
|
||||
)}
|
||||
</section>
|
||||
|
||||
<section className="rounded-box bg-base-100 p-5">
|
||||
<h2 className="text-xs font-semibold text-base-content/55">상품 정보</h2>
|
||||
<p className="mt-2 text-sm font-bold">{selected.item_name}</p>
|
||||
<dl className="mt-3 flex flex-col gap-2 text-xs">
|
||||
<div className="flex items-center justify-between gap-2">
|
||||
<dt className="text-base-content/50">기존 공급가</dt>
|
||||
<dd className="num font-semibold">{selected.item_price.toLocaleString()}원</dd>
|
||||
</div>
|
||||
<div className="flex items-center justify-between gap-2">
|
||||
<dt className="text-base-content/50">인터넷 최저가</dt>
|
||||
<dd className="num font-semibold">{selected.card_data.internet_min_price.toLocaleString()}원</dd>
|
||||
</div>
|
||||
<div className="flex items-center justify-between gap-2">
|
||||
<dt className="text-base-content/50">공급 유형</dt>
|
||||
<dd className="font-medium">{DIST_LABEL[selected.dist]} · 협력사 {selected.partners_yn}</dd>
|
||||
</div>
|
||||
<div className="flex items-center justify-between gap-2">
|
||||
<dt className="text-base-content/50">거래 기간</dt>
|
||||
<dd className="num font-medium">{selected.card_data.trading_period}년</dd>
|
||||
</div>
|
||||
<div className="flex items-center justify-between gap-2">
|
||||
<dt className="text-base-content/50">응답률 / VOC</dt>
|
||||
<dd className="num font-medium">{selected.card_data.response_rate}% / {selected.card_data.voc_count}건</dd>
|
||||
</div>
|
||||
</dl>
|
||||
</section>
|
||||
</aside>
|
||||
)
|
||||
}
|
||||
Reference in new issue
Block a user