diff --git a/src/components/map/mapbox/dron/DronMarker.js b/src/components/map/mapbox/dron/DronMarker.js index ffb4b541..e83ab899 100644 --- a/src/components/map/mapbox/dron/DronMarker.js +++ b/src/components/map/mapbox/dron/DronMarker.js @@ -15,7 +15,7 @@ import { objectClickAction, objectUnClickAction } from '../../../../modules/control/map/actions/controlMapActions'; -import { JOIN_LIST } from '../../../../modules/basis/group/actions/basisGroupAction'; +import { JOIN_LIST } from '../../../../modules/basis/group/actions'; export const DronMarker = props => { const dispatch = useDispatch(); diff --git a/src/containers/analysis/history/AnalysisHistoryContainer.js b/src/containers/analysis/history/AnalysisHistoryContainer.js index 7e08d250..b09028b3 100644 --- a/src/containers/analysis/history/AnalysisHistoryContainer.js +++ b/src/containers/analysis/history/AnalysisHistoryContainer.js @@ -7,10 +7,7 @@ import { AnalysisHistorySearch } from '../../../components/analysis/history/Anal import { CustomMainLayout } from '../../../components/layout/CustomMainLayout'; import * as Actions from '../../../modules/analysis/history/actions/analysisHistoryAction'; import FlightPlanGroupGrid from '../../../components/basis/flight/plan/FlightPlanGroupGrid'; -import { - JOIN_LIST, - GROUP_LIST -} from '../../../modules/basis/group/actions/basisGroupAction'; +import { JOIN_LIST, GROUP_LIST } from '../../../modules/basis/group/actions'; import { Col, Row, diff --git a/src/containers/basis/dron/BasisDronContainer.js b/src/containers/basis/dron/BasisDronContainer.js index b04f30df..f9a8b116 100644 --- a/src/containers/basis/dron/BasisDronContainer.js +++ b/src/containers/basis/dron/BasisDronContainer.js @@ -3,7 +3,7 @@ import { shallowEqual, useDispatch, useSelector } from 'react-redux'; import { useHistory, Link } from 'react-router-dom'; import { Button } from 'reactstrap'; import * as DronActions from '../../../modules/basis/dron/actions'; -import * as GroupActions from '../../../modules/basis/group/actions/basisGroupAction'; +import * as GroupActions from '../../../modules/basis/group/actions'; import { GET_ARCTFT_TYPE_CD } from '../../../utility/CondeUtil'; import { GET_WGHT_TYPE_CD } from '../../../utility/CondeUtil'; import { BasisContainer } from '../BasisContainer'; diff --git a/src/containers/basis/group/BasisGroupApprovalContainer.js b/src/containers/basis/group/BasisGroupApprovalContainer.js index ac5f7066..525175a6 100644 --- a/src/containers/basis/group/BasisGroupApprovalContainer.js +++ b/src/containers/basis/group/BasisGroupApprovalContainer.js @@ -3,7 +3,7 @@ import { useDispatch, useSelector } from 'react-redux'; import { Button } from 'reactstrap'; import { BasisGroupApprovalSearch } from '../../../components/basis/group/BasisGroupApprovalSearch'; import { ConfirmModal } from '../../../components/modal/ConfirmModal'; -import * as Actions from '../../../modules/basis/group/actions/basisGroupAction'; +import * as Actions from '../../../modules/basis/group/actions'; import InfoModal from '../../../components/modal/InfoModal'; import { BasisContainer } from '../BasisContainer'; import { BasisDataGrid } from '../../../components/basis/BasisDataGrid'; diff --git a/src/containers/basis/group/BasisGroupContainer.js b/src/containers/basis/group/BasisGroupContainer.js index 08122b32..89cee7ae 100644 --- a/src/containers/basis/group/BasisGroupContainer.js +++ b/src/containers/basis/group/BasisGroupContainer.js @@ -4,7 +4,7 @@ import { Link, useHistory } from 'react-router-dom'; import { Button } from 'reactstrap'; import { CustomMainLayout } from '../../../components/layout/CustomMainLayout'; import { ConfirmModal } from '../../../components/modal/ConfirmModal'; -import * as Actions from '../../../modules/basis/group/actions/basisGroupAction'; +import * as Actions from '../../../modules/basis/group/actions'; import { BasisGroupGrid } from '../../../components/basis/BasisGroupGrid'; export const BasisGroupContainer = props => { diff --git a/src/containers/basis/group/BasisGroupDetailContainer.js b/src/containers/basis/group/BasisGroupDetailContainer.js index f44b7192..13a40bd0 100644 --- a/src/containers/basis/group/BasisGroupDetailContainer.js +++ b/src/containers/basis/group/BasisGroupDetailContainer.js @@ -4,7 +4,7 @@ import { useParams } from 'react-router-dom'; import { BasisGroupForm } from '../../../components/basis/group/BaisGroupForm'; import { CustomDetailLayout } from '../../../components/layout/CustomDetailLayout'; import { ConfirmModal } from '../../../components/modal/ConfirmModal'; -import * as Actions from '../../../modules/basis/group/actions/basisGroupAction'; +import * as Actions from '../../../modules/basis/group/actions'; export const BasisGroupDetailContainer = () => { const dispatch = useDispatch(); diff --git a/src/containers/basis/group/BasisGroupDetailJoinContainer.js b/src/containers/basis/group/BasisGroupDetailJoinContainer.js index b19f4dc1..d0651d17 100644 --- a/src/containers/basis/group/BasisGroupDetailJoinContainer.js +++ b/src/containers/basis/group/BasisGroupDetailJoinContainer.js @@ -4,7 +4,7 @@ import { Button } from 'reactstrap'; import { BasisGroupDetailJoinSearch } from '../../../components/basis/group/BasisGroupDetailJoinSearch'; import { CustomDetailLayout } from '../../../components/layout/CustomDetailLayout'; import { ConfirmModal } from '../../../components/modal/ConfirmModal'; -import * as Actions from '../../../modules/basis/group/actions/basisGroupAction'; +import * as Actions from '../../../modules/basis/group/actions'; import { BasisGroupGrid } from '../../../components/basis/BasisGroupGrid'; export const BasisGroupDetailJoinContainer = props => { diff --git a/src/containers/basis/group/BasisGroupUsersContainer.js b/src/containers/basis/group/BasisGroupUsersContainer.js index 9dc272eb..157fac0a 100644 --- a/src/containers/basis/group/BasisGroupUsersContainer.js +++ b/src/containers/basis/group/BasisGroupUsersContainer.js @@ -3,7 +3,7 @@ import { useDispatch, useSelector } from 'react-redux'; import { Button } from 'reactstrap'; import { BasisGroupUsersSearch } from '../../../components/basis/group/BasisGroupUsersSearch'; import { ConfirmModal } from '../../../components/modal/ConfirmModal'; -import * as Actions from '../../../modules/basis/group/actions/basisGroupAction'; +import * as Actions from '../../../modules/basis/group/actions'; import { BasisContainer } from '../BasisContainer'; import { BasisDataGrid } from '../../../components/basis/BasisDataGrid'; diff --git a/src/containers/statistics/AbnormalSituationContainer.js b/src/containers/statistics/AbnormalSituationContainer.js index 2fde8e6d..b690c497 100644 --- a/src/containers/statistics/AbnormalSituationContainer.js +++ b/src/containers/statistics/AbnormalSituationContainer.js @@ -2,7 +2,6 @@ import { CustomMainLayout } from '../../components/layout/CustomMainLayout'; import { useCallback, useEffect, useState } from 'react'; import { useDispatch, useSelector } from 'react-redux'; import * as StcsActions from '../../modules/statistics/actions'; -import * as GroupActions from '../../modules/basis/group/actions/basisGroupAction'; import StatisticsSearch from '../../components/statistics/StatisticsSearch'; import StatisticsTotal from '../../components/statistics/StatisticsTotal'; diff --git a/src/containers/statistics/FlightContainer.js b/src/containers/statistics/FlightContainer.js index 5edaf51c..a01c41aa 100644 --- a/src/containers/statistics/FlightContainer.js +++ b/src/containers/statistics/FlightContainer.js @@ -2,7 +2,6 @@ import { CustomMainLayout } from '../../components/layout/CustomMainLayout'; import { useCallback, useEffect, useState } from 'react'; import { useDispatch, useSelector } from 'react-redux'; import * as StcsActions from '../../modules/statistics/actions'; -import * as GroupActions from '../../modules/basis/group/actions/basisGroupAction'; import StatisticsTotal from '../../components/statistics/StatisticsTotal'; import StatisticsSearch from '../../components/statistics/StatisticsSearch'; diff --git a/src/containers/statistics/FlightResultContainer.js b/src/containers/statistics/FlightResultContainer.js index 03156fae..cd34a5f0 100644 --- a/src/containers/statistics/FlightResultContainer.js +++ b/src/containers/statistics/FlightResultContainer.js @@ -2,7 +2,6 @@ import { CustomMainLayout } from '../../components/layout/CustomMainLayout'; import { useCallback, useEffect, useState } from 'react'; import { useDispatch, useSelector } from 'react-redux'; import * as StcsActions from '../../modules/statistics/actions'; -import * as GroupActions from '../../modules/basis/group/actions/basisGroupAction'; import StatisticsTotal from '../../components/statistics/StatisticsTotal'; import StatisticsSearch from '../../components/statistics/StatisticsSearch'; diff --git a/src/modules/basis/group/actions/basisGroupAction.ts b/src/modules/basis/group/actions/basisGroupAction.ts deleted file mode 100644 index ab8e02b6..00000000 --- a/src/modules/basis/group/actions/basisGroupAction.ts +++ /dev/null @@ -1,262 +0,0 @@ -import { AxiosError } from 'axios'; -import { createAsyncAction, ActionType, createAction } from 'typesafe-actions'; -import { - GroupData, - JoinGroupData, - AprvGroupData, - UserGroupData, - UserGroupState, - GroupState, - MainGroupData, - SelectData -} from '../models/basisGroupModel'; - -//# 나의 그룹 목록 조회 -const MY_LIST_REQUEST = 'basis/group/MY_LIST_REQUEST'; -const MY_LIST_SUCCESS = 'basis/group/MY_LIST_SUCCESS'; -const MY_LIST_FAILURE = 'basis/group/MY_LIST_FAILURE'; - -//# 참여 그룹 목록 조회 -const JOIN_LIST_REQUEST = 'basis/group/JOIN_LIST_REQUEST'; -const JOIN_LIST_SUCCESS = 'basis/group/JOIN_LIST_SUCCESS'; -const JOIN_LIST_FAILURE = 'basis/group/JOIN_LIST_FAILURE'; - -//# 그룹 상세 조회 -const GROUP_DETAIL_REQUEST = 'basis/group/GROUP_DETAIL_REQUEST'; -const GROUP_DETAIL_SUCCESS = 'basis/group/GROUP_DETAIL_SUCCESS'; -const GROUP_DETAIL_FAILURE = 'basis/group/GROUP_DETAIL_FAILURE'; - -//## 그룹 생성 -const GROUP_CREATE_REQUEST = 'basis/group/GROUP_CREATE_REQUEST'; -const GROUP_CREATE_SUCCESS = 'basis/group/GROUP_CREATE_SUCCESS'; -const GROUP_CREATE_FAILURE = 'basis/group/GROUP_CREATE_FAILURE'; - -//## 그룹 수정 -const GROUP_UPDATE_REQUEST = 'basis/group/GROUP_UPDATE_REQUEST'; -const GROUP_UPDATE_SUCCESS = 'basis/group/GROUP_UPDATE_SUCCESS'; -const GROUP_UPDATE_FAILURE = 'basis/group/GROUP_UPDATE_FAILURE'; - -//## 그룹 삭제 -const GROUP_DELETE_REQUEST = 'basis/group/GROUP_DELETE_REQUEST'; -const GROUP_DELETE_SUCCESS = 'basis/group/GROUP_DELETE_SUCCESS'; -const GROUP_DELETE_FAILURE = 'basis/group/GROUP_DELETE_FAILURE'; - -//## 그룹 전체 조회 -const GROUP_LIST_REQUEST = 'basis/group/GROUP_LIST_REQUEST'; -const GROUP_LIST_SUCCESS = 'basis/group/GROUP_LIST_SUCCESS'; -const GROUP_LIST_FAILURE = 'basis/group/GROUP_LIST_FAILURE'; - -const ENTIRE_GROUP_LIST_REQUEST = 'basis/group/ENTIRE_GROUP_LIST_REQUEST'; -const ENTIRE_GROUP_LIST_SUCCESS = 'basis/group/ENTIRE_GROUP_LIST_SUCCESS'; -const ENTIRE_GROUP_LIST_FAILURE = 'basis/group/ENTIRE_GROUP_LIST_FAILURE'; - -//# 그룹코드 발급 -const GROUP_CREATEID_REQUEST = 'basis/group/GROUP_CREATEID_REQUEST'; -const GROUP_CREATEID_SUCCESS = 'basis/group/GROUP_CREATEID_SUCCESS'; -const GROUP_CREATEID_FAILURE = 'basis/group/GROUP_CREATEID_FAILURE'; - -//# 참여가능 그룹 목록 조회 -const GROUP_JOINLIST_REQUEST = 'basis/group/GROUP_JOINLIST_REQUEST'; -const GROUP_JOINLIST_SUCCESS = 'basis/group/GROUP_JOINLIST_SUCCESS'; -const GROUP_JOINLIST_FAILURE = 'basis/group/GROUP_JOINLIST_FAILURE'; - -//# 나의 그룹 목록 조회 -const GROUP_MYLIST_REQUEST = 'basis/group/GROUP_MYLIST_REQUEST'; -const GROUP_MYLIST_SUCCESS = 'basis/group/GROUP_MYLIST_SUCCESS'; -const GROUP_MYLIST_FAILURE = 'basis/group/GROUP_MYLIST_FAILURE'; - -//# 그룹 가입처리 -const GROUP_JOIN_REQUEST = 'basis/group/GROUP_JOIN_REQUEST'; -const GROUP_JOIN_SUCCESS = 'basis/group/GROUP_JOIN_SUCCESS'; -const GROUP_JOIN_FAILURE = 'basis/group/GROUP_JOIN_FAILURE'; - -//# 그룹 가입 탈퇴 / 취소 처리 -const GROUP_JOIN_UPDATE_REQUEST = 'basis/group/GROUP_JOIN_UPDATE_REQUEST'; -const GROUP_JOIN_UPDATE_SUCCESS = 'basis/group/GROUP_JOIN_UPDATE_SUCCESS'; -const GROUP_JOIN_UPDATE_FAILURE = 'basis/group/GROUP_JOIN_UPDATE_FAILURE'; - -//# 승인요청 조회 -const APPROVAL_LIST_REQUEST = 'basis/group/APPROVAL_LIST_REQUEST'; -const APPROVAL_LIST_SUCCESS = 'basis/group/APPROVAL_LIST_SUCCESS'; -const APPROVAL_LIST_FAILURE = 'basis/group/APPROVAL_LIST_FAILURE'; - -//# 승인처리 / 취소 처리 -const APPROVAL_UPDATE_REQUEST = 'basis/group/APPROVAL_UPDATE_REQUEST'; -const APPROVAL_UPDATE_SUCCESS = 'basis/group/APPROVAL_UPDATE_SUCCESS'; -const APPROVAL_UPDATE_FAILURE = 'basis/group/APPROVAL_UPDATE_FAILURE'; - -//# 그룹사용자 조회 -const USER_LIST_REQUEST = 'basis/group/USER_LIST_REQUEST'; -const USER_LIST_SUCCESS = 'basis/group/USER_LIST_SUCCESS'; -const USER_LIST_FAILURE = 'basis/group/USER_LIST_FAILURE'; - -//# 사용자 권한 수정 / 블럭 처리 -const USER_UPDATE_REQUEST = 'basis/group/USER_UPDATE_REQUEST'; -const USER_UPDATE_SUCCESS = 'basis/group/USER_UPDATE_SUCCESS'; -const USER_UPDATE_FAILURE = 'basis/group/USER_UPDATE_FAILURE'; - -//# 그룹장 권한 위임 -const USER_DELEGATE_REQUEST = 'basis/group/USER_DELEGATE_REQUEST'; -const USER_DELEGATE_SUCCESS = 'basis/group/USER_DELEGATE_SUCCESS'; -const USER_DELEGATE_FAILURE = 'basis/group/USER_DELEGATE_FAILURE'; - -const GROUP_MAIN_LIST_REQUEST = 'basis/group/GROUP_MAIN_LIST_REQUEST'; -const GROUP_MAIN_LIST_SUCCESS = 'basis/group/GROUP_MAIN_LIST_SUCCESS'; -const GROUP_MAIN_LIST_FAILURE = 'basis/group/GROUP_MAIN_LIST_FAILURE'; - -//그룹 선택 -const SELECT_GROUP = 'basis/group/SELECT_GROUP'; -const APRV_GROUP_SELECT = 'basis/group/APRV_GROUP_SELECT'; -const USER_GROUP_SELECT = 'basis/group/USER_GROUP_SELECT'; - -export const MY_LIST = createAsyncAction( - MY_LIST_REQUEST, - MY_LIST_SUCCESS, - MY_LIST_FAILURE -)(); - -export const JOIN_LIST = createAsyncAction( - JOIN_LIST_REQUEST, - JOIN_LIST_SUCCESS, - JOIN_LIST_FAILURE -)(); - -export const GROUP_MYLIST = createAsyncAction( - GROUP_MYLIST_REQUEST, - GROUP_MYLIST_SUCCESS, - GROUP_MYLIST_FAILURE -)(); - -export const GROUP_MAIN_LIST = createAsyncAction( - GROUP_MAIN_LIST_REQUEST, - GROUP_MAIN_LIST_SUCCESS, - GROUP_MAIN_LIST_FAILURE -)(); - -export const GROUP_DETAIL = createAsyncAction( - GROUP_DETAIL_REQUEST, - GROUP_DETAIL_SUCCESS, - GROUP_DETAIL_FAILURE -)(); - -export const GROUP_CREATE = createAsyncAction( - GROUP_CREATE_REQUEST, - GROUP_CREATE_SUCCESS, - GROUP_CREATE_FAILURE -)(); -export const GROUP_UPDATE = createAsyncAction( - GROUP_UPDATE_REQUEST, - GROUP_UPDATE_SUCCESS, - GROUP_UPDATE_FAILURE -)(); -export const GROUP_DELETE = createAsyncAction( - GROUP_DELETE_REQUEST, - GROUP_DELETE_SUCCESS, - GROUP_DELETE_FAILURE -)(); - -export const GROUP_LIST = createAsyncAction( - GROUP_LIST_REQUEST, - GROUP_LIST_SUCCESS, - GROUP_LIST_FAILURE - // )(); -)(); - -export const ENTIRE_GROUP_LIST = createAsyncAction( - ENTIRE_GROUP_LIST_REQUEST, - ENTIRE_GROUP_LIST_SUCCESS, - ENTIRE_GROUP_LIST_FAILURE -)(); - -export const GROUP_CREATEID = createAsyncAction( - GROUP_CREATEID_REQUEST, - GROUP_CREATEID_SUCCESS, - GROUP_CREATEID_FAILURE -)(); - -export const GROUP_JOINLIST = createAsyncAction( - GROUP_JOINLIST_REQUEST, - GROUP_JOINLIST_SUCCESS, - GROUP_JOINLIST_FAILURE -)(); - -export const GROUP_JOIN = createAsyncAction( - GROUP_JOIN_REQUEST, - GROUP_JOIN_SUCCESS, - GROUP_JOIN_FAILURE -)(); - -export const GROUP_JOIN_UPDATE = createAsyncAction( - GROUP_JOIN_UPDATE_REQUEST, - GROUP_JOIN_UPDATE_SUCCESS, - GROUP_JOIN_UPDATE_FAILURE -)(); - -export const APPROVAL_LIST = createAsyncAction( - APPROVAL_LIST_REQUEST, - APPROVAL_LIST_SUCCESS, - APPROVAL_LIST_FAILURE -)< - GroupState, - { data: AprvGroupData[]; count: number; total: number }, - AxiosError ->(); - -export const APPROVAL_UPDATE = createAsyncAction( - APPROVAL_UPDATE_REQUEST, - APPROVAL_UPDATE_SUCCESS, - APPROVAL_UPDATE_FAILURE -)(); - -export const USER_LIST = createAsyncAction( - USER_LIST_REQUEST, - USER_LIST_SUCCESS, - USER_LIST_FAILURE -)< - GroupState, - { data: UserGroupData[]; count: number; total: number }, - AxiosError ->(); - -export const USER_UPDATE = createAsyncAction( - USER_UPDATE_REQUEST, - USER_UPDATE_SUCCESS, - USER_UPDATE_FAILURE -)(); - -export const USER_DELEGATE = createAsyncAction( - USER_DELEGATE_REQUEST, - USER_DELEGATE_SUCCESS, - USER_DELEGATE_FAILURE -)(); - -export const SELECT = createAction(SELECT_GROUP)(); -export const GROUP_APRV_SELECT = createAction(APRV_GROUP_SELECT)(); -export const GROUP_USER_SELECT = createAction(USER_GROUP_SELECT)(); - -const actions = { - MY_LIST, - JOIN_LIST, - GROUP_DETAIL, - GROUP_CREATE, - GROUP_UPDATE, - GROUP_DELETE, - GROUP_LIST, - ENTIRE_GROUP_LIST, - GROUP_CREATEID, - GROUP_JOINLIST, - GROUP_JOIN, - GROUP_JOIN_UPDATE, - APPROVAL_LIST, - APPROVAL_UPDATE, - USER_LIST, - USER_UPDATE, - USER_DELEGATE, - GROUP_MYLIST, - GROUP_MAIN_LIST, - SELECT, - GROUP_APRV_SELECT, - GROUP_USER_SELECT -}; - -export type GroupAction = ActionType; diff --git a/src/modules/basis/group/actions/index.ts b/src/modules/basis/group/actions/index.ts index ab8e02b6..3aac7d61 100644 --- a/src/modules/basis/group/actions/index.ts +++ b/src/modules/basis/group/actions/index.ts @@ -9,7 +9,7 @@ import { GroupState, MainGroupData, SelectData -} from '../models/basisGroupModel'; +} from '../models'; //# 나의 그룹 목록 조회 const MY_LIST_REQUEST = 'basis/group/MY_LIST_REQUEST'; diff --git a/src/modules/basis/group/apis/basisGroupApi.ts b/src/modules/basis/group/apis/index.ts similarity index 93% rename from src/modules/basis/group/apis/basisGroupApi.ts rename to src/modules/basis/group/apis/index.ts index abd824f4..34910a5b 100644 --- a/src/modules/basis/group/apis/basisGroupApi.ts +++ b/src/modules/basis/group/apis/index.ts @@ -7,7 +7,7 @@ import { JoinGroupData, UserGroupData, UserGroupState -} from '../models/basisGroupModel'; +} from '../models'; export const groupAPI = { // 내가 생성한 그룹 조회 @@ -71,12 +71,15 @@ export const groupAPI = { }); return await axios.get(`api/bas/group/join/list${queryString}`); }, + // 그룹 가입 요청 createJoinGroup: async (data: JoinGroupData) => { return await axios.post('api/bas/group/join/create', data); }, + // 가입한 그룹 상태값 변경 updateJoinGroup: async (data: JoinGroupData) => { return await axios.put('api/bas/group/join/update', data); }, + // 승인관리 목록 listGroupAprv: async (data: string, page: number) => { const queryString = qs.stringify(data, { addQueryPrefix: true, @@ -84,9 +87,11 @@ export const groupAPI = { }); return await axios.get(`api/bas/group/aprv/list${queryString}`); }, + // 승인처리 updateAprvGroup: async (data: AprvGroupData) => { return await axios.put('api/bas/group/aprv/update', data); }, + // 사용자관리 목록 listGroupUser: async (data: string) => { const queryString = qs.stringify(data, { addQueryPrefix: true, @@ -94,9 +99,11 @@ export const groupAPI = { }); return await axios.get(`api/bas/group/user/list${queryString}`); }, + // 사용자 권한 수정 updateUser: async (data: UserGroupData) => { return await axios.put('api/bas/group/user/update', data); }, + // master 권한 위임 delegateUser: async (data: UserGroupState) => { return await axios.put('api/bas/group/user/delegate', data); } diff --git a/src/modules/basis/group/index.ts b/src/modules/basis/group/index.ts index 069f04f2..2ac0c247 100644 --- a/src/modules/basis/group/index.ts +++ b/src/modules/basis/group/index.ts @@ -1,4 +1,4 @@ -export * from './actions/basisGroupAction'; -export * from './models/basisGroupModel'; -export * from './reducers/basisGroupReducer'; -export * from './sagas/basisGroupSaga'; +export * from './actions'; +export * from './models'; +export * from './reducers'; +export * from './sagas'; diff --git a/src/modules/basis/group/models/basisGroupModel.ts b/src/modules/basis/group/models/index.ts similarity index 100% rename from src/modules/basis/group/models/basisGroupModel.ts rename to src/modules/basis/group/models/index.ts diff --git a/src/modules/basis/group/reducers/basisGroupReducer.ts b/src/modules/basis/group/reducers/index.ts similarity index 96% rename from src/modules/basis/group/reducers/basisGroupReducer.ts rename to src/modules/basis/group/reducers/index.ts index fdb7bd10..5fb29ce0 100644 --- a/src/modules/basis/group/reducers/basisGroupReducer.ts +++ b/src/modules/basis/group/reducers/index.ts @@ -1,8 +1,8 @@ import { createReducer } from 'typesafe-actions'; import produce from 'immer'; -import * as Actions from '../actions/basisGroupAction'; -import { GroupState, initGroup } from '../models/basisGroupModel'; +import * as Actions from '../actions'; +import { GroupState, initGroup } from '../models'; export const groupReducer = createReducer( initGroup diff --git a/src/modules/basis/group/sagas/basisGroupSaga.ts b/src/modules/basis/group/sagas/index.ts similarity index 94% rename from src/modules/basis/group/sagas/basisGroupSaga.ts rename to src/modules/basis/group/sagas/index.ts index 0eba5169..ebabbc5b 100644 --- a/src/modules/basis/group/sagas/basisGroupSaga.ts +++ b/src/modules/basis/group/sagas/index.ts @@ -1,19 +1,9 @@ -import { - call, - put, - select, - takeEvery, - takeLatest -} from '@redux-saga/core/effects'; -import { AiFillCodeSandboxCircle } from 'react-icons/ai'; +import { call, put, takeEvery } from '@redux-saga/core/effects'; import { ActionType } from 'typesafe-actions'; -import * as Actions from '../actions/basisGroupAction'; +import * as Actions from '../actions'; import * as MessageActions from '../../../comn/message/actions/comnMessageAction'; -import * as Apis from '../apis/basisGroupApi'; -import * as Models from '../models/basisGroupModel'; -import { goBack } from 'connected-react-router'; -import { useDispatch } from 'react-redux'; +import * as Apis from '../apis'; import { DELETE_MESSAGE, ERROR_MESSAGE, @@ -44,7 +34,7 @@ function* listMyGroupSaga(action: ActionType) { count: count }) ); - } catch (error) { + } catch (error: any) { yield put(Actions.MY_LIST.failure(error)); } } @@ -76,7 +66,7 @@ function* listMyJoinSaga(action: ActionType) { count: count }) ); - } catch (error) { + } catch (error: any) { yield put(Actions.JOIN_LIST.failure(error)); } } @@ -109,7 +99,7 @@ function* GrouplistSaga( count: count }) ); - } catch (error) { + } catch (error: any) { yield put(Actions.GROUP_MAIN_LIST.failure(error)); } } @@ -140,7 +130,7 @@ function* myJoinSaga(action: ActionType) { count: count }) ); - } catch (error) { + } catch (error: any) { yield put(Actions.GROUP_MYLIST.failure(error)); } } @@ -153,7 +143,7 @@ function* createIdSaga( const { data } = yield call(Apis.groupAPI.createid); yield put(Actions.GROUP_CREATEID.success(data.result)); - } catch (error) { + } catch (error: any) { yield put(Actions.GROUP_CREATEID.failure(error)); } } @@ -167,7 +157,7 @@ function* detailGroupSaga( const { data } = res; yield put(Actions.GROUP_DETAIL.success(data)); - } catch (error) { + } catch (error: any) { yield put(Actions.GROUP_DETAIL.failure(error)); } } @@ -204,7 +194,7 @@ function* createGroupSaga( throw Error; } } - } catch (error) { + } catch (error: any) { yield put( MessageActions.IS_ERROR({ errorCode: ERROR_MESSAGE.code, @@ -250,7 +240,7 @@ function* updateGroupSaga( throw Error; } } - } catch (error) { + } catch (error: any) { yield put( MessageActions.IS_ERROR({ errorCode: ERROR_MESSAGE.code, @@ -284,7 +274,7 @@ function* deleteGroupSaga( } else { throw Error; } - } catch (error) { + } catch (error: any) { yield put( MessageActions.IS_ERROR({ errorCode: ERROR_MESSAGE.code, @@ -309,7 +299,7 @@ function* listGroupSaga(action: ActionType) { count: count }) ); - } catch (error) { + } catch (error: any) { yield put(Actions.GROUP_LIST.failure(error)); } } @@ -341,7 +331,7 @@ function* entireGroupListSaga( count }) ); - } catch (error) { + } catch (error: any) { yield put(Actions.ENTIRE_GROUP_LIST.failure(error)); } } @@ -360,7 +350,7 @@ function* groupJoinListSaga( count: count }) ); - } catch (error) { + } catch (error: any) { yield put(Actions.GROUP_JOINLIST.failure(error)); } } @@ -386,7 +376,7 @@ function* createJoinGroupSaga( } else { throw Error; } - } catch (error) { + } catch (error: any) { yield put( MessageActions.IS_ERROR({ errorCode: ERROR_MESSAGE.code, @@ -420,7 +410,7 @@ function* updateJoinGroupSaga( } else { throw Error; } - } catch (error) { + } catch (error: any) { yield put( MessageActions.IS_ERROR({ errorCode: ERROR_MESSAGE.code, @@ -451,7 +441,7 @@ function* aprvListSaga( total }) ); - } catch (error) { + } catch (error: any) { yield put(Actions.APPROVAL_LIST.failure(error)); } } @@ -477,7 +467,7 @@ function* updateAprvSaga( } else { throw Error; } - } catch (error) { + } catch (error: any) { yield put( MessageActions.IS_ERROR({ errorCode: ERROR_MESSAGE.code, @@ -509,7 +499,7 @@ function* userListSaga(action: ActionType) { total }) ); - } catch (error) { + } catch (error: any) { yield put(Actions.USER_LIST.failure(error)); } } @@ -535,7 +525,7 @@ function* updateUserSaga( } else { throw Error; } - } catch (error) { + } catch (error: any) { yield put( MessageActions.IS_ERROR({ errorCode: ERROR_MESSAGE.code, @@ -569,7 +559,7 @@ function* delegateUserSaga( } else { throw Error; } - } catch (error) { + } catch (error: any) { yield put( MessageActions.IS_ERROR({ errorCode: ERROR_MESSAGE.code,