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

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

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

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

@ -1,7 +1,7 @@
import { useEffect, useRef, useState } from 'react';
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 { SkipNext, SkipPrevious, Save } from '@mui/icons-material';
import ImgItem from '../../cmm/ImgItem';

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

Loading…
Cancel
Save