diff --git a/frontend/src/components/CasePanel.tsx b/frontend/src/components/CasePanel.tsx index 26c0af0..e9cfc79 100644 --- a/frontend/src/components/CasePanel.tsx +++ b/frontend/src/components/CasePanel.tsx @@ -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({ ) } diff --git a/frontend/src/components/Dashboard.tsx b/frontend/src/components/Dashboard.tsx index 20f9939..84e21c6 100644 --- a/frontend/src/components/Dashboard.tsx +++ b/frontend/src/components/Dashboard.tsx @@ -5,6 +5,14 @@ import { PriceChart } from './PriceChart' const FLOW = ['서비스안내', '담당자확인', '협상품목안내', '가격협상', '협상종료'] +// 긴장도 구간 → 응대 페르소나 (엔진 프리셋과 동일한 3구간) +const PERSONA_ZONE: Record = { + '우호적 마무리형': 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 ( + + + + + + ) + } + return ( + + ) +} + 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({ )} -
- -
-
-
시나리오
-
{demoCase.scenario.replace('Scenario_', '')}
-
-
-
인터넷 최저가
-
{demoCase.card_data.internet_min_price.toLocaleString()}원
-
-
-

- 앵커가·목표가는 실제 협상에서 공급사에게 보이지 않는 구매측 내부 기준입니다. -

-
    - {FLOW.map((s, i) => ( -
  1. -
    - - {s} - -
  2. - ))} +
      + {FLOW.map((s, i) => { + const state = i < fi ? 'done' : i === fi ? 'current' : 'todo' + return ( +
    1. +
      + + {i < FLOW.length - 1 && ( +
      + )} +
      + + {s} + +
    2. + ) + })}
    -
    +
    가격 라운드 {Math.min(nego.iteration + (nego.initial ? 1 : 0), 5)} / 5
    @@ -140,25 +163,37 @@ export function Dashboard({
    협상 긴장도
    {tension != null ? tension.toFixed(2) : '—'}
    -
    -
    +
    + {ZONE_LABELS.map((_, i) => ( +
    + ))}
    -
    - -
    -
    적용 페르소나
    -
    - {meta.persona ? ( - - {meta.persona} +
    + {ZONE_LABELS.map((l, i) => ( + + {l} + ))} +
    +
    + 적용 페르소나 + {meta.persona ? ( + {meta.persona} ) : ( — )} -
    +
    +

    + 긴장도 구간에 따라 협상 말투(페르소나)가 정해집니다. +

    ) : ( diff --git a/frontend/src/components/PriceChart.tsx b/frontend/src/components/PriceChart.tsx index fa55550..158a803 100644 --- a/frontend/src/components/PriceChart.tsx +++ b/frontend/src/components/PriceChart.tsx @@ -118,7 +118,7 @@ export function PriceChart({ demoCase, priceTrail }: { demoCase: DemoCase; price W - PAD.right - 30 ? 'end' : 'middle'} + textAnchor={last.x > W - PAD.right - 30 ? 'end' : last.x < 36 ? 'start' : 'middle'} fontSize="10.5" fontWeight="700" fill="var(--color-base-content)"