snp-batch-validation/frontend/src/pages/RiskComplianceHistory.tsx
HYOJIN 7eb2611c02 feat: Risk&Compliance 값 변경 이력 확인 페이지 개발 (#111)
- 선박 위험지표/선박 제재/회사 제재 변경 이력 조회 API 및 UI
- tb_ship_risk_detail_hstry JOIN으로 Risk narrative(이전값/이후값) 표시
- indicator 테이블 column_name 매핑으로 다국어 필드명 지원
- Compliance overall 상태 토글 헤더에 배지 표시
- 다국어 캐시 (KO/EN 동시 조회, 언어 토글 즉시 전환)
- Screening Guide에서 분리된 독립 페이지 (/risk-compliance-history)
- indicator sort_order 기준 토글 내부 정렬

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-30 14:55:22 +09:00

52 lines
2.0 KiB
TypeScript

import { useState } from 'react';
import HistoryTab from '../components/screening/HistoryTab';
export default function RiskComplianceHistory() {
const [lang, setLang] = useState('KO');
return (
<div className="space-y-6">
{/* 헤더 */}
<div className="bg-gradient-to-r from-slate-900 via-blue-900 to-red-900 rounded-xl p-6 text-white">
<div className="text-xs opacity-75 mb-1">
S&P Global · Maritime Intelligence Risk Suite (MIRS)
</div>
<h1 className="text-xl font-bold mb-1">
Risk & Compliance Change History
</h1>
<p className="text-sm opacity-85">
</p>
</div>
{/* 언어 토글 */}
<div className="flex justify-end">
<div className="flex gap-1 border border-wing-border rounded-lg overflow-hidden">
<button
onClick={() => setLang('EN')}
className={`px-3 py-1.5 text-xs font-bold transition-colors ${
lang === 'EN'
? 'bg-slate-900 text-white'
: 'bg-wing-card text-wing-muted hover:text-wing-text'
}`}
>
EN
</button>
<button
onClick={() => setLang('KO')}
className={`px-3 py-1.5 text-xs font-bold transition-colors ${
lang === 'KO'
? 'bg-slate-900 text-white'
: 'bg-wing-card text-wing-muted hover:text-wing-text'
}`}
>
KO
</button>
</div>
</div>
<HistoryTab lang={lang} />
</div>
);
}