refactor: 보고서 버튼 현장분석 헤더로 이동 (LIVE↔닫기 사이)
This commit is contained in:
부모
8f9dd0b546
커밋
c98d6ba353
@ -377,15 +377,6 @@ function AuthenticatedApp({ user, onLogout }: AuthenticatedAppProps) {
|
||||
<span className="text-[11px]">📊</span>
|
||||
현장분석
|
||||
</button>
|
||||
<button
|
||||
type="button"
|
||||
className={`mode-btn ${showReport ? 'active' : ''}`}
|
||||
onClick={() => setShowReport(v => !v)}
|
||||
title="감시 보고서"
|
||||
>
|
||||
<span className="text-[11px]">📋</span>
|
||||
보고서
|
||||
</button>
|
||||
</div>
|
||||
)}
|
||||
|
||||
@ -658,7 +649,7 @@ function AuthenticatedApp({ user, onLogout }: AuthenticatedAppProps) {
|
||||
<main className="app-main">
|
||||
<div className="map-panel">
|
||||
{showFieldAnalysis && (
|
||||
<FieldAnalysisModal ships={koreaData.ships} vesselAnalysis={vesselAnalysis} onClose={() => setShowFieldAnalysis(false)} />
|
||||
<FieldAnalysisModal ships={koreaData.ships} vesselAnalysis={vesselAnalysis} onClose={() => setShowFieldAnalysis(false)} onReport={() => setShowReport(true)} />
|
||||
)}
|
||||
{showReport && (
|
||||
<ReportModal ships={koreaData.ships} onClose={() => setShowReport(false)} />
|
||||
|
||||
@ -109,6 +109,7 @@ interface Props {
|
||||
ships: Ship[];
|
||||
vesselAnalysis?: UseVesselAnalysisResult;
|
||||
onClose: () => void;
|
||||
onReport?: () => void;
|
||||
}
|
||||
|
||||
const PIPE_STEPS = [
|
||||
@ -123,7 +124,7 @@ const PIPE_STEPS = [
|
||||
|
||||
const ALERT_ORDER: Record<string, number> = { CRITICAL: 0, WATCH: 1, MONITOR: 2, NORMAL: 3 };
|
||||
|
||||
export function FieldAnalysisModal({ ships, vesselAnalysis, onClose }: Props) {
|
||||
export function FieldAnalysisModal({ ships, vesselAnalysis, onClose, onReport }: Props) {
|
||||
const emptyMap = useMemo(() => new Map<string, VesselAnalysisDto>(), []);
|
||||
const analysisMap = vesselAnalysis?.analysisMap ?? emptyMap;
|
||||
const [activeFilter, setActiveFilter] = useState('ALL');
|
||||
@ -348,6 +349,19 @@ export function FieldAnalysisModal({ ships, vesselAnalysis, onClose }: Props) {
|
||||
LIVE
|
||||
</span>
|
||||
<span style={{ color: C.ink2, fontSize: 10 }}>{new Date().toLocaleTimeString('ko-KR')}</span>
|
||||
{onReport && (
|
||||
<button
|
||||
type="button"
|
||||
onClick={onReport}
|
||||
style={{
|
||||
background: 'rgba(59,130,246,0.15)', border: '1px solid rgba(59,130,246,0.4)',
|
||||
color: '#60a5fa', padding: '4px 14px', cursor: 'pointer',
|
||||
fontSize: 11, borderRadius: 2, fontFamily: 'inherit', fontWeight: 700,
|
||||
}}
|
||||
>
|
||||
📋 보고서
|
||||
</button>
|
||||
)}
|
||||
<button
|
||||
type="button"
|
||||
onClick={onClose}
|
||||
|
||||
불러오는 중...
Reference in New Issue
Block a user