|
|
|
@ -1,5 +1,5 @@
|
|
|
|
|
import Board from '../board/Board';
|
|
|
|
|
import { useCallback, useEffect, useState } from 'react';
|
|
|
|
|
import { useCallback, useEffect, useMemo, useState } from 'react';
|
|
|
|
|
import { findJudge, findJudgeDetails } from 'apis/judge';
|
|
|
|
|
import {
|
|
|
|
|
Box,
|
|
|
|
@ -22,22 +22,23 @@ import { visuallyHidden } from '@mui/utils';
|
|
|
|
|
// project imports
|
|
|
|
|
import MainCard from 'ui-component/cards/MainCard';
|
|
|
|
|
|
|
|
|
|
const ModalDetails = ({ msDatagb, msSdate, msEdate, msChasu, msuTeam }) => {
|
|
|
|
|
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 ModalJudgeDetail = ({ totData, judgeData, 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,
|
|
|
|
@ -87,15 +88,20 @@ const ModalDetails = ({ msDatagb, msSdate, msEdate, msChasu, msuTeam }) => {
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
}, [msDatagb, msSdate, msEdate, msChasu, msuTeam]);
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
useEffect(() => {
|
|
|
|
|
// if (isInit.current) {
|
|
|
|
|
// isInit.current = false;
|
|
|
|
|
// return;
|
|
|
|
|
// }
|
|
|
|
|
search();
|
|
|
|
|
// }, [rowsState.page, rowsState.pageSize, selectedYear, searchTxt]);
|
|
|
|
|
}, [search]);
|
|
|
|
|
const init = useMemo(() => {
|
|
|
|
|
console.log(totData, judgeData, colNames);
|
|
|
|
|
}, []);
|
|
|
|
|
|
|
|
|
|
// useEffect(() => {
|
|
|
|
|
// // if (isInit.current) {
|
|
|
|
|
// // isInit.current = false;
|
|
|
|
|
// // return;
|
|
|
|
|
// // }
|
|
|
|
|
// init();
|
|
|
|
|
// // }, [rowsState.page, rowsState.pageSize, selectedYear, searchTxt]);
|
|
|
|
|
// }, []);
|
|
|
|
|
|
|
|
|
|
return (
|
|
|
|
|
<MainCard content={false}>
|
|
|
|
@ -103,29 +109,24 @@ const ModalDetails = ({ msDatagb, msSdate, msEdate, msChasu, msuTeam }) => {
|
|
|
|
|
<Table sx={{ minWidth: 650 }} size="small" aria-label="a dense table">
|
|
|
|
|
<TableHead>
|
|
|
|
|
<TableRow>
|
|
|
|
|
{columns.map((k) => (
|
|
|
|
|
<TableCell sx={{ pl: 3 }}>{k}</TableCell>
|
|
|
|
|
{colNames.map((name, idx) => (
|
|
|
|
|
<TableCell sx={{ pl: 3 }}>{name}</TableCell>
|
|
|
|
|
))}
|
|
|
|
|
</TableRow>
|
|
|
|
|
</TableHead>
|
|
|
|
|
<TableBody>
|
|
|
|
|
{/* {rows.map((row) => ( */}
|
|
|
|
|
{/* <TableRow hover key={row.name}> */}
|
|
|
|
|
{/* <TableCell sx={{ pl: 3 }} component="th" scope="row"> */}
|
|
|
|
|
{/* {row.name} */}
|
|
|
|
|
{/* </TableCell> */}
|
|
|
|
|
{/* <TableCell align="right">{row.calories}</TableCell> */}
|
|
|
|
|
{/* <TableCell align="right">{row.fat}</TableCell> */}
|
|
|
|
|
{/* <TableCell align="right">{row.carbs}</TableCell> */}
|
|
|
|
|
{/* <TableCell sx={{ pr: 3 }} align="right"> */}
|
|
|
|
|
{/* {row.protein} */}
|
|
|
|
|
{/* </TableCell> */}
|
|
|
|
|
{/* </TableRow> */}
|
|
|
|
|
{/* ))} */}
|
|
|
|
|
{judgeData.map((row) => (
|
|
|
|
|
<TableRow hover key={row.scSeq}>
|
|
|
|
|
<TableCell sx={{ pl: 3 }} component="th" scope="row">
|
|
|
|
|
{row.scSeq}
|
|
|
|
|
</TableCell>
|
|
|
|
|
<TableCell align="right">{row.scCarnum}</TableCell>
|
|
|
|
|
</TableRow>
|
|
|
|
|
))}
|
|
|
|
|
</TableBody>
|
|
|
|
|
</Table>
|
|
|
|
|
</TableContainer>
|
|
|
|
|
</MainCard>
|
|
|
|
|
);
|
|
|
|
|
};
|
|
|
|
|
export default ModalDetails;
|
|
|
|
|
export default ModalJudgeDetail;
|
|
|
|
|