Merge branch 'fix_judge'

main
minuk926 2 years ago
commit 6a3870a2da

@ -28,7 +28,7 @@ const JudgeDataModifyForm = ({ rowData, contDocs, ingbs, setOpen, handleModalSav
const [scWdate, setScWdate] = useState(rowData?.scWdate);
const [scCdate, setScCdate] = useState(rowData?.scCdate);
const [scJbtime, setScJbtime] = useState(rowData?.scJbtime);
const [scPos, setScPos] = useState('');
const [scPos, setScPos] = useState(rowData?.scPos ?? '');
const [picads, setPicads] = useState({});
const [frecads, setFrecads] = useState({});
@ -95,35 +95,38 @@ const JudgeDataModifyForm = ({ rowData, contDocs, ingbs, setOpen, handleModalSav
// }
//
if (scCarnum.length < 1) {
if (scCarnum.length < 4) {
alert.show('차량번호는 필수입니다.');
return;
}
if (scName.length < 1) {
if (scName.length < 2) {
alert.show('성명은 필수입니다.');
return;
}
if (scDong.length < 1) {
if (scDong.length < 2) {
alert.show('동명은(는) 필수입니다.');
return;
}
if (scCdate.length < 1) {
if (scCdate.length < 8) {
alert.show('접수일자는 필수입니다.');
return;
}
if (scWdate.length < 1) {
if (scWdate.length < 8) {
alert.show('위반일자는 필수입니다.');
return;
}
if (scJbtime.length < 1) {
if (scJbtime.length < 4) {
alert.show('위반시간은 필수입니다.');
return;
}
if (zipcode1.length < 1) {
if (zipcode1.length < 5) {
alert.show('우편번호는 필수입니다.');
return;
}
if (scPos.length < 2) {
alert.show('위반장소는 필수입니다.');
return;
}
if (rowData.scPicad1 === null || rowData.scPicad1 === '') {
alert.show('단속사진 하나는 필수입니다.');
return;
@ -317,7 +320,7 @@ const JudgeDataModifyForm = ({ rowData, contDocs, ingbs, setOpen, handleModalSav
required
label="위반장소"
fullWidth
value={rowData.scPos || ''}
value={scPos}
onChange={(e) => setScPos(e?.target?.value)}
/>
</Grid>

@ -68,39 +68,35 @@ const JudgeDataNewForm = ({ scDatagb, contDocs, ingbs, handleModalSave, setOpen,
});
//
if (scCarnum.length < 1) {
// Toast.fire({
// icon: 'warning',
// title: ' .'
// });
if (scCarnum.length < 4) {
alert.show('차량번호는 필수입니다.');
return;
}
if (scName.length < 1) {
if (scName.length < 2) {
alert.show('성명은 필수입니다.');
return;
}
if (scDong.length < 1) {
if (scDong.length < 2) {
alert.show('동명은(는) 필수입니다.');
return;
}
if (scCdate.length < 1) {
if (scCdate.length < 8) {
alert.show('접수일자는 필수입니다.');
return;
}
if (scWdate === null || scWdate === '') {
if (scWdate.length < 8) {
alert.show('위반일자는 필수입니다.');
return;
}
if (scJbtime === null || scJbtime === '') {
if (scJbtime.length < 4) {
alert.show('위반시간은 필수입니다.');
return;
}
if (scPos.length < 1) {
if (scPos.length < 2) {
alert.show('위반장소는 필수입니다.');
return;
}
if (zipcode1 === null || zipcode1 === '') {
if (zipcode1.length < 5) {
alert.show('우편번호는 필수입니다.');
return;
}

@ -77,9 +77,10 @@ const JudgeReview = ({ msDatagb, menuName }) => {
const deleteJudge = useCallback(
(row) => () => {
let res = {};
const datagb = row.msDatagb;
removeAlert(async () => {
if (msDatagb) {
if (datagb) {
res = await removeJudge(row);
} else {
res = await removeParkingJudge(row);

Loading…
Cancel
Save