From 7e17bd36b1e2ccc8ad015fd7c10368ca65325108 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?junh=5Feee=28=EC=9D=B4=EC=A4=80=ED=9D=AC=29?= Date: Wed, 4 Sep 2024 11:48:53 +0900 Subject: [PATCH] =?UTF-8?q?feat/=20=EA=B4=80=EC=A0=9C=EA=B3=BC=20=EB=B9=84?= =?UTF-8?q?=ED=96=89=EC=8A=B9=EC=9D=B8=EB=AA=A9=EB=A1=9D=20=EB=B3=80?= =?UTF-8?q?=EA=B2=BD=EA=B0=90=EC=A7=80=EC=8B=9C=20=EC=83=88=EB=A1=9C?= =?UTF-8?q?=EA=B3=A0=EC=B9=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../flight/ControlApprovalsTable.js | 11 +++- .../flight/OperationApprovalsTable.js | 1 - src/components/websocket/WebsocketClient.js | 2 - .../flight/ControlApprovalsContainer.js | 42 +++++++------- .../flight/OperationApprovalsContainer.js | 55 +++++++------------ 5 files changed, 51 insertions(+), 60 deletions(-) diff --git a/src/components/flight/ControlApprovalsTable.js b/src/components/flight/ControlApprovalsTable.js index 1b86e445..253768bf 100644 --- a/src/components/flight/ControlApprovalsTable.js +++ b/src/components/flight/ControlApprovalsTable.js @@ -16,6 +16,7 @@ import { import { ConfirmModal } from '@component/modal/ConfirmModal'; import { ERROR_MESSAGE, ERROR_TITLE } from '@src/configs/msgConst'; import ScrollContainer from 'react-indiana-drag-scroll'; +import { clientRefreshAprvListParam } from '@src/redux/features/laanc/laancSlice'; export default function ControlApprovalsTable(props) { const dispatch = useDispatch(); @@ -54,6 +55,15 @@ export default function ControlApprovalsTable(props) { const [currentPlanAreaSno, setCurrentPlanAreaSno] = useState(null); + useEffect(() => { + dispatch( + clientRefreshAprvListParam({ + searchStDt: props.startDate, + searchEndDt: props.endDate + }) + ); + }, []); + useEffect(() => { let approvalCdValue = { S: 0, F: 0, C: 0, U: 0 }; @@ -94,7 +104,6 @@ export default function ControlApprovalsTable(props) { handleSave, ...restProps }) => { - console.log('record>>>', record); // 저장 이벤트 const save = async () => { try { diff --git a/src/components/flight/OperationApprovalsTable.js b/src/components/flight/OperationApprovalsTable.js index 678bcf28..077a715c 100644 --- a/src/components/flight/OperationApprovalsTable.js +++ b/src/components/flight/OperationApprovalsTable.js @@ -74,7 +74,6 @@ export default function OperationApprovalsTable(props) { }, []); useEffect(() => { - console.log(laancAprvList, '----list'); let approvalCdValue = { S: 0, F: 0, C: 0, U: 0 }; laancAprvList?.map(item => { diff --git a/src/components/websocket/WebsocketClient.js b/src/components/websocket/WebsocketClient.js index bc81f61a..609bc5de 100644 --- a/src/components/websocket/WebsocketClient.js +++ b/src/components/websocket/WebsocketClient.js @@ -49,8 +49,6 @@ const WebsocketClient = () => { const data = e.data; const key = JSON.parse(data); - - console.log(key, '-------'); dispatch(getLaancAprvList({ ...laancAprvParamRef.current })); }; }; diff --git a/src/containers/flight/ControlApprovalsContainer.js b/src/containers/flight/ControlApprovalsContainer.js index 370a565b..f23b1438 100644 --- a/src/containers/flight/ControlApprovalsContainer.js +++ b/src/containers/flight/ControlApprovalsContainer.js @@ -17,7 +17,8 @@ import { useHistory } from 'react-router-dom'; import useMapType from '@hooks/useMapType'; import { clientSaveAreaCoordinateList, - clientChangeDrawType + clientChangeDrawType, + clientRefreshAprvListParam } from '@src/redux/features/laanc/laancSlice'; import { MapControl } from '../../components/map/MapControl'; import { clientSetIsMapLoading } from '@src/redux/features/laanc/laancSlice'; @@ -233,25 +234,26 @@ export default function ControlApprovalsContainer({ mode }) { setStartDate(searchDate.startDate); setEndDate(searchDate.endDate); - dispatch( - getLaancAprvList({ - searchStDt: searchDate.startDate, - searchEndDt: searchDate.endDate, - ctprvn: filterArea.ctprvn === '시/도' ? '' : filterArea.ctprvn, - sig: filterArea.sig === '군/구' ? '' : filterArea.sig, - address: filterArea.address, - limitZoneCd: - checkState.limitZoneNm === '전체' ? '' : checkState.limitZoneNm, - ...(search !== '' ? { applyNo: search } : {}), - ...(checkState.reviewedType !== '전체' - ? { reviewedType: checkState.reviewedType } - : {}), - ...(checkState.reviewedProcType !== '전체' - ? { reviewedProcType: checkState.reviewedProcType } - : {}) - }) - ); - // ); + const param = { + searchStDt: searchDate.startDate, + searchEndDt: searchDate.endDate, + ctprvn: filterArea.ctprvn === '시/도' ? '' : filterArea.ctprvn, + sig: filterArea.sig === '군/구' ? '' : filterArea.sig, + address: filterArea.address, + limitZoneCd: + checkState.limitZoneNm === '전체' ? '' : checkState.limitZoneNm, + ...(search !== '' ? { applyNo: search } : {}), + ...(checkState.reviewedType !== '전체' + ? { reviewedType: checkState.reviewedType } + : {}), + ...(checkState.reviewedProcType !== '전체' + ? { reviewedProcType: checkState.reviewedProcType } + : {}) + }; + + dispatch(getLaancAprvList(param)); + dispatch(clientRefreshAprvListParam(param)); + setFilter(search); }; diff --git a/src/containers/flight/OperationApprovalsContainer.js b/src/containers/flight/OperationApprovalsContainer.js index cdfce347..7846aeef 100644 --- a/src/containers/flight/OperationApprovalsContainer.js +++ b/src/containers/flight/OperationApprovalsContainer.js @@ -276,43 +276,26 @@ export default function OperationApprovalsContainer({ mode }) { setStartDate(searchDate.startDate); setEndDate(searchDate.endDate); - dispatch( - getLaancAprvList({ - searchStDt: searchDate.startDate, - searchEndDt: searchDate.endDate, - ctprvn: filterArea.ctprvn === '시/도' ? '' : filterArea.ctprvn, - sig: filterArea.sig === '군/구' ? '' : filterArea.sig, - address: filterArea.address, - limitZoneCd: - checkState.limitZoneNm === '전체' ? '' : checkState.limitZoneNm, - ...(search !== '' ? { applyNo: search } : {}), - ...(checkState.reviewedType !== '전체' - ? { reviewedType: checkState.reviewedType } - : {}), - ...(checkState.reviewedProcType !== '전체' - ? { reviewedProcType: checkState.reviewedProcType } - : {}) - }) - ); + const param = { + searchStDt: searchDate.startDate, + searchEndDt: searchDate.endDate, + ctprvn: filterArea.ctprvn === '시/도' ? '' : filterArea.ctprvn, + sig: filterArea.sig === '군/구' ? '' : filterArea.sig, + address: filterArea.address, + limitZoneCd: + checkState.limitZoneNm === '전체' ? '' : checkState.limitZoneNm, + ...(search !== '' ? { applyNo: search } : {}), + ...(checkState.reviewedType !== '전체' + ? { reviewedType: checkState.reviewedType } + : {}), + ...(checkState.reviewedProcType !== '전체' + ? { reviewedProcType: checkState.reviewedProcType } + : {}) + }; + + dispatch(getLaancAprvList(param)); + dispatch(clientRefreshAprvListParam(param)); - dispatch( - clientRefreshAprvListParam({ - searchStDt: searchDate.startDate, - searchEndDt: searchDate.endDate, - ctprvn: filterArea.ctprvn === '전체' ? '' : filterArea.ctprvn, - sig: filterArea.sig === '전체' ? '' : filterArea.sig, - address: filterArea.address, - limitZoneCd: - checkState.limitZoneNm === '전체' ? '' : checkState.limitZoneNm, - ...(search !== '' ? { applyNo: search } : {}), - ...(checkState.reviewedType !== '전체' - ? { reviewedType: checkState.reviewedType } - : {}), - ...(checkState.reviewedProcType !== '전체' - ? { reviewedProcType: checkState.reviewedProcType } - : {}) - }) - ); setFilter(search); };