|
|
@ -10,7 +10,7 @@ import { Divider, FormControl, Grid, InputLabel, MenuItem, Select, TableFooter,
|
|
|
|
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 { useState } from 'react';
|
|
|
|
import { useCallback, useRef, 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';
|
|
|
@ -72,6 +72,7 @@ const ModalJudgeResult = ({ totJudgeUsers, totJudgeUserData, judgeCars, judgeUse
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
setJudgeDatas(arrJudgeData);
|
|
|
|
setJudgeDatas(arrJudgeData);
|
|
|
|
|
|
|
|
// judgeDatas.current = arrJudgeData;
|
|
|
|
|
|
|
|
|
|
|
|
setJudgeResult({
|
|
|
|
setJudgeResult({
|
|
|
|
...judgeResult,
|
|
|
|
...judgeResult,
|
|
|
@ -94,9 +95,19 @@ const ModalJudgeResult = ({ totJudgeUsers, totJudgeUserData, judgeCars, judgeUse
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
const handleJudgeModal = () => {
|
|
|
|
const handleJudgeModal = () => {
|
|
|
|
|
|
|
|
setJudgeDatas(judgeData ?? []);
|
|
|
|
|
|
|
|
// judgeDatas.current = judgeData;
|
|
|
|
setOpen(true);
|
|
|
|
setOpen(true);
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const onHandleJudge = useCallback(
|
|
|
|
|
|
|
|
(row) => () => {
|
|
|
|
|
|
|
|
setJudgeDatas([{ msMaincode: row.msMaincode, msSeq: row.msSeq }]);
|
|
|
|
|
|
|
|
setOpen(true);
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
[]
|
|
|
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
|
|
return (
|
|
|
|
return (
|
|
|
|
<Box
|
|
|
|
<Box
|
|
|
|
sx={{
|
|
|
|
sx={{
|
|
|
@ -218,7 +229,13 @@ const ModalJudgeResult = ({ totJudgeUsers, totJudgeUserData, judgeCars, judgeUse
|
|
|
|
{judgeResult.judgeUserData[carIdx].msResultNm}
|
|
|
|
{judgeResult.judgeUserData[carIdx].msResultNm}
|
|
|
|
</StyledTableCell>
|
|
|
|
</StyledTableCell>
|
|
|
|
<StyledTableCell align="center" style={{ width: 80 }}>
|
|
|
|
<StyledTableCell align="center" style={{ width: 80 }}>
|
|
|
|
{judgeResult.judgeUserData[carIdx].msResult === '0' ? '처리' : ''}
|
|
|
|
{judgeResult.judgeUserData[carIdx].msResult === '0' ? (
|
|
|
|
|
|
|
|
<Button size="small" color="error" onClick={onHandleJudge(row)}>
|
|
|
|
|
|
|
|
처리
|
|
|
|
|
|
|
|
</Button>
|
|
|
|
|
|
|
|
) : (
|
|
|
|
|
|
|
|
''
|
|
|
|
|
|
|
|
)}
|
|
|
|
</StyledTableCell>
|
|
|
|
</StyledTableCell>
|
|
|
|
</StyledTableRow>
|
|
|
|
</StyledTableRow>
|
|
|
|
))}
|
|
|
|
))}
|
|
|
@ -237,7 +254,15 @@ const ModalJudgeResult = ({ totJudgeUsers, totJudgeUserData, judgeCars, judgeUse
|
|
|
|
>
|
|
|
|
>
|
|
|
|
{judgeResult && `총 ${selectedRow.cnt} 건중 ${judgeResult.judgeCars.length} 건`}
|
|
|
|
{judgeResult && `총 ${selectedRow.cnt} 건중 ${judgeResult.judgeCars.length} 건`}
|
|
|
|
</TableFooter>
|
|
|
|
</TableFooter>
|
|
|
|
<JudgeModal open={open} setOpen={setOpen} title={title} judgeData={judgeDatas} dataGb={dataGb} showAlert={alert} />
|
|
|
|
<JudgeModal
|
|
|
|
|
|
|
|
open={open}
|
|
|
|
|
|
|
|
setOpen={setOpen}
|
|
|
|
|
|
|
|
title={title}
|
|
|
|
|
|
|
|
judgeData={judgeDatas}
|
|
|
|
|
|
|
|
dataGb={dataGb}
|
|
|
|
|
|
|
|
showAlert={alert}
|
|
|
|
|
|
|
|
callback={onSearch}
|
|
|
|
|
|
|
|
/>
|
|
|
|
</Box>
|
|
|
|
</Box>
|
|
|
|
);
|
|
|
|
);
|
|
|
|
};
|
|
|
|
};
|
|
|
|