From f9a20bbceb03ed2fbcc8f9eac7b16fdd06856b85 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?sanguu=28=EB=B0=95=EC=83=81=ED=98=84=29?= Date: Thu, 20 Oct 2022 15:31:45 +0900 Subject: [PATCH] =?UTF-8?q?=EA=B8=B0=EC=B2=B4=EC=A0=95=EB=B3=B4-=EB=AF=B8?= =?UTF-8?q?=EC=99=84=EC=84=B1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/basis/dron/BasisIdntform.js | 8 +- .../basis/dron/BasisIdntfContainer.js | 76 ++++++++++--------- 2 files changed, 48 insertions(+), 36 deletions(-) diff --git a/src/components/basis/dron/BasisIdntform.js b/src/components/basis/dron/BasisIdntform.js index cf06d84..13b87ed 100644 --- a/src/components/basis/dron/BasisIdntform.js +++ b/src/components/basis/dron/BasisIdntform.js @@ -64,9 +64,15 @@ export const BasisIdntfForm = props => { {i => (
- + + { const check_kor = /^[가-힣a-zA-Z0-9][^!@#$%^&*()+\=\[\]{};':"\\|,.<>\/?\s]*$/; - if (!idntf.idntfNum && idntf.idntfNum === '') { + if (idntf.idntfNum === 'PA') { setModal({ isOpen: true, title: '필수값 입력 오류', @@ -185,46 +185,52 @@ export const BasisIdntfContainer = props => { if (!isSave) { setIdntfDataList(idntDataList.filter(item => item.id !== id)); } else { - dispatch(Actions.IDNTF_DELETE.request('PALDRONE-' + id)); + dispatch(Actions.IDNTF_DELETE.request(id)); } }; const handlerInput = (event, index) => { const { name, value } = event.target; - let newArr = [...idntDataList]; // copying the old datas array newArr[index] = { ...newArr[index], [name]: value }; + // if (newArr[index].idntfNum.length < 2) { + // setModal({ + // isOpen: true, + // title: '필수값 입력 오류', + // desc: '식별 장치 기본값입니다.' + // }); + newArr[index] = { ...newArr[index], idntfNum: 'PA' }; + } + setIdntfDataList(newArr); +}; - setIdntfDataList(newArr); - }; - - return !detail ? ( - - - - -
- 기체정보 등록후 식별장치 등록이 가능합니다. -
-
-
- -
- ) : ( - - - - - - - ); +return !detail ? ( + + + + +
+ 기체정보 등록후 식별장치 등록이 가능합니다. +
+
+
+ +
+) : ( + + + + + + +); };