// ──────────────────────────────────────────────────────────────────── // AW-024 · Chrome — modal shell, stepper header, footer // ──────────────────────────────────────────────────────────────────── const CCModal = ({ children, width = 880 }) => (
{children}
); // ── Header w/ stepper ──────────────────────────────────────────── const STEP_LABELS = [ { id: 1, key: 'contract', label: '계약 정보', subtitle: '기업·담당자·기간' }, { id: 2, key: 'payment', label: '결제 정보', subtitle: '방식·계좌·세금계산서' }, { id: 3, key: 'issue', label: '발행 설정', subtitle: '상품·수량·정책' }, ]; const CCHeader = ({ step, hasErrors }) => (
{/* Title row */}
AW-024 · 새 계약 등록
Channel 계약 등록
{/* Stepper */}
{STEP_LABELS.map((s, i) => { const isActive = i === step; const isDone = i < step; const isLast = i === STEP_LABELS.length - 1; const hasErr = isActive && hasErrors; return (
{hasErr ? ( ) : isDone ? ( ) : s.id}
{s.label}
{s.subtitle}
{!isLast && (
)} ); })}
); // ── Footer ─────────────────────────────────────────────────────── const CCFooter = ({ step, totalSteps, errCount, canSubmit }) => { const isFirst = step === 0; const isLast = step === totalSteps - 1; return (
{/* Left — error summary or progress */}
{errCount > 0 ? ( 확인 필요 {errCount}건 ) : ( {step + 1} / {totalSteps} · 모든 항목은 자동 저장됩니다 )}
{!isFirst && ( )} {!isLast ? ( ) : ( )}
); }; Object.assign(window, { CCModal, CCHeader, CCFooter, STEP_LABELS });