fix(incidents): MPA 리팩토링 누락 imports 정리 #185
@ -4,6 +4,9 @@
|
|||||||
|
|
||||||
## [Unreleased]
|
## [Unreleased]
|
||||||
|
|
||||||
|
### 수정
|
||||||
|
- 사건사고: MPA 리팩토링 누락 imports 정리 — IncidentsView `SplitPanelContent` 중복 import 제거, `fetchOilSpillSummary`를 `predictionApi`로 이관(이전 위치는 `api` 미임포트로 런타임 동작 불가), `AnalysisSelectModal`·`hnsDispersionLayers`의 `@tabs/`·`@common/components/` 구 경로를 신 경로로 정정
|
||||||
|
|
||||||
### 문서
|
### 문서
|
||||||
- MPA 컴포넌트 구조 반영: 개발 가이드·공통 가이드·CRUD 가이드·설치 가이드·docs/README의 `tabs/` 경로 예시를 `components/`로 정정
|
- MPA 컴포넌트 구조 반영: 개발 가이드·공통 가이드·CRUD 가이드·설치 가이드·docs/README의 `tabs/` 경로 예시를 `components/`로 정정
|
||||||
|
|
||||||
|
|||||||
@ -1,10 +1,10 @@
|
|||||||
import { useState, useEffect, useRef } from 'react';
|
import { useState, useEffect, useRef } from 'react';
|
||||||
import { fetchPredictionAnalyses } from '@tabs/prediction/services/predictionApi';
|
import { fetchPredictionAnalyses } from '@components/prediction/services/predictionApi';
|
||||||
import type { PredictionAnalysis } from '@tabs/prediction/services/predictionApi';
|
import type { PredictionAnalysis } from '@interfaces/prediction/PredictionInterface';
|
||||||
import { fetchHnsAnalyses } from '@tabs/hns/services/hnsApi';
|
import { fetchHnsAnalyses } from '@components/hns/services/hnsApi';
|
||||||
import type { HnsAnalysisItem } from '@tabs/hns/services/hnsApi';
|
import type { HnsAnalysisItem } from '@interfaces/hns/HnsInterface';
|
||||||
import { fetchRescueOps } from '@tabs/rescue/services/rescueApi';
|
import { fetchRescueOps } from '@components/rescue/services/rescueApi';
|
||||||
import type { RescueOpsItem } from '@tabs/rescue/services/rescueApi';
|
import type { RescueOpsItem } from '@interfaces/rescue/RescueInterface';
|
||||||
|
|
||||||
// ── 타입 정의 ──────────────────────────────────────────
|
// ── 타입 정의 ──────────────────────────────────────────
|
||||||
export type AnalysisModalType = 'oil' | 'hns' | 'rescue';
|
export type AnalysisModalType = 'oil' | 'hns' | 'rescue';
|
||||||
|
|||||||
@ -39,7 +39,6 @@ import {
|
|||||||
} from '../utils/dischargeZoneData';
|
} from '../utils/dischargeZoneData';
|
||||||
import { useMapStore } from '@common/store/mapStore';
|
import { useMapStore } from '@common/store/mapStore';
|
||||||
import { FlyToController } from './contents/FlyToController';
|
import { FlyToController } from './contents/FlyToController';
|
||||||
import { SplitPanelContent } from './contents/SplitPanelContent';
|
|
||||||
import { VesselPopupPanel } from './contents/VesselPopupPanel';
|
import { VesselPopupPanel } from './contents/VesselPopupPanel';
|
||||||
import { IncidentPopupContent } from './contents/IncidentPopupContent';
|
import { IncidentPopupContent } from './contents/IncidentPopupContent';
|
||||||
import { VesselDetailModal } from './contents/VesselDetailModal';
|
import { VesselDetailModal } from './contents/VesselDetailModal';
|
||||||
|
|||||||
@ -5,18 +5,11 @@
|
|||||||
* - MapView와 동일한 BitmapLayer (캔버스 히트맵) + ScatterplotLayer (AEGL 원) 생성
|
* - MapView와 동일한 BitmapLayer (캔버스 히트맵) + ScatterplotLayer (AEGL 원) 생성
|
||||||
*/
|
*/
|
||||||
import { BitmapLayer, ScatterplotLayer } from '@deck.gl/layers';
|
import { BitmapLayer, ScatterplotLayer } from '@deck.gl/layers';
|
||||||
import { computeDispersion } from '@tabs/hns/utils/dispersionEngine';
|
import { computeDispersion } from '@components/hns/utils/dispersionEngine';
|
||||||
import { getSubstanceToxicity } from '@tabs/hns/utils/toxicityData';
|
import { getSubstanceToxicity } from '@components/hns/utils/toxicityData';
|
||||||
import { hexToRgba } from '@common/components/map/mapUtils';
|
import { hexToRgba } from '@components/common/map/mapUtils';
|
||||||
import type { HnsAnalysisItem } from '@tabs/hns/services/hnsApi';
|
import type { HnsAnalysisItem, MeteoParams, SourceParams, SimParams } from '@interfaces/hns/HnsInterface';
|
||||||
import type {
|
import type { DispersionModel, AlgorithmType, StabilityClass } from '@types/hns/HnsType';
|
||||||
MeteoParams,
|
|
||||||
SourceParams,
|
|
||||||
SimParams,
|
|
||||||
DispersionModel,
|
|
||||||
AlgorithmType,
|
|
||||||
StabilityClass,
|
|
||||||
} from '@tabs/hns/utils/dispersionTypes';
|
|
||||||
|
|
||||||
// MapView와 동일한 색상 정지점
|
// MapView와 동일한 색상 정지점
|
||||||
const COLOR_STOPS: [number, number, number, number][] = [
|
const COLOR_STOPS: [number, number, number, number][] = [
|
||||||
|
|||||||
@ -4,6 +4,7 @@ import type {
|
|||||||
PredictionDetail,
|
PredictionDetail,
|
||||||
BacktrackResult,
|
BacktrackResult,
|
||||||
TrajectoryResponse,
|
TrajectoryResponse,
|
||||||
|
OilSpillSummaryResponse,
|
||||||
SensitiveResourceCategory,
|
SensitiveResourceCategory,
|
||||||
SensitiveResourceFeatureCollection,
|
SensitiveResourceFeatureCollection,
|
||||||
SpreadParticlesGeojson,
|
SpreadParticlesGeojson,
|
||||||
@ -63,6 +64,17 @@ export const fetchAnalysisTrajectory = async (
|
|||||||
return response.data;
|
return response.data;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
export const fetchOilSpillSummary = async (
|
||||||
|
acdntSn: number,
|
||||||
|
predRunSn?: number,
|
||||||
|
): Promise<OilSpillSummaryResponse> => {
|
||||||
|
const response = await api.get<OilSpillSummaryResponse>(
|
||||||
|
`/prediction/analyses/${acdntSn}/oil-summary`,
|
||||||
|
predRunSn != null ? { params: { predRunSn } } : undefined,
|
||||||
|
);
|
||||||
|
return response.data;
|
||||||
|
};
|
||||||
|
|
||||||
export const fetchSensitiveResources = async (
|
export const fetchSensitiveResources = async (
|
||||||
acdntSn: number,
|
acdntSn: number,
|
||||||
): Promise<SensitiveResourceCategory[]> => {
|
): Promise<SensitiveResourceCategory[]> => {
|
||||||
|
|||||||
@ -216,29 +216,6 @@ export interface OilSpillSummaryResponse {
|
|||||||
byModel: Record<string, OilSpillSummary>;
|
byModel: Record<string, OilSpillSummary>;
|
||||||
}
|
}
|
||||||
|
|
||||||
export const fetchAnalysisTrajectory = async (
|
|
||||||
acdntSn: number,
|
|
||||||
predRunSn?: number,
|
|
||||||
): Promise<TrajectoryResponse> => {
|
|
||||||
const response = await api.get<TrajectoryResponse>(
|
|
||||||
`/prediction/analyses/${acdntSn}/trajectory`,
|
|
||||||
predRunSn != null ? { params: { predRunSn } } : undefined,
|
|
||||||
);
|
|
||||||
return response.data;
|
|
||||||
};
|
|
||||||
|
|
||||||
export const fetchOilSpillSummary = async (
|
|
||||||
acdntSn: number,
|
|
||||||
predRunSn?: number,
|
|
||||||
): Promise<OilSpillSummaryResponse> => {
|
|
||||||
const response = await api.get<OilSpillSummaryResponse>(
|
|
||||||
`/prediction/analyses/${acdntSn}/oil-summary`,
|
|
||||||
predRunSn != null ? { params: { predRunSn } } : undefined,
|
|
||||||
);
|
|
||||||
return response.data;
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
export interface SensitiveResourceCategory {
|
export interface SensitiveResourceCategory {
|
||||||
category: string;
|
category: string;
|
||||||
count: number;
|
count: number;
|
||||||
|
|||||||
불러오는 중...
Reference in New Issue
Block a user