Browse Source

기체정보-미완성

ctrlDraw
sanguu(박상현) 2 years ago
parent
commit
f9a20bbceb
  1. 8
      src/components/basis/dron/BasisIdntform.js
  2. 14
      src/containers/basis/dron/BasisIdntfContainer.js

8
src/components/basis/dron/BasisIdntform.js

@ -64,9 +64,15 @@ export const BasisIdntfForm = props => {
{i => (
<Form key={i}>
<Row className='justify-content-between align-items-center'>
<Col xs={3} md={3} xl={2}>
<Col xs={3} md={2} xl={1}>
<FormGroup className='form-label-group'>
<Label for={`idntfNum.${i}`}>식별번호</Label>
<Input
type='text'
value='PA'
readOnly
bsSize='sm'
></Input>
<Input
type='text'
// innerRef={props.data}

14
src/containers/basis/dron/BasisIdntfContainer.js

@ -98,7 +98,7 @@ export const BasisIdntfContainer = props => {
const check_kor =
/^[가-힣a-zA-Z0-9][^!@#$%^&*()+\=\[\]{};':"\\|,.<>\/?\s]*$/;
if (!idntf.idntfNum && idntf.idntfNum === '') {
if (idntf.idntfNum === 'PA') {
setModal({
isOpen: true,
title: '필수값 입력 오류',
@ -185,16 +185,22 @@ 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);
};

Loading…
Cancel
Save