diff --git a/src/views/biz/admin/judge/JudgeDataModifyForm.jsx b/src/views/biz/admin/judge/JudgeDataModifyForm.jsx index 364017e..547f7b5 100644 --- a/src/views/biz/admin/judge/JudgeDataModifyForm.jsx +++ b/src/views/biz/admin/judge/JudgeDataModifyForm.jsx @@ -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)} /> diff --git a/src/views/biz/admin/judge/JudgeDataNewForm.jsx b/src/views/biz/admin/judge/JudgeDataNewForm.jsx index 3c88426..d0e0565 100644 --- a/src/views/biz/admin/judge/JudgeDataNewForm.jsx +++ b/src/views/biz/admin/judge/JudgeDataNewForm.jsx @@ -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; } diff --git a/src/views/biz/admin/judge/JudgeReview.jsx b/src/views/biz/admin/judge/JudgeReview.jsx index 845d38c..e00b005 100644 --- a/src/views/biz/admin/judge/JudgeReview.jsx +++ b/src/views/biz/admin/judge/JudgeReview.jsx @@ -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);