From 9e66f2c1a32d6190e18a70178488086dfb9c7b00 Mon Sep 17 00:00:00 2001 From: sanguu516 Date: Tue, 16 Jul 2024 18:43:47 +0900 Subject: [PATCH] =?UTF-8?q?=EA=B2=80=ED=86=A0=20=EC=99=84=EB=A3=8C=20?= =?UTF-8?q?=EB=B2=84=ED=8A=BC=20=EA=B8=B0=EB=8A=A5=20=EC=B6=94=EA=B0=80(?= =?UTF-8?q?=EC=9E=91=EC=97=85=EC=A4=91)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../flight/ControlApprovalsTable.js | 25 +++++++++++++++++-- src/redux/features/laanc/laancThunk.ts | 2 +- 2 files changed, 24 insertions(+), 3 deletions(-) diff --git a/src/components/flight/ControlApprovalsTable.js b/src/components/flight/ControlApprovalsTable.js index c470bd49..5a32310b 100644 --- a/src/components/flight/ControlApprovalsTable.js +++ b/src/components/flight/ControlApprovalsTable.js @@ -1088,7 +1088,6 @@ export default function ControlApprovalsTable(props) { setCheckList(newList); }; - console.log('check>>', checkList); // 자식 테이블 체크박스 const childRowSelection = { selectedRowKeys: checkList.filter(key => key.startsWith('child_')), @@ -1112,6 +1111,28 @@ export default function ControlApprovalsTable(props) { } }; + // 체크박스 업데이트 함수 + const handleCheckbox = async () => { + try { + const planAreaSnoList = [ + ...new Set( + checkList + .filter(item => item.startsWith('child_')) // 'child_'로 시작하는 항목 필터링 + .map(item => item.split('_').pop()) // 마지막 언더바 이후의 숫자 추출 + ) + ]; + await dispatch( + updateLaancAprvReview({ planAreaSnoList, reviewedType: 'R' }) + ); + await dispatch( + getLaancAprvList({ + searchStDt: props.startDate, + searchEndDt: props.endDate + }) + ); + } catch (error) {} + }; + return (
@@ -1135,7 +1156,7 @@ export default function ControlApprovalsTable(props) {
-