sanguu(박상현) 2 years ago
parent
commit
84d1ee36dc
  1. 6
      src/containers/analysis/history/AnalysisHistoryContainer.js
  2. 12
      src/containers/basis/dron/BasisDronContainer.js
  3. 36
      src/containers/basis/flight/aprv/FlightPlanAprvContainer.js
  4. 28
      src/containers/basis/flight/plan/FlightPlanContainer.js
  5. 29
      src/containers/basis/group/BasisGroupApprovalContainer.js
  6. 29
      src/containers/basis/group/BasisGroupUsersContainer.js
  7. 14
      src/modules/basis/flight/actions/basisFlightAction.ts
  8. 14
      src/modules/basis/flight/models/basisFlightModel.ts
  9. 15
      src/modules/basis/flight/reducers/basisFlightReducer.ts
  10. 9
      src/modules/basis/group/actions/basisGroupAction.ts
  11. 7
      src/modules/basis/group/models/basisGroupModel.ts
  12. 12
      src/modules/basis/group/reducers/basisGroupReducer.ts

6
src/containers/analysis/history/AnalysisHistoryContainer.js

@ -87,9 +87,9 @@ export const AnalysisHistoryContainer = props => {
}); });
}, [searchData.groupId]); }, [searchData.groupId]);
useEffect(() => { // useEffect(() => {
handlerGroupCancel(); // handlerGroupCancel();
}, []); // }, []);
const onKeyPress = e => { const onKeyPress = e => {
if (e.key == 'Enter') { if (e.key == 'Enter') {

12
src/containers/basis/dron/BasisDronContainer.js

@ -173,12 +173,12 @@ export const BasisDronContainer = props => {
// return; // return;
// }; // };
useEffect(() => { // useEffect(() => {
handlerCancel(); // handlerCancel();
// if (selectData) { // // if (selectData) {
// handlerDronSearch(); // // handlerDronSearch();
// } // // }
}, []); // }, []);
useEffect(() => { useEffect(() => {
if (user?.cstmrSno) { if (user?.cstmrSno) {

36
src/containers/basis/flight/aprv/FlightPlanAprvContainer.js

@ -33,7 +33,8 @@ const FlightPlanAprvContainer = () => {
const { const {
list: aprvList, list: aprvList,
aprvProc, aprvProc,
selectGroup, // selectGroup,
aprvSelect,
total total
} = useSelector(state => state.flightState); } = useSelector(state => state.flightState);
const { joinList, joinListCount, groupList, groupListCount } = useSelector( const { joinList, joinListCount, groupList, groupListCount } = useSelector(
@ -91,7 +92,8 @@ const FlightPlanAprvContainer = () => {
name: '', name: '',
sortable: true, sortable: true,
cell: row => { cell: row => {
return selectGroup?.groupId === row?.groupId ? ( // return selectGroup?.groupId === row?.groupId ? (
return aprvSelect?.groupId === row?.groupId ? (
<Button.Ripple <Button.Ripple
color='danger' color='danger'
className='badge badge-danger' className='badge badge-danger'
@ -130,7 +132,12 @@ const FlightPlanAprvContainer = () => {
param.groupId = groupId; param.groupId = groupId;
dispatch( dispatch(
FlightAction.FLIGHT_PLAN_GROUP_SELECT({ // FlightAction.FLIGHT_PLAN_GROUP_SELECT({
// cstmrSno: user.cstmrSno,
// groupId: groupId,
// groupNm: groupNm
// })
FlightAction.FLIGHT_PLAN_APRV_GROUP_SELECT({
cstmrSno: user.cstmrSno, cstmrSno: user.cstmrSno,
groupId: groupId, groupId: groupId,
groupNm: groupNm groupNm: groupNm
@ -168,7 +175,8 @@ const FlightPlanAprvContainer = () => {
const handlerGroupCancel = () => { const handlerGroupCancel = () => {
dispatch( dispatch(
FlightAction.FLIGHT_PLAN_GROUP_SELECT({ // FlightAction.FLIGHT_PLAN_GROUP_SELECT({
FlightAction.FLIGHT_PLAN_APRV_GROUP_SELECT({
cstmrSno: 0, cstmrSno: 0,
groupId: '', groupId: '',
groupNm: '' groupNm: ''
@ -177,10 +185,17 @@ const FlightPlanAprvContainer = () => {
}; };
// 최초 비행계획서 목록 조회 // 최초 비행계획서 목록 조회
// useEffect(() => {
// handlerGroupCancel();
// // handleSearch(searchData);
// }, []);
useEffect(() => { useEffect(() => {
handlerGroupCancel(); if (searchData?.groupId) {
// handleSearch(searchData); handleSearch(searchData);
}, []); }
}, [searchData]);
useEffect(() => { useEffect(() => {
if (user?.cstmrSno) { if (user?.cstmrSno) {
if (user.authId === 'SUPER' || user.authId === 'ADMIN') { if (user.authId === 'SUPER' || user.authId === 'ADMIN') {
@ -194,6 +209,7 @@ const FlightPlanAprvContainer = () => {
} }
} }
}, [user]); }, [user]);
useEffect(() => { useEffect(() => {
if (aprvProc && aprvProc.result > 0) { if (aprvProc && aprvProc.result > 0) {
handleSearch(searchData); handleSearch(searchData);
@ -284,7 +300,8 @@ const FlightPlanAprvContainer = () => {
</Col> </Col>
{/* <Col sm='8'> */} {/* <Col sm='8'> */}
<Col sm='12' lg='12'> <Col sm='12' lg='12'>
{selectGroup.cstmrSno !== 0 ? ( {/* {selectGroup.cstmrSno !== 0 ? ( */}
{aprvSelect.cstmrSno !== 0 ? (
<> <>
<FlightPlanAprvSearch <FlightPlanAprvSearch
searchData={searchData} searchData={searchData}
@ -298,7 +315,8 @@ const FlightPlanAprvContainer = () => {
{...(user?.authId === 'SUPER' || user?.authId === 'ADMIN' {...(user?.authId === 'SUPER' || user?.authId === 'ADMIN'
? { joinList: groupList } ? { joinList: groupList }
: { joinList: joinList })} : { joinList: joinList })}
selectGroup={selectGroup} // selectGroup={selectGroup}
selectGroup={aprvSelect}
handleChangeSelected={handleChangeSelected} handleChangeSelected={handleChangeSelected}
selPlanSnoList={selPlanSnoList} selPlanSnoList={selPlanSnoList}
setSelPlanSnoList={setSelPlanSnoList} setSelPlanSnoList={setSelPlanSnoList}

28
src/containers/basis/flight/plan/FlightPlanContainer.js

@ -32,7 +32,8 @@ const FlightPlanContainer = () => {
const { const {
list: planListData, list: planListData,
detail: planDetailData, detail: planDetailData,
selectGroup, listSelect,
// selectGroup,
areaCoordList, areaCoordList,
total total
} = useSelector(state => state.flightState); } = useSelector(state => state.flightState);
@ -79,7 +80,8 @@ const FlightPlanContainer = () => {
param.groupId = groupId; param.groupId = groupId;
dispatch( dispatch(
FlightAction.FLIGHT_PLAN_GROUP_SELECT({ // FlightAction.FLIGHT_PLAN_GROUP_SELECT({
FlightAction.FLIGHT_PLAN_LIST_GROUP_SELECT({
cstmrSno: user.cstmrSno, cstmrSno: user.cstmrSno,
groupId: groupId, groupId: groupId,
groupNm: groupNm groupNm: groupNm
@ -118,7 +120,8 @@ const FlightPlanContainer = () => {
const handlerGroupCancel = () => { const handlerGroupCancel = () => {
dispatch( dispatch(
FlightAction.FLIGHT_PLAN_GROUP_SELECT({ // FlightAction.FLIGHT_PLAN_GROUP_SELECT({
FlightAction.FLIGHT_PLAN_LIST_GROUP_SELECT({
cstmrSno: 0, cstmrSno: 0,
groupId: '', groupId: '',
groupNm: '' groupNm: ''
@ -126,6 +129,16 @@ const FlightPlanContainer = () => {
); );
}; };
// useEffect(() => {
// handlerGroupCancel();
// }, []);
useEffect(() => {
if (searchData?.groupId) {
handleSearch(searchData);
}
}, [searchData]);
useEffect(() => { useEffect(() => {
if (user?.cstmrSno) { if (user?.cstmrSno) {
if (user.authId === 'SUPER' || user.authId === 'ADMIN') { if (user.authId === 'SUPER' || user.authId === 'ADMIN') {
@ -140,9 +153,6 @@ const FlightPlanContainer = () => {
} }
}, [user]); }, [user]);
useEffect(() => {
handlerGroupCancel();
}, []);
const onChangePage = page => { const onChangePage = page => {
dispatch(FlightAction.FLIGHT_PLAN_LIST.request({ ...searchData, page })); dispatch(FlightAction.FLIGHT_PLAN_LIST.request({ ...searchData, page }));
}; };
@ -160,7 +170,8 @@ const FlightPlanContainer = () => {
{...(user?.authId === 'SUPER' || user?.authId === 'ADMIN' {...(user?.authId === 'SUPER' || user?.authId === 'ADMIN'
? { count: groupListCount } ? { count: groupListCount }
: { count: joinListCount })} : { count: joinListCount })}
selectGroup={selectGroup} // selectGroup={selectGroup}
selectGroup={listSelect}
handleGroupSelect={handleGroupSelect} handleGroupSelect={handleGroupSelect}
handlerGroupCancel={handlerGroupCancel} handlerGroupCancel={handlerGroupCancel}
pagination={true} pagination={true}
@ -172,7 +183,8 @@ const FlightPlanContainer = () => {
)} )}
</Col> </Col>
<Col sm='12' lg='12'> <Col sm='12' lg='12'>
{selectGroup.cstmrSno !== 0 ? ( {/* {selectGroup.cstmrSno !== 0 ? ( */}
{listSelect.cstmrSno !== 0 ? (
<> <>
<FlightPlanSearch <FlightPlanSearch
searchData={searchData} searchData={searchData}

29
src/containers/basis/group/BasisGroupApprovalContainer.js

@ -17,7 +17,8 @@ export const BasisGroupApprovalContainer = props => {
joinListCount, joinListCount,
groupList, groupList,
groupListCount, groupListCount,
selectData, // selectData,
aprvSelect,
total total
} = useSelector(state => state.groupState); } = useSelector(state => state.groupState);
@ -71,7 +72,8 @@ export const BasisGroupApprovalContainer = props => {
// width: '100px', // width: '100px',
sortable: true, sortable: true,
cell: row => { cell: row => {
return selectData?.groupId === row?.groupId ? ( // return selectData?.groupId === row?.groupId ? (
return aprvSelect?.groupId === row?.groupId ? (
<Button.Ripple <Button.Ripple
color='danger' color='danger'
className='badge badge-danger' className='badge badge-danger'
@ -107,7 +109,10 @@ export const BasisGroupApprovalContainer = props => {
(user.authId === 'USER' && groupAuthCd === 'MASTER') || (user.authId === 'USER' && groupAuthCd === 'MASTER') ||
(user.authId === 'USER' && aprvlYn === 'Y' && groupAuthCd === 'LEADER') (user.authId === 'USER' && aprvlYn === 'Y' && groupAuthCd === 'LEADER')
) { ) {
dispatch(Actions.SELECT({ groupId: groupId, groupNm: groupNm })); // dispatch(Actions.SELECT({ groupId: groupId, groupNm: groupNm }));
dispatch(
Actions.GROUP_APRV_SELECT({ groupId: groupId, groupNm: groupNm })
);
if (user?.cstmrSno) { if (user?.cstmrSno) {
setParams({ setParams({
@ -138,7 +143,8 @@ export const BasisGroupApprovalContainer = props => {
}; };
const handlerCancel = () => { const handlerCancel = () => {
dispatch(Actions.SELECT()); // dispatch(Actions.SELECT());
dispatch(Actions.GROUP_APRV_SELECT());
setParams({ setParams({
...params, ...params,
@ -152,7 +158,8 @@ export const BasisGroupApprovalContainer = props => {
setParams({ setParams({
...params, ...params,
cstmrSno: user?.cstmrSno, cstmrSno: user?.cstmrSno,
groupId: selectData?.groupId, // groupId: selectData?.groupId,
groupId: aprvSelect?.groupId,
aprvYn: '' aprvYn: ''
}); });
if (user.authId === 'SUPER' || user.authId === 'ADMIN') { if (user.authId === 'SUPER' || user.authId === 'ADMIN') {
@ -161,7 +168,8 @@ export const BasisGroupApprovalContainer = props => {
dispatch( dispatch(
Actions.JOIN_LIST.request({ Actions.JOIN_LIST.request({
cstmrSno: user?.cstmrSno, cstmrSno: user?.cstmrSno,
groupId: selectData?.groupId // groupId: selectData?.groupId
groupId: aprvSelect?.groupId
}) })
); );
} }
@ -307,9 +315,9 @@ export const BasisGroupApprovalContainer = props => {
} }
}; };
useEffect(() => { // useEffect(() => {
handlerCancel(); // handlerCancel();
}, []); // }, []);
const handlerSearch = () => { const handlerSearch = () => {
const param = params; const param = params;
@ -391,7 +399,8 @@ export const BasisGroupApprovalContainer = props => {
)} )}
</Col> </Col>
<Col sm='12' lg='12'> <Col sm='12' lg='12'>
{!selectData ? ( {/* {!selectData ? ( */}
{!aprvSelect ? (
<div className='mt-2 no-dataTable'> <div className='mt-2 no-dataTable'>
그룹 목록에서 상세보기를 클릭하세요. 그룹 목록에서 상세보기를 클릭하세요.
</div> </div>

29
src/containers/basis/group/BasisGroupUsersContainer.js

@ -16,9 +16,9 @@ export const BasisGroupUsersContainer = props => {
joinListCount, joinListCount,
groupList, groupList,
groupListCount, groupListCount,
selectData, // selectData,
userSelect,
userCount, userCount,
userList, userList,
count, count,
total total
@ -90,7 +90,8 @@ export const BasisGroupUsersContainer = props => {
name: '', name: '',
sortable: true, sortable: true,
cell: row => { cell: row => {
return selectData?.groupId === row?.groupId ? ( // return selectData?.groupId === row?.groupId ? (
return userSelect?.groupId === row?.groupId ? (
<Button.Ripple <Button.Ripple
color='danger' color='danger'
className='badge badge-danger' className='badge badge-danger'
@ -284,10 +285,10 @@ export const BasisGroupUsersContainer = props => {
} }
]; ];
useEffect(() => { // useEffect(() => {
// handlerSearch(); // // handlerSearch();
handlerCancel(); // handlerCancel();
}, []); // }, []);
const handlerSearch = () => { const handlerSearch = () => {
if (params.cstmrSno && user?.cstmrSno) { if (params.cstmrSno && user?.cstmrSno) {
@ -312,7 +313,8 @@ export const BasisGroupUsersContainer = props => {
dispatch( dispatch(
Actions.JOIN_LIST.request({ Actions.JOIN_LIST.request({
cstmrSno: user.cstmrSno, cstmrSno: user.cstmrSno,
groupId: selectData?.groupId // groupId: selectData?.groupId
groupId: userSelect?.groupId
}) })
); );
} }
@ -326,7 +328,8 @@ export const BasisGroupUsersContainer = props => {
const handlerDetail = (groupId, groupNm, groupAuthCd, aprvlYn) => { const handlerDetail = (groupId, groupNm, groupAuthCd, aprvlYn) => {
//권한 상관없이 조회 가능 //권한 상관없이 조회 가능
dispatch(Actions.SELECT({ groupId: groupId, groupNm, groupNm })); // dispatch(Actions.SELECT({ groupId: groupId, groupNm, groupNm }));
dispatch(Actions.GROUP_USER_SELECT({ groupId: groupId, groupNm, groupNm }));
const param = params; const param = params;
param.groupId = groupId; param.groupId = groupId;
param.memberNm = ''; param.memberNm = '';
@ -340,7 +343,8 @@ export const BasisGroupUsersContainer = props => {
}; };
const handlerCancel = () => { const handlerCancel = () => {
dispatch(Actions.SELECT()); // dispatch(Actions.SELECT());
dispatch(Actions.GROUP_USER_SELECT());
setParams({ setParams({
...params, ...params,
groupId: '', groupId: '',
@ -473,7 +477,7 @@ export const BasisGroupUsersContainer = props => {
</Col> </Col>
{/* <Col sm='12'> */} {/* <Col sm='12'> */}
<Col sm='12' lg='12'> <Col sm='12' lg='12'>
{selectData ? ( {userSelect ? (
<> <>
<BasisGroupUsersSearch <BasisGroupUsersSearch
handlerInput={handlerInput} handlerInput={handlerInput}
@ -498,7 +502,8 @@ export const BasisGroupUsersContainer = props => {
</Col> </Col>
{/* <Col sm='12'> */} {/* <Col sm='12'> */}
<Col sm='12' lg='12'> <Col sm='12' lg='12'>
{selectData ? ( {/* {selectData ? ( */}
{userSelect ? (
<BasisGroupUsersGrid <BasisGroupUsersGrid
data={userList} data={userList}
title={'사용자'} title={'사용자'}

14
src/modules/basis/flight/actions/basisFlightAction.ts

@ -80,6 +80,10 @@ const AREA_DETAIL_LIST = 'basis/flight/plan/area/DETAIL_LIST';
// 비행계획서 그룹 선택 // 비행계획서 그룹 선택
const ROUP_SELECT = 'basis/flight/plan/group/select'; const ROUP_SELECT = 'basis/flight/plan/group/select';
// 비행계획서 그룹 선택(목록)
const LIST_GROUP_SELECT = 'basis/flight/plan/group/list/select';
// 비행계획서 그룹 선택(승인)
const APRV_GROUP_SELECT = 'basis/flight/plan/group/aprv/select';
// 조종사, 기체 선택 초기화 // 조종사, 기체 선택 초기화
const AREA_DETAIL_INITIAL = 'basis/flight/plan/detail/AREA_DETAIL_INIT'; const AREA_DETAIL_INITIAL = 'basis/flight/plan/detail/AREA_DETAIL_INIT';
@ -224,6 +228,14 @@ export const AREA_DETAIL_LIST_SAVE =
export const FLIGHT_PLAN_GROUP_SELECT = export const FLIGHT_PLAN_GROUP_SELECT =
createAction(ROUP_SELECT)<SelectGroupData>(); createAction(ROUP_SELECT)<SelectGroupData>();
// 비행 계획서 그룹 선택(목록)
export const FLIGHT_PLAN_LIST_GROUP_SELECT =
createAction(LIST_GROUP_SELECT)<SelectGroupData>();
// 비행 계획서 그룹 선택(승인)
export const FLIGHT_PLAN_APRV_GROUP_SELECT =
createAction(APRV_GROUP_SELECT)<SelectGroupData>();
// 비행 구역 상세 값 초기화 // 비행 구역 상세 값 초기화
export const AREA_DETAIL_INIT = createAction(AREA_DETAIL_INITIAL)(); export const AREA_DETAIL_INIT = createAction(AREA_DETAIL_INITIAL)();
@ -285,6 +297,8 @@ const actions = {
AREA_COORDINATE_LIST_SAVE, AREA_COORDINATE_LIST_SAVE,
AREA_DETAIL_LIST_SAVE, AREA_DETAIL_LIST_SAVE,
FLIGHT_PLAN_GROUP_SELECT, FLIGHT_PLAN_GROUP_SELECT,
FLIGHT_PLAN_APRV_GROUP_SELECT,
FLIGHT_PLAN_LIST_GROUP_SELECT,
FLIGHT_PLAN_AREA_BUFFER_LIST, FLIGHT_PLAN_AREA_BUFFER_LIST,
AREA_DETAIL_INIT, AREA_DETAIL_INIT,
FLIGHT_APRV_LIST, FLIGHT_APRV_LIST,

14
src/modules/basis/flight/models/basisFlightModel.ts

@ -11,7 +11,6 @@ export interface FlightState {
arcrftSelect: FlightPlanArcrftData | undefined; arcrftSelect: FlightPlanArcrftData | undefined;
areaCoordList: FlightPlanAreaData[] | undefined; areaCoordList: FlightPlanAreaData[] | undefined;
areaList: FlightPlanAreaData[] | undefined; areaList: FlightPlanAreaData[] | undefined;
selectGroup: SelectGroupData | undefined;
aprvList: [FlightPlanData] | undefined; aprvList: [FlightPlanData] | undefined;
aprvProc: any | undefined; aprvProc: any | undefined;
scheduleList: BasFlightScheduleList[] | []; scheduleList: BasFlightScheduleList[] | [];
@ -19,6 +18,9 @@ export interface FlightState {
total: number | 0; total: number | 0;
conut: number | 0; conut: number | 0;
weather: resweatherData | undefined; weather: resweatherData | undefined;
selectGroup: SelectGroupData | undefined;
listSelect: SelectGroupData | undefined;
aprvSelect: SelectGroupData | undefined;
} }
export interface weatherData { export interface weatherData {
serviceKey: string; serviceKey: string;
@ -242,6 +244,16 @@ export const initFlight = {
groupId: '', groupId: '',
groupNm: '' groupNm: ''
}, },
listSelect: {
cstmrSno: 0,
groupId: '',
groupNm: ''
},
aprvSelect: {
cstmrSno: 0,
groupId: '',
groupNm: ''
},
publicAreaList: undefined, publicAreaList: undefined,
flightPlanArea: undefined, flightPlanArea: undefined,
list: undefined, list: undefined,

15
src/modules/basis/flight/reducers/basisFlightReducer.ts

@ -105,6 +105,21 @@ export const flightReducer = createReducer<FlightState, Actions.FlightAction>(
draft.selectGroup = data; draft.selectGroup = data;
}) })
) )
// 비행 계획서 그룹 선택(목록)
.handleAction(Actions.FLIGHT_PLAN_LIST_GROUP_SELECT, (state, action) =>
produce(state, draft => {
const data = action.payload;
draft.listSelect = data;
})
)
// 비행 계획서 그룹 선택(목록)
.handleAction(Actions.FLIGHT_PLAN_APRV_GROUP_SELECT, (state, action) =>
produce(state, draft => {
const data = action.payload;
draft.aprvSelect = data;
})
)
// 비행 계획서 버퍼 영역 조회 // 비행 계획서 버퍼 영역 조회
.handleAction(Actions.FLIGHT_PLAN_AREA_BUFFER_LIST.success, (state, action) => .handleAction(Actions.FLIGHT_PLAN_AREA_BUFFER_LIST.success, (state, action) =>
produce(state, draft => { produce(state, draft => {

9
src/modules/basis/group/actions/basisGroupAction.ts

@ -104,6 +104,8 @@ const GROUP_MAIN_LIST_FAILURE = 'basis/group/GROUP_MAIN_LIST_FAILURE';
//그룹 선택 //그룹 선택
const SELECT_GROUP = 'basis/group/SELECT_GROUP'; 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( export const MY_LIST = createAsyncAction(
MY_LIST_REQUEST, MY_LIST_REQUEST,
@ -221,6 +223,8 @@ export const USER_DELEGATE = createAsyncAction(
)<UserGroupState, string, AxiosError>(); )<UserGroupState, string, AxiosError>();
export const SELECT = createAction(SELECT_GROUP)<SelectData>(); export const SELECT = createAction(SELECT_GROUP)<SelectData>();
export const GROUP_APRV_SELECT = createAction(APRV_GROUP_SELECT)<SelectData>();
export const GROUP_USER_SELECT = createAction(USER_GROUP_SELECT)<SelectData>();
const actions = { const actions = {
MY_LIST, MY_LIST,
@ -241,7 +245,10 @@ const actions = {
USER_DELEGATE, USER_DELEGATE,
GROUP_MYLIST, GROUP_MYLIST,
GROUP_MAIN_LIST, GROUP_MAIN_LIST,
SELECT
SELECT,
GROUP_APRV_SELECT,
GROUP_USER_SELECT
}; };
export type GroupAction = ActionType<typeof actions>; export type GroupAction = ActionType<typeof actions>;

7
src/modules/basis/group/models/basisGroupModel.ts

@ -8,7 +8,6 @@ export interface GroupState {
groupList: GroupData[] | undefined; groupList: GroupData[] | undefined;
aprvList: AprvGroupData[] | undefined; aprvList: AprvGroupData[] | undefined;
userList: UserGroupData[] | undefined; userList: UserGroupData[] | undefined;
selectData: SelectData | undefined;
groupId: string | ''; groupId: string | '';
newGroupId: String | ''; newGroupId: String | '';
searchParams: string | ''; searchParams: string | '';
@ -23,6 +22,10 @@ export interface GroupState {
groupListCount: number | 0; groupListCount: number | 0;
aprvCount: number | 0; aprvCount: number | 0;
userCount: number | 0; userCount: number | 0;
selectData: SelectData | undefined;
aprvSelect: SelectData | undefined;
userSelect: SelectData | undefined;
} }
export interface GroupSearchData { export interface GroupSearchData {
@ -123,6 +126,8 @@ export const initGroup = {
searchParams: '', searchParams: '',
error: undefined, error: undefined,
selectData: undefined, selectData: undefined,
aprvSelect: undefined,
userSelect: undefined,
page: 1, page: 1,
total: 0, total: 0,
count: 0 count: 0

12
src/modules/basis/group/reducers/basisGroupReducer.ts

@ -106,4 +106,16 @@ export const groupReducer = createReducer<GroupState, Actions.GroupAction>(
const selectData = action.payload; const selectData = action.payload;
draft.selectData = selectData; draft.selectData = selectData;
}) })
)
.handleAction(Actions.GROUP_APRV_SELECT, (state, action) =>
produce(state, draft => {
const selectData = action.payload;
draft.aprvSelect = selectData;
})
)
.handleAction(Actions.GROUP_USER_SELECT, (state, action) =>
produce(state, draft => {
const selectData = action.payload;
draft.userSelect = selectData;
})
); );

Loading…
Cancel
Save