레이아웃 재배치 + 미니 사분면 즉시 전환 + 가격 라운드 섹션 신설

- 좌측: 협상 케이스(상시 미니 4분면 — 클릭 시 해당 케이스로 즉시 재시작)·상품 정보·가격/차트
- 우측: 협상 진행(스텝 전용)·가격 라운드·엔진 판단
- 가격 라운드: 라운드별 제안가·기존가 대비 %·응수 협상 카드 기록
  (카드는 확인 뒤 응답에 실려오므로 비어 있는 마지막 라운드에 지연 채움)

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01UFZ7JWdwCaQAwNYJErL8pP
This commit is contained in:
민헌andClaude Fable 5 committed 2026-08-31 14:43:28 +09:00
1 parent fdfb235774
commit cf23ca264a
4 files changed
+186 -87

No files matched your search

+44 -24
View File
@@ -1,30 +1,30 @@
import { DIST_LABEL, PARTNER_LABEL, SCENARIO_QUADRANTS, type DemoCase } from '../content/cases'
export function CasePanel({
selected, busy, onChange,
cases, selected, busy, onSelect, onChange,
}: {
cases: DemoCase[]
selected: DemoCase | null
busy: boolean
onSelect: (c: DemoCase) => void
onChange: () => void
}) {
if (!selected) {
return (
<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-[13px] font-semibold text-base-content/55">협상 케이스</h2>
<p className="mt-3 text-[13px] leading-relaxed text-base-content/50">
가운데 화면에서 시나리오를 선택하면 진행 중인 케이스와 상품 정보가
여기에 표시됩니다.
</p>
</section>
</aside>
<section className="rounded-box bg-base-100 p-5">
<h2 className="text-[13px] font-semibold text-base-content/55">협상 케이스</h2>
<p className="mt-3 text-[13px] leading-relaxed text-base-content/50">
가운데 화면에서 시나리오를 선택하면 진행 중인 케이스와 상품 정보가
여기에 표시됩니다.
</p>
</section>
)
}
const q = SCENARIO_QUADRANTS.find((x) => x.scenario === selected.scenario)
const selectedQ = SCENARIO_QUADRANTS.find((x) => x.scenario === selected.scenario)
return (
<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">
<div className="flex items-center justify-between gap-2">
<h2 className="text-[13px] font-semibold text-base-content/55">협상 케이스</h2>
@@ -34,20 +34,40 @@ export function CasePanel({
disabled={busy}
className="btn btn-ghost btn-xs -mr-1 text-base-content/55"
>
시나리오 변경
처음으로
</button>
</div>
<div className="mt-2 flex items-center gap-2.5">
<span
className={`flex size-10 shrink-0 items-center justify-center rounded-field text-xl font-extrabold ${q?.badgeCls ?? 'bg-base-200'}`}
>
{q?.letter ?? '?'}
</span>
<div className="min-w-0">
<p className="text-[15px] font-bold">시나리오 {q?.letter}</p>
<p className="truncate text-xs text-base-content/50">{q?.axis}</p>
</div>
{/* 미니 사분면 — 누르면 해당 케이스로 즉시 새 협상 시작 */}
<div className="mt-3 grid grid-cols-2 gap-1.5">
{[['B', 'A'], ['C', 'D']].flat().map((letter) => {
const q = SCENARIO_QUADRANTS.find((x) => x.letter === letter)
const c = q && cases.find((x) => x.scenario === q.scenario)
if (!q || !c) return null
const active = c.id === selected.id
return (
<button
key={q.scenario}
type="button"
disabled={busy}
onClick={() => !active && onSelect(c)}
aria-pressed={active}
aria-label={`시나리오 ${q.letter} — ${q.axis}`}
className={`cursor-pointer rounded-field py-2 text-center text-base font-extrabold transition-colors focus-visible:ring-2 focus-visible:ring-primary focus-visible:outline-none ${
active
? `${q.badgeCls} ring-1 ring-current`
: 'bg-base-200/60 text-base-content/55 hover:bg-base-200'
}`}
>
{q.letter}
</button>
)
})}
</div>
<p className="mt-2.5 text-xs text-base-content/50">
시나리오 <span className={`font-bold ${selectedQ?.textCls ?? ''}`}>{selectedQ?.letter}</span>
<span className="mx-1">·</span>
{selectedQ?.axis}
</p>
</section>
<section className="rounded-box bg-base-100 p-5">
@@ -80,6 +100,6 @@ export function CasePanel({
</div>
</dl>
</section>
</aside>
</>
)
}