From 2e5fefada7807d5257824019958ebb8c06338e3e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EB=AF=BC=ED=97=8C?= Date: Mon, 31 Aug 2026 14:09:17 +0900 Subject: [PATCH] =?UTF-8?q?=EC=BD=98=EC=86=94=20=EA=B5=AC=EC=A1=B0=20?= =?UTF-8?q?=EA=B0=9C=ED=8E=B8=20=E2=80=94=20=EC=8B=9C=EB=82=98=EB=A6=AC?= =?UTF-8?q?=EC=98=A4=204=EB=B6=84=EB=A9=B4=20=EC=84=A0=ED=83=9D=C2=B7?= =?UTF-8?q?=EC=83=81=ED=92=88=20=EC=A0=95=EB=B3=B4=20=EC=84=B9=EC=85=98?= =?UTF-8?q?=C2=B7=EC=B2=B4=ED=81=AC=20=EC=8A=A4=ED=85=9D=ED=8D=BC=C2=B7?= =?UTF-8?q?=EA=B8=B4=EC=9E=A5=EB=8F=84=20=EA=B5=AC=EA=B0=84=20=EA=B2=8C?= =?UTF-8?q?=EC=9D=B4=EC=A7=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 협상 케이스를 4분면(매출 규모×경쟁 강도) 시나리오 A/B/D/C 그리드로 교체 - 상품 정보 섹션 신설: 공급가·인터넷 최저가·공급 유형·거래 기간·응답률/VOC 이동 - 가격 패널 하단(시나리오·최저가·내부기준 문구) 제거 - 협상 진행을 체크 원형 세로 스텝퍼로 교체 - 긴장도를 3구간(낮음·보통·높음) 게이지로, 페르소나를 구간 결과로 묶어 인과 표시 - 차트 첫 제안 점 값 라벨의 좌측 클립 보정 Co-Authored-By: Claude Fable 5 Claude-Session: https://claude.ai/code/session_01UFZ7JWdwCaQAwNYJErL8pP --- frontend/src/components/CasePanel.tsx | 95 ++++++++++++------- frontend/src/components/Dashboard.tsx | 125 ++++++++++++++++--------- frontend/src/components/PriceChart.tsx | 2 +- 3 files changed, 141 insertions(+), 81 deletions(-) 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)"