콘솔 구조 개편 — 시나리오 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
@@ -5,6 +5,14 @@ import { PriceChart } from './PriceChart'
|
||||
|
||||
const FLOW = ['서비스안내', '담당자확인', '협상품목안내', '가격협상', '협상종료']
|
||||
|
||||
// 긴장도 구간 → 응대 페르소나 (엔진 프리셋과 동일한 3구간)
|
||||
const PERSONA_ZONE: Record<string, number> = {
|
||||
'우호적 마무리형': 0,
|
||||
'균형 협상형': 1,
|
||||
'단호한 압박형': 2,
|
||||
}
|
||||
const ZONE_LABELS = ['낮음', '보통', '높음']
|
||||
|
||||
function flowIndex(step: string): number {
|
||||
if (step.includes('종료') || step.includes('완료') || step.includes('실패')) return 4
|
||||
if (step.includes('가격') || step.startsWith('wild_')) return 3
|
||||
@@ -21,6 +29,25 @@ function Panel({ title, children }: { title: string; children: React.ReactNode }
|
||||
)
|
||||
}
|
||||
|
||||
function StepCircle({ state }: { state: 'done' | 'current' | 'todo' }) {
|
||||
if (state === 'done') {
|
||||
return (
|
||||
<span className="flex size-5 shrink-0 items-center justify-center rounded-full bg-primary">
|
||||
<svg viewBox="0 0 10 8" className="w-2.5" aria-hidden>
|
||||
<path d="M1 4l2.5 2.5L9 1" fill="none" stroke="white" strokeWidth="1.8" strokeLinecap="round" strokeLinejoin="round" />
|
||||
</svg>
|
||||
</span>
|
||||
)
|
||||
}
|
||||
return (
|
||||
<span
|
||||
className={`size-5 shrink-0 rounded-full border-2 bg-base-100 ${
|
||||
state === 'current' ? 'border-primary' : 'border-base-300'
|
||||
}`}
|
||||
/>
|
||||
)
|
||||
}
|
||||
|
||||
export function Dashboard({
|
||||
demoCase, nego, meta, priceTrail, started, finalPrice,
|
||||
}: {
|
||||
@@ -34,6 +61,7 @@ export function Dashboard({
|
||||
const fi = started ? flowIndex(nego.step) : -1
|
||||
const tension = meta?.tension ?? null
|
||||
const indicator = meta?.indicator_value ?? null
|
||||
const zone = meta?.persona != null ? PERSONA_ZONE[meta.persona] ?? null : null
|
||||
|
||||
// 합의가가 마지막 제안가와 다르면(1% 추가 네고 등) 차트 종점으로 잇는다
|
||||
const series = finalPrice != null && priceTrail[priceTrail.length - 1] !== finalPrice
|
||||
@@ -61,44 +89,39 @@ export function Dashboard({
|
||||
</span>
|
||||
)}
|
||||
</div>
|
||||
|
||||
<div className="mt-2">
|
||||
<PriceChart demoCase={demoCase} priceTrail={series} />
|
||||
</div>
|
||||
|
||||
<dl className="mt-2 flex items-center justify-between border-t border-base-300/60 pt-3 text-xs">
|
||||
<div className="flex items-center gap-1.5">
|
||||
<dt className="text-base-content/55">시나리오</dt>
|
||||
<dd className="num font-semibold">{demoCase.scenario.replace('Scenario_', '')}</dd>
|
||||
</div>
|
||||
<div className="flex items-center gap-1.5">
|
||||
<dt className="text-base-content/55">인터넷 최저가</dt>
|
||||
<dd className="num font-semibold">{demoCase.card_data.internet_min_price.toLocaleString()}원</dd>
|
||||
</div>
|
||||
</dl>
|
||||
<p className="mt-2 text-[11px] leading-relaxed text-base-content/45">
|
||||
앵커가·목표가는 실제 협상에서 공급사에게 보이지 않는 구매측 내부 기준입니다.
|
||||
</p>
|
||||
</Panel>
|
||||
|
||||
<Panel title="협상 진행">
|
||||
<ol className="flex items-center gap-1">
|
||||
{FLOW.map((s, i) => (
|
||||
<li key={s} className="flex flex-1 flex-col items-center gap-1.5">
|
||||
<div
|
||||
className={`h-1 w-full rounded-full ${
|
||||
i < fi ? 'bg-primary/35' : i === fi ? 'bg-primary' : 'bg-base-200'
|
||||
}`}
|
||||
/>
|
||||
<span
|
||||
className={`text-[10px] ${i === fi ? 'font-semibold text-base-content' : 'text-base-content/45'}`}
|
||||
>
|
||||
{s}
|
||||
</span>
|
||||
</li>
|
||||
))}
|
||||
<ol className="flex flex-col">
|
||||
{FLOW.map((s, i) => {
|
||||
const state = i < fi ? 'done' : i === fi ? 'current' : 'todo'
|
||||
return (
|
||||
<li key={s} className="flex gap-3">
|
||||
<div className="flex flex-col items-center">
|
||||
<StepCircle state={state} />
|
||||
{i < FLOW.length - 1 && (
|
||||
<div className={`w-0.5 flex-1 ${i < fi ? 'bg-primary' : 'bg-base-200'}`} />
|
||||
)}
|
||||
</div>
|
||||
<span
|
||||
className={`pb-4 text-xs leading-5 ${
|
||||
state === 'current'
|
||||
? 'font-bold text-primary'
|
||||
: state === 'done'
|
||||
? 'font-medium text-base-content/80'
|
||||
: 'text-base-content/40'
|
||||
}`}
|
||||
>
|
||||
{s}
|
||||
</span>
|
||||
</li>
|
||||
)
|
||||
})}
|
||||
</ol>
|
||||
<div className="mt-3 flex items-center justify-between text-sm">
|
||||
<div className="mt-1 flex items-center justify-between border-t border-base-300/60 pt-3 text-sm">
|
||||
<span className="text-base-content/55">가격 라운드</span>
|
||||
<span className="num font-semibold">{Math.min(nego.iteration + (nego.initial ? 1 : 0), 5)} / 5</span>
|
||||
</div>
|
||||
@@ -140,25 +163,37 @@ export function Dashboard({
|
||||
<dt className="text-base-content/55">협상 긴장도</dt>
|
||||
<dd className="num text-[13px] font-medium">{tension != null ? tension.toFixed(2) : '—'}</dd>
|
||||
</div>
|
||||
<div className="mt-2 h-1.5 rounded-full bg-base-200">
|
||||
<div
|
||||
className="h-full rounded-full bg-warning transition-[width] duration-500 motion-reduce:transition-none"
|
||||
style={{ width: `${(tension ?? 0) * 100}%` }}
|
||||
/>
|
||||
<div className="mt-2 flex gap-1" aria-hidden>
|
||||
{ZONE_LABELS.map((_, i) => (
|
||||
<div
|
||||
key={i}
|
||||
className={`h-1.5 flex-1 rounded-full transition-colors ${
|
||||
zone === i ? 'bg-warning' : 'bg-base-200'
|
||||
}`}
|
||||
/>
|
||||
))}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div className="flex items-center justify-between gap-2">
|
||||
<dt className="text-base-content/55">적용 페르소나</dt>
|
||||
<dd>
|
||||
{meta.persona ? (
|
||||
<span className="badge badge-soft badge-warning text-[12px] font-semibold">
|
||||
{meta.persona}
|
||||
<div className="mt-1.5 flex text-[10px]" aria-hidden>
|
||||
{ZONE_LABELS.map((l, i) => (
|
||||
<span
|
||||
key={l}
|
||||
className={`flex-1 text-center ${zone === i ? 'font-semibold text-warning' : 'text-base-content/40'}`}
|
||||
>
|
||||
{l}
|
||||
</span>
|
||||
))}
|
||||
</div>
|
||||
<div className="mt-2.5 flex items-center justify-between gap-2">
|
||||
<span className="text-xs text-base-content/55">적용 페르소나</span>
|
||||
{meta.persona ? (
|
||||
<span className="badge badge-soft badge-warning text-[12px] font-semibold">{meta.persona}</span>
|
||||
) : (
|
||||
<span className="text-base-content/45">—</span>
|
||||
)}
|
||||
</dd>
|
||||
</div>
|
||||
<p className="mt-2 text-[11px] leading-relaxed text-base-content/45">
|
||||
긴장도 구간에 따라 협상 말투(페르소나)가 정해집니다.
|
||||
</p>
|
||||
</div>
|
||||
</dl>
|
||||
) : (
|
||||
|
||||
Reference in new issue
Block a user