diff --git a/src/components/map/mapbox/dron/DronMarker.js b/src/components/map/mapbox/dron/DronMarker.js index 5f23ca15..37995daa 100644 --- a/src/components/map/mapbox/dron/DronMarker.js +++ b/src/components/map/mapbox/dron/DronMarker.js @@ -12,7 +12,7 @@ import { getFlightPlan } from '@src/redux/features/control/gp/gpThunk'; import { getHistory } from '@src/redux/features/control/gp/gpThunk'; -import { ClientcontrolGpCountInit } from '@src/redux/features/control/gp/gpSlice'; +import { clientcontrolGpCountInit } from '@src/redux/features/control/gp/gpSlice'; import { clientObjectClick, clientObjectUnClick @@ -58,7 +58,7 @@ export const DronMarker = props => { useEffect(() => { if (count.drone.length > 0 || count.flight.length > 0) { dispatch( - ClientcontrolGpCountInit({ + clientcontrolGpCountInit({ count }) ); @@ -68,7 +68,7 @@ export const DronMarker = props => { flight: [] }; dispatch( - ClientcontrolGpCountInit({ + clientcontrolGpCountInit({ count }) ); diff --git a/src/redux/features/control/gp/gpSlice.ts b/src/redux/features/control/gp/gpSlice.ts index bd8268bf..d6b537eb 100644 --- a/src/redux/features/control/gp/gpSlice.ts +++ b/src/redux/features/control/gp/gpSlice.ts @@ -92,11 +92,6 @@ export const initiaControlGp: IControlGpState & controlGpCountFlight: [] }; -interface IControlGpPayload { - // controlGpList: IControlGpRq[]; - // controlGroupAuthInfo: IControlGroupAuthData[]; -} - const controlGpSlice = createSlice({ name: 'controlGpSlice', initialState: initiaControlGp, @@ -116,7 +111,7 @@ const controlGpFlightPlanSlice = createSlice({ name: 'controlGpFlightPlanSlice', initialState: initiaControlGp, reducers: { - ClientcontrolGpFlightPlanInit: (state, action) => { + clientcontrolGpFlightPlanInit: (state, action) => { state.controlGpFltPlanList = []; } }, @@ -165,7 +160,7 @@ const controlGpDtlSlice = createSlice({ name: 'controlGpDtlSlice', initialState: initiaControlGp, reducers: { - ClientcontrolGpRtDtlInit: (state, action) => { + clientcontrolGpRtDtlInit: (state, action) => { // state.controlWheather = {} as IControlweatherRs; // state.controlDetail = {} as IControlDetailRs; state.controlGpDetail = action.payload as IControlGpDtlData; @@ -187,7 +182,7 @@ export const controlGpCountSlice = createSlice({ name: 'controlGpCountSlice', initialState: initiaControlGp, reducers: { - ClientcontrolGpCountInit: (state, action) => { + clientcontrolGpCountInit: (state, action) => { const drone = action.payload.count.drone as IControlGpCountData[]; const flight = action.payload.count.flight as IControlGpCountData[]; @@ -197,13 +192,13 @@ export const controlGpCountSlice = createSlice({ } }); -export const { ClientcontrolGpFlightPlanInit } = +export const { clientcontrolGpFlightPlanInit } = controlGpFlightPlanSlice.actions; export const controlGpLogAction = controlGpLogSlice.actions; export const controlGpHisAction = controlGpHisSlice.actions; export const controlGpRtDtlAction = controlGpDtlSlice.actions; -export const { ClientcontrolGpCountInit } = controlGpCountSlice.actions; -export const { ClientcontrolGpRtDtlInit } = controlGpDtlSlice.actions; +export const { clientcontrolGpCountInit } = controlGpCountSlice.actions; +export const { clientcontrolGpRtDtlInit } = controlGpDtlSlice.actions; export const controlGpDtlAction = controlGpDtlSlice.actions; export const controlGpLogReducer = controlGpLogSlice.reducer; diff --git a/src/redux/features/control/gp/gpThunk.ts b/src/redux/features/control/gp/gpThunk.ts index 312648c9..a6e66ad8 100644 --- a/src/redux/features/control/gp/gpThunk.ts +++ b/src/redux/features/control/gp/gpThunk.ts @@ -21,7 +21,7 @@ import { } from '@src/utility/authService/cookie'; import decode from 'jwt-decode'; import { RootState } from '@src/redux/store'; -import { ClientcontrolGpRtDtlInit } from './gpSlice'; +import { clientcontrolGpRtDtlInit } from './gpSlice'; import { MODAL_BODY, MODAL_HEADER } from '@src/configs/msgConst'; import { IDecodeToken } from '../../account/auth/authState'; @@ -73,7 +73,7 @@ export const getControlGp = createAsyncThunk( } }); - await dispatch(ClientcontrolGpRtDtlInit(detailData)); + await dispatch(clientcontrolGpRtDtlInit(detailData)); } if (token && data.length > 0) {