fix: 거주지/장애인 상세 목록 반영

main
minuk926 3 years ago
parent a505af781f
commit 3cc537635b

@ -34,17 +34,17 @@ const ModalJudgeDetail = ({ totJudgeUserData, judgeData, simsaUser }) => {
return ( return (
<Paper sx={{ width: '100%', overflow: 'hidden' }}> <Paper sx={{ width: '100%', overflow: 'hidden' }}>
<TableContainer sx={{ maxHeight: 440 }}> <TableContainer sx={{ maxwidth: 950, maxHeight: 700 }}>
<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: 80 }} hidden> */}
{/* 민원코드 */} {/* 민원코드 */}
{/* </StyledTableCell> */} {/* </StyledTableCell> */}
<StyledTableCell align="center" style={{ width: 100 }}> <StyledTableCell align="center" style={{ width: 95 }}>
접수번호 접수번호
</StyledTableCell> </StyledTableCell>
<StyledTableCell align="center" style={{ width: 200 }}> <StyledTableCell align="center" style={{ width: 130 }}>
차량번호 차량번호
</StyledTableCell> </StyledTableCell>
{simsaUser.map((u) => ( {simsaUser.map((u) => (
@ -61,10 +61,10 @@ const ModalJudgeDetail = ({ totJudgeUserData, judgeData, simsaUser }) => {
{/* 심사 통계 */} {/* 심사 통계 */}
{totJudgeUserData.map((totData, idx) => ( {totJudgeUserData.map((totData, idx) => (
<StyledTableRow hover key={idx}> <StyledTableRow hover key={idx}>
<StyledTableCell align="center" style={{ width: 100 }}> <StyledTableCell align="center" style={{ width: 95 }}>
{totLabel[idx]} {totLabel[idx]}
</StyledTableCell> </StyledTableCell>
<StyledTableCell align="center" style={{ width: 200 }} /> <StyledTableCell align="center" style={{ width: 130 }} />
{totData.map((data) => ( {totData.map((data) => (
<StyledTableCell align="center" style={{ width: 80 }}> <StyledTableCell align="center" style={{ width: 80 }}>
{data} {data}
@ -82,10 +82,10 @@ const ModalJudgeDetail = ({ totJudgeUserData, judgeData, simsaUser }) => {
{judgeData.map((row) => ( {judgeData.map((row) => (
<StyledTableRow hover key={row.msSeq}> <StyledTableRow hover key={row.msSeq}>
{/* <StyledTableCell>{row.msMaincode}</StyledTableCell> */} {/* <StyledTableCell>{row.msMaincode}</StyledTableCell> */}
<StyledTableCell align="center" style={{ width: 100 }}> <StyledTableCell align="center" style={{ width: 95 }}>
{row.msSeq} {row.msSeq}
</StyledTableCell> </StyledTableCell>
<StyledTableCell align="center" style={{ width: 200 }}> <StyledTableCell align="center" style={{ width: 130 }}>
{row.msCarnum} {row.msCarnum}
</StyledTableCell> </StyledTableCell>

@ -1,139 +0,0 @@
import Board from '../board/Board';
import { useCallback, useEffect, useMemo, useState } from 'react';
import { findJudge, findJudgeDetails } from 'apis/judge';
import {
Box,
Checkbox,
IconButton,
Table,
TableBody,
TableCell,
TableContainer,
TableHead,
TablePagination,
TableSortLabel,
TableRow,
Toolbar,
Tooltip,
Typography
} from '@mui/material';
import { visuallyHidden } from '@mui/utils';
// project imports
import MainCard from 'ui-component/cards/MainCard';
const ModalJudgeDetail = ({ totData, judgeData, simsaUser, colNames }) => {
// const [rowData, setRowData] = useState({});
//
// const [totalCount, setTotalCount] = useState(0);
// const [rowsState, setRowsState] = useState({
// page: 0,
// pageSize: 20,
// rows: []
// // loading: false
// });
// const [rows, setRows] = useState([]);
//
// const columns = [];
//
// const tableHeader = null;
/*
const search = useCallback(() => {
const params = {
msDatagb,
msSdate,
msEdate,
msChasu,
msuTeam
};
findJudgeDetails(params).then((response) => {
if (response && response.data) {
console.log(response.data);
const totUserList = response.data?.totUserList;
const resultList = response.data?.resultList;
setRows(() => {
resultList.map((m) => {
let result = { ...m };
const users = [...m.simsa];
delete result.simsa;
users.map((u) => {
result = { ...result, [u.NAME]: u.msResult };
return result;
});
return result;
// return users.map((u) => ({ ...result, [u.NAME]: u.msResult }));
});
Object.keys(rows[0]).forEach((k) => {
columns.push(k);
});
});
// Object.keys(gridRows[0]).forEach((k) => {
// // console.log(k, v);
// columns.push({ headerName: k, headerAlign: 'center', field: k, align: 'center' });
// });
// setColdef(columns);
// for (const k in gridRows[0]) {
// columns.push({ headerName: k, headerAlign: 'center', field: k, align: 'center' });
// }
setTotalCount(rows.length);
setRowsState((prevState) => ({ ...prevState, rows }));
// apiRef.current.forceUpdate(); // .updateRowData([]);
// apiRef.current.updateRowData([]);
}
});
}, [msDatagb, msSdate, msEdate, msChasu, msuTeam]);
*/
const init = useMemo(() => {
console.log(totData, judgeData, simsaUser, colNames);
}, []);
// useEffect(() => {
// // if (isInit.current) {
// // isInit.current = false;
// // return;
// // }
// init();
// // }, [rowsState.page, rowsState.pageSize, selectedYear, searchTxt]);
// }, []);
return (
<MainCard content={false}>
<TableContainer>
<Table sx={{ minWidth: 850, width: 1000 }} size="small" aria-label="a dense table">
<TableHead>
<TableRow key="-1">
<TableCell sx={{ pl: 3, visibility: false }}>민원코드</TableCell>
<TableCell sx={{ pl: 3 }}>접수번호</TableCell>
<TableCell sx={{ pl: 3 }}>차량번호</TableCell>
{simsaUser.map((u, idx) => (
<TableCell sx={{ pl: 3 }}>{u.NAME}</TableCell>
))}
</TableRow>
</TableHead>
<TableBody>
{judgeData.map((row) => (
<TableRow hover key={row.msSeq}>
<TableCell sx={{ pl: 3 }} component="th" scope="row">
{row.msMaincode}
</TableCell>
<TableCell>{row.msSeq}</TableCell>
<TableCell>{row.msCarnum}</TableCell>
{row.simsa.map((r) => (
<TableCell>{r.msuResult}</TableCell>
))}
</TableRow>
))}
</TableBody>
</Table>
</TableContainer>
</MainCard>
);
};
export default ModalJudgeDetail;

@ -10,8 +10,8 @@ const style = {
top: '50%', top: '50%',
left: '50%', left: '50%',
transform: 'translate(-50%, -50%)', transform: 'translate(-50%, -50%)',
width: 1000, width: 1050,
height: 650, maxheight: 700,
bgcolor: 'background.paper', bgcolor: 'background.paper',
border: '2px solid #000', border: '2px solid #000',
boxShadow: 24, boxShadow: 24,

Loading…
Cancel
Save