/* DriverReassign.jsx — PW-005 Driver Reassignment modal over PW-004 */
const drStyles = {
header: {
padding: '18px 24px', borderBottom: `1px solid ${KARE.n100}`,
display: 'flex', alignItems: 'center', justifyContent: 'space-between',
},
h2: { fontSize: 18, fontWeight: 600, color: KARE.n900, margin: 0 },
close: { color: KARE.n500, cursor: 'pointer', fontSize: 22, lineHeight: 1, padding: 4 },
body: { padding: 24, display: 'flex', flexDirection: 'column', gap: 18, maxHeight: 640, overflow: 'auto' },
section: { display: 'flex', flexDirection: 'column', gap: 10 },
secTitle: {
fontSize: 11, fontWeight: 600, color: KARE.n500, letterSpacing: 0.4, textTransform: 'uppercase',
},
summary: {
background: KARE.n100, borderRadius: 8, padding: 16,
display: 'grid', gridTemplateColumns: '1fr auto', gap: 12, alignItems: 'start',
},
kv: { display: 'grid', gridTemplateColumns: '90px 1fr', gap: 8, fontSize: 13, color: KARE.n900 },
kvLabel: { color: KARE.n500 },
footer: {
padding: '14px 24px', borderTop: `1px solid ${KARE.n100}`,
display: 'flex', justifyContent: 'space-between', alignItems: 'center', gap: 8,
},
btnP: {
height: 40, padding: '0 18px', borderRadius: 6, border: 'none',
background: KARE.primary, color: KARE.n000,
fontSize: 14, fontWeight: 600, cursor: 'pointer', fontFamily: FONT,
},
btnPDisabled: {
height: 40, padding: '0 18px', borderRadius: 6, border: 'none',
background: KARE.n300, color: KARE.n500,
fontSize: 14, fontWeight: 600, cursor: 'not-allowed', fontFamily: FONT,
},
btnG: {
height: 40, padding: '0 16px', borderRadius: 6,
background: KARE.n000, border: `1px solid ${KARE.n300}`,
color: KARE.n700, fontSize: 14, fontWeight: 500, cursor: 'pointer', fontFamily: FONT,
},
};
const IPhone = () => (
);
const IPin = () => (
);
/* -------- Avatar -------- */
function Avatar({ initials, size = 36, selected }) {
return (
= 36 ? 13 : 11, fontWeight: 700, flexShrink: 0,
fontFamily: "'Inter', sans-serif", letterSpacing: 0.3,
}}>{initials}
);
}
/* -------- Summary card -------- */
function BookingSummary() {
return (
예약 ID
BKG-2026-0412-001
픽업
2026-04-28 16:30 KST · ICN T2 Arrival Gate 6
목적지
Lotte Hotel Seoul · 3 persons
);
}
/* -------- Current driver -------- */
function CurrentDriver() {
return (
Kim Seong-ho Current
12가 3456
·
+82 10-4822-1019
오늘 4건
);
}
/* -------- Driver row -------- */
function DriverRow({ driver, selected }) {
const statusColor = driver.busy ? KARE.n500 : KARE.success;
return (
{selected && }
{driver.name}
{driver.busy ? 'Busy' : 'Available'}
{driver.plate}
·
{driver.vehicle}
·
{driver.phone}
= 5 ? KARE.warning : KARE.n700,
padding: '4px 10px', borderRadius: 999,
border: `1px solid ${KARE.n300}`, background: KARE.n000,
}}>오늘 {driver.todayCount}건
);
}
const DRIVERS = [
{ id: 'D1', initials: 'LM', name: 'Lee Min-jae', plate: '34나 5678', vehicle: 'Carnival', phone: '+82 10-3210-9921', todayCount: 2, busy: false },
{ id: 'D2', initials: 'PH', name: 'Park Hye-jin', plate: '22라 1199', vehicle: 'Sedan (K9)', phone: '+82 10-7722-4410', todayCount: 3, busy: false },
{ id: 'D3', initials: 'CJ', name: 'Choi Jun-woo', plate: '57마 0021', vehicle: 'Carnival', phone: '+82 10-5531-0820', todayCount: 5, busy: false },
];
/* -------- Reason textarea -------- */
function ReasonTextarea() {
return (
);
}
/* -------- Modal variants -------- */
function ReassignDefault() {
return (
>
}>
가용 기사 선택 · 3명
상태 기준 · 2026-04-28 기준
{DRIVERS.map((d, i) => )}
);
}
function ReassignNoDrivers() {
return (
>
}>
가용 기사 선택
현재 배정 가능한 기사가 없습니다
해당 시간대 근무 기사가 모두 배정되어 있습니다. 스케줄 조정 후 다시 시도해주세요.
);
}
function ReassignImminent() {
return (
>
}>
픽업 임박 · D-day 45분 후
변경 시 고객 혼선이 발생할 수 있습니다. 진행 전 고객과 직접 확인을 권장합니다.
가용 기사 선택 · 2명
{DRIVERS.slice(0,2).map((d, i) => )}
);
}
/* Reconfirm popup (shown after "변경 확정" on imminent) */
function ReassignReconfirmPopup() {
return (
정말 지금 기사를 변경하시겠습니까?
픽업 시각까지 45분 남았습니다. 고객에게 즉시 알림이 발송되며 이전 기사는 자동 해제됩니다.
변경 전Kim Seong-ho · 12가 3456
변경 후Lee Min-jae · 34나 5678
);
}
/* -------- Shared modal frame -------- */
function ModalFrame({ title, children, footerRight }) {
return (
{title}
×
{children}
변경 내역은 파트너 감사 로그에 기록됩니다.
{footerRight}
);
}
/* -------- Composed scenes (modal over PW-004 confirmed) -------- */
function SceneWith({ modal, popup }) {
return (
);
}
function DriverReassignDefault() { return } />; }
function DriverReassignNoDrivers() { return } />; }
function DriverReassignImminent() { return } />; }
function DriverReassignReconfirm() { return } popup={} />; }
Object.assign(window, {
DriverReassignDefault, DriverReassignNoDrivers,
DriverReassignImminent, DriverReassignReconfirm,
});