|
|
|
@ -10,7 +10,7 @@ import { Divider, FormControl, Grid, InputLabel, MenuItem, Select, TableFooter,
|
|
|
|
|
import PropTypes from 'prop-types';
|
|
|
|
|
import Box from '@mui/material/Box';
|
|
|
|
|
import combo from 'commons/combo_data';
|
|
|
|
|
import { useState } from 'react';
|
|
|
|
|
import { useCallback, useRef, useState } from 'react';
|
|
|
|
|
import Button from '@mui/material/Button';
|
|
|
|
|
import { IconSearch } from '@tabler/icons';
|
|
|
|
|
import { findJudgeResults } from 'apis/judge';
|
|
|
|
@ -72,6 +72,7 @@ const ModalJudgeResult = ({ totJudgeUsers, totJudgeUserData, judgeCars, judgeUse
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
setJudgeDatas(arrJudgeData);
|
|
|
|
|
// judgeDatas.current = arrJudgeData;
|
|
|
|
|
|
|
|
|
|
setJudgeResult({
|
|
|
|
|
...judgeResult,
|
|
|
|
@ -94,9 +95,19 @@ const ModalJudgeResult = ({ totJudgeUsers, totJudgeUserData, judgeCars, judgeUse
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
const handleJudgeModal = () => {
|
|
|
|
|
setJudgeDatas(judgeData ?? []);
|
|
|
|
|
// judgeDatas.current = judgeData;
|
|
|
|
|
setOpen(true);
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
const onHandleJudge = useCallback(
|
|
|
|
|
(row) => () => {
|
|
|
|
|
setJudgeDatas([{ msMaincode: row.msMaincode, msSeq: row.msSeq }]);
|
|
|
|
|
setOpen(true);
|
|
|
|
|
},
|
|
|
|
|
[]
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
return (
|
|
|
|
|
<Box
|
|
|
|
|
sx={{
|
|
|
|
@ -218,7 +229,13 @@ const ModalJudgeResult = ({ totJudgeUsers, totJudgeUserData, judgeCars, judgeUse
|
|
|
|
|
{judgeResult.judgeUserData[carIdx].msResultNm}
|
|
|
|
|
</StyledTableCell>
|
|
|
|
|
<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>
|
|
|
|
|
</StyledTableRow>
|
|
|
|
|
))}
|
|
|
|
@ -237,7 +254,15 @@ const ModalJudgeResult = ({ totJudgeUsers, totJudgeUserData, judgeCars, judgeUse
|
|
|
|
|
>
|
|
|
|
|
{judgeResult && `총 ${selectedRow.cnt} 건중 ${judgeResult.judgeCars.length} 건`}
|
|
|
|
|
</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>
|
|
|
|
|
);
|
|
|
|
|
};
|
|
|
|
|