diff --git a/src/views/biz/admin/judge/JudgeDataDetailForm.jsx b/src/views/biz/admin/judge/JudgeDataDetailForm.jsx index c48315d..95e7c34 100644 --- a/src/views/biz/admin/judge/JudgeDataDetailForm.jsx +++ b/src/views/biz/admin/judge/JudgeDataDetailForm.jsx @@ -165,18 +165,17 @@ const ModifyJudgeDataForm = ({ rowData, contDocs, ingbs, setOpen, handleModalSav - + - + {_.range(1, 5, 1).map((idx) => ( - + {_.range(1, 5, 1).map((idx) => ( - + {_.range(1, 9, 1).map((idx) => ( - + - setScJuso(e?.target?.value)} /> + setScJuso(e?.target?.value)} + /> setScBunji(e?.target?.value)} /> @@ -351,9 +359,8 @@ const JudgeDataModifyForm = ({ rowData, contDocs, ingbs, setOpen, handleModalSav {_.range(1, 5, 1).map((idx) => ( - + {_.range(1, 5, 1).map((idx) => ( - + {_.range(1, 9, 1).map((idx) => ( - + { /> - setScJuso(e?.target?.value)} /> + setScJuso(e?.target?.value)} + /> setScBunji(e?.target?.value)} /> @@ -275,9 +283,8 @@ const JudgeDataNewForm = ({ scDatagb, contDocs, ingbs, handleModalSave }) => { {_.range(1, 5, 1).map((idx) => ( - + { {_.range(1, 5, 1).map((idx) => ( - + { {_.range(1, 9, 1).map((idx) => ( - + { const [title, setTitle] = useState(); const [selectedYear, setSelectedYear] = useState(year); - const [searchTxt, setSearchTxt] = useState(''); + const inputRef = useRef(''); const [totalCount, setTotalCount] = useState(0); const [rowsState, setRowsState] = useState({ @@ -56,29 +56,23 @@ const JudgeReview = ({ msDatagb, menuName }) => { const search = useCallback(async () => { const params = { msDatagb, + msYear: selectedYear, + msChasu: inputRef.current, page: rowsState.page, size: rowsState.pageSize }; let res = {}; if (msDatagb) { - res = await findJudges({ ...params, msYear: selectedYear, msChasu: searchTxt }); + res = await findJudges(params); } else { - res = await findParkings({ ...params, msYear: selectedYear, msChasu: searchTxt }); + res = await findParkings(params); } if (res && res.data) { - console.log(res); setTotalCount(res.count); setRowsState((prevState) => ({ ...prevState, rows: res.data })); } - - // findJudges({ ...params, msYear: selectedYear, msChasu: searchTxt }).then((response) => { - // if (response && response.data) { - // setTotalCount(response.count); - // setRowsState((prevState) => ({ ...prevState, rows: response.data })); - // } - // }); - }, [msDatagb, rowsState.page, rowsState.pageSize, selectedYear, searchTxt]); + }, [msDatagb, rowsState.page, rowsState.pageSize, selectedYear]); const removeJudge = useCallback( (row) => async () => { @@ -150,21 +144,11 @@ const JudgeReview = ({ msDatagb, menuName }) => { if (!selectedYear) return; if (event.type === 'keydown' && event.key === 'Enter') { - const newString = event?.target.value; - setSearchTxt(newString); + inputRef.current = event.target.value; search(); } }; - useEffect(() => { - if (isInit.current) { - isInit.current = false; - return; - } - search(); - // }, [rowsState.page, rowsState.pageSize, selectedYear, searchTxt]); - }, [search]); - const handleOnCellClick = async (e) => { if (e?.field === 'msDate') { const params = { diff --git a/src/views/cmm/file-ctl/FileInputForms.jsx b/src/views/cmm/file-ctl/FileInputForms.jsx index 0fcb939..df58d78 100644 --- a/src/views/cmm/file-ctl/FileInputForms.jsx +++ b/src/views/cmm/file-ctl/FileInputForms.jsx @@ -1,3 +1,4 @@ +import React from 'react'; import { Button, Grid, TextField } from '@mui/material'; import { FileUpload } from '@mui/icons-material'; import PropTypes from 'prop-types'; @@ -14,19 +15,19 @@ const FileInputForms = ({ fieldName, index, labelName, selectedFile, fileName, h return ( - } - onClick={() => {}} - /> + {}} /> - diff --git a/src/views/cmm/file-ctl/ImageFileTextForm.jsx b/src/views/cmm/file-ctl/ImageFileTextForm.jsx index 06a35cc..4bc5a0f 100644 --- a/src/views/cmm/file-ctl/ImageFileTextForm.jsx +++ b/src/views/cmm/file-ctl/ImageFileTextForm.jsx @@ -2,7 +2,7 @@ import { InputAdornment, TextField } from '@mui/material'; import { FileDownload } from '@mui/icons-material'; import PropTypes from 'prop-types'; -const ImageFileTextForm = ({ labelName, fileName = '', methodName, handleViewImg }) => ( +const ImageFileTextForm = ({ labelName = '', fileName, methodName = '', handleViewImg = () => {} }) => ( <> {fileName && ( )} - {/* {!fileName && ( */} - {/* handleViewImg(methodName)} /> */} - {/* )} */} ); ImageFileTextForm.propTypes = {