fix: debug console 에러 fix

main
minuk926 3 years ago
parent cd1f80c945
commit bee57926ad

@ -6,11 +6,11 @@ import TableContainer from '@mui/material/TableContainer';
import TableHead from '@mui/material/TableHead'; import TableHead from '@mui/material/TableHead';
import TableRow from '@mui/material/TableRow'; import TableRow from '@mui/material/TableRow';
import { styled } from '@mui/material/styles'; import { styled } from '@mui/material/styles';
import { Divider, FormControl, Grid, InputLabel, MenuItem, Select, TableFooter, Typography } from '@mui/material'; import { Card, Divider, FormControl, Grid, InputLabel, MenuItem, Select, Stack, TableFooter, Typography } from '@mui/material';
import PropTypes from 'prop-types'; import PropTypes from 'prop-types';
import Box from '@mui/material/Box'; import Box from '@mui/material/Box';
import combo from 'commons/combo_data'; import combo from 'commons/combo_data';
import { useCallback, useRef, useState } from 'react'; import { useCallback, useState } from 'react';
import Button from '@mui/material/Button'; import Button from '@mui/material/Button';
import { IconSearch } from '@tabler/icons'; import { IconSearch } from '@tabler/icons';
import { findJudgeResults } from 'apis/judge'; import { findJudgeResults } from 'apis/judge';
@ -43,7 +43,7 @@ const totLabel = ['부과', '서손', '미부과', '계'];
const ModalJudgeResult = ({ totJudgeUsers, totJudgeUserData, judgeCars, judgeUserData, selectedRow, judgeTeam, judgeData, dataGb }) => { const ModalJudgeResult = ({ totJudgeUsers, totJudgeUserData, judgeCars, judgeUserData, selectedRow, judgeTeam, judgeData, dataGb }) => {
const alert = useAlert(); const alert = useAlert();
const [open, setOpen] = useState(false); const [open, setOpen] = useState(false);
const [title, setTitle] = useState('심사 처리'); const [title] = useState('심사 처리');
const [judgeResult, setJudgeResult] = useState({ const [judgeResult, setJudgeResult] = useState({
totJudgeUsers, totJudgeUsers,
totJudgeUserData, totJudgeUserData,
@ -163,9 +163,9 @@ const ModalJudgeResult = ({ totJudgeUsers, totJudgeUserData, judgeCars, judgeUse
<Table stickyHeader aria-label="sticky table"> <Table stickyHeader aria-label="sticky table">
<TableHead> <TableHead>
<TableRow> <TableRow>
{/* <StyledTableCell align="center" style={{ minWidth: 80 }} hidden> */} <StyledTableCell align="center" style={{ minWidth: 45 }} hidden>
{/* 민원코드 */} No.
{/* </StyledTableCell> */} </StyledTableCell>
<StyledTableCell align="center" style={{ width: 95 }}> <StyledTableCell align="center" style={{ width: 95 }}>
접수번호 접수번호
</StyledTableCell> </StyledTableCell>
@ -185,31 +185,31 @@ const ModalJudgeResult = ({ totJudgeUsers, totJudgeUserData, judgeCars, judgeUse
</StyledTableCell> </StyledTableCell>
</TableRow> </TableRow>
</TableHead> </TableHead>
<TableBody> <TableBody>
{/* 심사 통계 */} {/* 심사 통계 */}
{judgeResult?.totJudgeUserData.map((totData, idx) => ( {judgeResult?.totJudgeUserData.map((totData, idx) => (
<StyledTableRow hover key={idx}> <StyledTableRow hover key={idx}>
<StyledTableCell align="center" style={{ width: 95 }}> <StyledTableCell align="center" style={{ width: 45, color: 'cyan' }} />
<StyledTableCell align="center" style={{ width: 95, color: 'cyan' }}>
{totLabel[idx]} {totLabel[idx]}
</StyledTableCell> </StyledTableCell>
<StyledTableCell align="center" style={{ width: 130 }} /> <StyledTableCell align="center" style={{ width: 130 }} />
{totData.map((data, totIdx) => ( {totData.map((data, totIdx) => (
<StyledTableCell key={`${idx}${totIdx}`} align="center" style={{ width: 80 }}> <StyledTableCell key={`${idx}${totIdx}`} align="center" style={{ width: 80, color: 'cyan' }}>
{data} {data}
</StyledTableCell> </StyledTableCell>
))} ))}
<StyledTableCell /> <StyledTableCell />
</StyledTableRow> </StyledTableRow>
))} ))}
</TableBody> <StyledTableRow />
<TableBody sx={{ mt: 3 }}>
<Grid item xs={12}>
<Divider />
</Grid>
{/* 접수번호별 심사 결과 */} {/* 접수번호별 심사 결과 */}
{judgeResult?.judgeCars.map((row, carIdx) => ( {judgeResult?.judgeCars.map((row, carIdx) => (
<StyledTableRow hover key={row.msSeq}> <StyledTableRow hover key={row.msSeq}>
{/* <StyledTableCell>{row.msMaincode}</StyledTableCell> */} <StyledTableCell align="center" style={{ width: 45 }}>
{carIdx + 1}
</StyledTableCell>
<StyledTableCell align="center" style={{ width: 95 }}> <StyledTableCell align="center" style={{ width: 95 }}>
{row.msSeq} {row.msSeq}
</StyledTableCell> </StyledTableCell>
@ -240,11 +240,12 @@ const ModalJudgeResult = ({ totJudgeUsers, totJudgeUserData, judgeCars, judgeUse
</StyledTableRow> </StyledTableRow>
))} ))}
</TableBody> </TableBody>
<TableFooter />
{/* <TableFooter>{judgeResult && `총 ${selectedRow.cnt} 건중 ${judgeResult.judgeCars.length} 건`}</TableFooter> */} {/* <TableFooter>{judgeResult && `총 ${selectedRow.cnt} 건중 ${judgeResult.judgeCars.length} 건`}</TableFooter> */}
</Table> </Table>
</TableContainer> </TableContainer>
</Paper> </Paper>
<TableFooter <Box
sx={{ sx={{
border: '0px solid red', border: '0px solid red',
display: 'flex', display: 'flex',
@ -253,7 +254,9 @@ const ModalJudgeResult = ({ totJudgeUsers, totJudgeUserData, judgeCars, judgeUse
}} }}
> >
{judgeResult && `${selectedRow.cnt} 건중 ${judgeResult.judgeCars.length}`} {judgeResult && `${selectedRow.cnt} 건중 ${judgeResult.judgeCars.length}`}
</TableFooter> </Box>
{/* </TableContainer> */}
<JudgeModal <JudgeModal
open={open} open={open}
setOpen={setOpen} setOpen={setOpen}
@ -273,6 +276,7 @@ ModalJudgeResult.propTypes = {
judgeUserData: PropTypes.array, judgeUserData: PropTypes.array,
selectedRow: PropTypes.object.isRequired, selectedRow: PropTypes.object.isRequired,
judgeTeam: PropTypes.string, judgeTeam: PropTypes.string,
judgeData: PropTypes.array,
dataGb: PropTypes.string dataGb: PropTypes.string
}; };

@ -13,6 +13,8 @@ import { Delete, List, Save } from '@mui/icons-material';
import PropTypes from 'prop-types'; import PropTypes from 'prop-types';
const ModifyBoardForm = (props) => { const ModifyBoardForm = (props) => {
const showAlert = useAlert();
// eslint-disable-next-line react/prop-types // eslint-disable-next-line react/prop-types
const { setOpen, handleModalSave, rowData = {}, owner = false, handleNewBoard } = props; const { setOpen, handleModalSave, rowData = {}, owner = false, handleNewBoard } = props;
const quillRef = useRef(); const quillRef = useRef();
@ -34,15 +36,15 @@ const ModifyBoardForm = (props) => {
const replaceContents = contents.replace('<p><br></p>', '').length; const replaceContents = contents.replace('<p><br></p>', '').length;
if (subject.length < 1) { if (subject.length < 1) {
alert('제목은 필수입니다.'); showAlert.show('제목은 필수입니다.');
return; return;
} }
if (replaceContents < 1) { if (replaceContents < 1) {
alert('내용은 필수입니다.'); showAlert.show('내용은 필수입니다.');
return; return;
} }
if (pass === undefined || pass === '') { if (pass === undefined || pass === '') {
alert('비밀번호는 필수입니다.'); showAlert.show('비밀번호는 필수입니다.');
return; return;
} }

@ -10,10 +10,12 @@ import 'react-quill/dist/quill.snow.css';
// project imports // project imports
import { List, Save } from '@mui/icons-material'; import { List, Save } from '@mui/icons-material';
import PropTypes from 'prop-types'; import PropTypes from 'prop-types';
import { useAlert } from 'react-alert';
const BoardForm = (props) => { const BoardForm = (props) => {
// eslint-disable-next-line react/prop-types // eslint-disable-next-line react/prop-types
const { setOpen, handleModalSave, rowData = {} } = props; const { setOpen, handleModalSave, rowData = {} } = props;
const showAlert = useAlert();
const quillRef = useRef(); const quillRef = useRef();
const [subject, setSubject] = useState(''); const [subject, setSubject] = useState('');
const [contents, setContents] = useState(''); const [contents, setContents] = useState('');
@ -34,15 +36,15 @@ const BoardForm = (props) => {
}; };
const replaceContents = contents.replace('<p><br></p>', '').length; const replaceContents = contents.replace('<p><br></p>', '').length;
if (subject.length < 1) { if (subject.length < 1) {
alert('제목은 필수입니다.'); showAlert.alert('제목은 필수입니다.');
return; return;
} }
if (replaceContents < 1) { if (replaceContents < 1) {
alert('내용은 필수입니다.'); showAlert.show('내용은 필수입니다.');
return; return;
} }
if (pass === undefined || pass === '') { if (pass === undefined || pass === '') {
alert('비밀번호는 필수입니다.'); showAlert.show('비밀번호는 필수입니다.');
return; return;
} }

@ -31,7 +31,7 @@ const ParkingJudgeByUserReview = () => {
}); });
const [open, setOpen] = useState(false); const [open, setOpen] = useState(false);
const [title, setTitle] = useState(''); const [title, setTitle] = useState('');
const [rowDatas, setRowDatas] = useState([]); const [rowDatas] = useState([]);
const [minSdate, setMinSdate] = useState(''); const [minSdate, setMinSdate] = useState('');
const [maxEdate, setMaxEdate] = useState(''); const [maxEdate, setMaxEdate] = useState('');
const [minSeq, setMinSeq] = useState(0); const [minSeq, setMinSeq] = useState(0);

@ -1,7 +1,7 @@
import { useEffect, useRef, useState } from 'react'; import { useEffect, useRef, useState } from 'react';
import PropTypes from 'prop-types'; import PropTypes from 'prop-types';
import { Button, CardMedia, Divider, FormControl, Grid, ImageList, InputLabel, MenuItem, Select, TextField } from '@mui/material'; import { Button, Divider, FormControl, Grid, ImageList, InputLabel, MenuItem, Select, TextField } from '@mui/material';
import { findImages, saveJudgeResult } from 'apis/judge'; import { findImages, saveJudgeResult } from 'apis/judge';
import { SkipNext, SkipPrevious, Save } from '@mui/icons-material'; import { SkipNext, SkipPrevious, Save } from '@mui/icons-material';
import ImgItem from '../../cmm/ImgItem'; import ImgItem from '../../cmm/ImgItem';

@ -17,7 +17,7 @@ import PropTypes from 'prop-types';
const ModifyPublicBoardForm = (props) => { const ModifyPublicBoardForm = (props) => {
// eslint-disable-next-line react/prop-types // eslint-disable-next-line react/prop-types
const { setOpen, handleModalSave, rowData = {}, owner } = props; const { setOpen, handleModalSave, rowData = {}, owner = false } = props;
const alert = useAlert(); const alert = useAlert();
const quillRef = useRef(); const quillRef = useRef();
const [dept, setDept] = useState(rowData?.inDept); const [dept, setDept] = useState(rowData?.inDept);
@ -223,7 +223,7 @@ ModifyPublicBoardForm.propTypes = {
rowData: PropTypes.object.isRequired, rowData: PropTypes.object.isRequired,
handleModalSave: PropTypes.func.isRequired, handleModalSave: PropTypes.func.isRequired,
setOpen: PropTypes.func.isRequired, setOpen: PropTypes.func.isRequired,
owner: PropTypes.bool.isRequired owner: PropTypes.bool
}; };
export default ModifyPublicBoardForm; export default ModifyPublicBoardForm;

Loading…
Cancel
Save