|
|
@ -6,9 +6,9 @@ import getYear from 'date-fns/getYear';
|
|
|
|
|
|
|
|
|
|
|
|
// material-ui
|
|
|
|
// material-ui
|
|
|
|
import { GridActionsCellItem } from '@mui/x-data-grid';
|
|
|
|
import { GridActionsCellItem } from '@mui/x-data-grid';
|
|
|
|
import { Button, Divider, FormControl, Grid, InputAdornment, Link, MenuItem, OutlinedInput, Select } from '@mui/material';
|
|
|
|
import { Divider, FormControl, Grid, InputAdornment, Link, MenuItem, OutlinedInput, Select } from '@mui/material';
|
|
|
|
import DeleteIcon from '@mui/icons-material/Delete';
|
|
|
|
import CreditScoreIcon from '@mui/icons-material/CreditScore';
|
|
|
|
import { IconSearch, IconFileReport } from '@tabler/icons';
|
|
|
|
import { IconSearch } from '@tabler/icons';
|
|
|
|
|
|
|
|
|
|
|
|
// berry ui
|
|
|
|
// berry ui
|
|
|
|
import MainCard from 'ui-component/cards/MainCard';
|
|
|
|
import MainCard from 'ui-component/cards/MainCard';
|
|
|
@ -16,7 +16,7 @@ import MainCard from 'ui-component/cards/MainCard';
|
|
|
|
// project imports
|
|
|
|
// project imports
|
|
|
|
import MuiDataGrid from 'views/cmm/mui-grid/MuiDataGrid';
|
|
|
|
import MuiDataGrid from 'views/cmm/mui-grid/MuiDataGrid';
|
|
|
|
import InputLabel from 'ui-component/extended/Form/InputLabel';
|
|
|
|
import InputLabel from 'ui-component/extended/Form/InputLabel';
|
|
|
|
import { findByUserJudges, findJudgeResults, findJudges, removeJudge } from 'apis/judge';
|
|
|
|
import { findByUserJudges, findJudges, removeJudge } from 'apis/judge';
|
|
|
|
import CmmModal from 'views/cmm/CmmModal';
|
|
|
|
import CmmModal from 'views/cmm/CmmModal';
|
|
|
|
|
|
|
|
|
|
|
|
const JudgeReview = ({ msDatagb, menuName }) => {
|
|
|
|
const JudgeReview = ({ msDatagb, menuName }) => {
|
|
|
@ -128,6 +128,21 @@ const JudgeReview = ({ msDatagb, menuName }) => {
|
|
|
|
},
|
|
|
|
},
|
|
|
|
width: 100
|
|
|
|
width: 100
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
headerName: '심사 기간',
|
|
|
|
|
|
|
|
headerAlign: 'center',
|
|
|
|
|
|
|
|
field: 'msDate',
|
|
|
|
|
|
|
|
minWidth: 200,
|
|
|
|
|
|
|
|
width: 250,
|
|
|
|
|
|
|
|
description: '심사 기간',
|
|
|
|
|
|
|
|
valueGetter: (params) => `${params.row.msSdate} ~ ${params.row.msEdate}`,
|
|
|
|
|
|
|
|
renderCell: (params) => (
|
|
|
|
|
|
|
|
<Link underline="hover" href="#">
|
|
|
|
|
|
|
|
{params.value}
|
|
|
|
|
|
|
|
</Link>
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
align: 'center'
|
|
|
|
|
|
|
|
},
|
|
|
|
{
|
|
|
|
{
|
|
|
|
headerName: '심사 마감 일시',
|
|
|
|
headerName: '심사 마감 일시',
|
|
|
|
headerAlign: 'center',
|
|
|
|
headerAlign: 'center',
|
|
|
@ -138,39 +153,14 @@ const JudgeReview = ({ msDatagb, menuName }) => {
|
|
|
|
valueGetter: (params) => `${params.row.msCdate} ${params.row.msClosesi}`,
|
|
|
|
valueGetter: (params) => `${params.row.msCdate} ${params.row.msClosesi}`,
|
|
|
|
align: 'center'
|
|
|
|
align: 'center'
|
|
|
|
},
|
|
|
|
},
|
|
|
|
{
|
|
|
|
|
|
|
|
headerName: '상태',
|
|
|
|
|
|
|
|
headerAlign: 'center',
|
|
|
|
|
|
|
|
field: 'msResult',
|
|
|
|
|
|
|
|
width: 150,
|
|
|
|
|
|
|
|
renderCell: (params) => {
|
|
|
|
|
|
|
|
switch (params.row.msResult) {
|
|
|
|
|
|
|
|
case '0':
|
|
|
|
|
|
|
|
return '심의전';
|
|
|
|
|
|
|
|
// break;
|
|
|
|
|
|
|
|
case '1':
|
|
|
|
|
|
|
|
return '부과';
|
|
|
|
|
|
|
|
// break;
|
|
|
|
|
|
|
|
case '2':
|
|
|
|
|
|
|
|
return '미부과';
|
|
|
|
|
|
|
|
// break;
|
|
|
|
|
|
|
|
default:
|
|
|
|
|
|
|
|
return params.row.msResult;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
align: 'center'
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
{
|
|
|
|
{
|
|
|
|
headerName: '개별심사',
|
|
|
|
headerName: '개별심사',
|
|
|
|
headerAlign: 'center',
|
|
|
|
headerAlign: 'center',
|
|
|
|
field: 'actions',
|
|
|
|
field: 'actions',
|
|
|
|
type: 'actions',
|
|
|
|
type: 'actions',
|
|
|
|
width: 80,
|
|
|
|
width: 80,
|
|
|
|
// getActions: (params) => [<GridActionsCellItem icon={<IconFileReport />} label="개별심사" onClick={deleteJudge(params.row)} />],
|
|
|
|
|
|
|
|
getActions: (params) => [
|
|
|
|
getActions: (params) => [
|
|
|
|
<Button color="warning" onClick={execJudge(params.row)}>
|
|
|
|
<GridActionsCellItem color="error" icon={<CreditScoreIcon />} label="개별심사" onClick={execJudge(params.row)} />
|
|
|
|
처리
|
|
|
|
|
|
|
|
</Button>
|
|
|
|
|
|
|
|
],
|
|
|
|
],
|
|
|
|
align: 'center'
|
|
|
|
align: 'center'
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -196,24 +186,24 @@ const JudgeReview = ({ msDatagb, menuName }) => {
|
|
|
|
}, [search]);
|
|
|
|
}, [search]);
|
|
|
|
|
|
|
|
|
|
|
|
const handleOnCellClick = async (e) => {
|
|
|
|
const handleOnCellClick = async (e) => {
|
|
|
|
if (e?.field === 'msDate') {
|
|
|
|
// if (e?.field === 'msDate') {
|
|
|
|
const params = {
|
|
|
|
// const params = {
|
|
|
|
msDatagb: e.row.msDatagb,
|
|
|
|
// msDatagb: e.row.msDatagb,
|
|
|
|
msSdate: e.row.msSdate,
|
|
|
|
// msSdate: e.row.msSdate,
|
|
|
|
msEdate: e.row.msEdate,
|
|
|
|
// msEdate: e.row.msEdate,
|
|
|
|
msChasu: e.row.msChasu,
|
|
|
|
// msChasu: e.row.msChasu,
|
|
|
|
msuTeam: e.row.msuTeam
|
|
|
|
// msuTeam: e.row.msuTeam
|
|
|
|
};
|
|
|
|
// };
|
|
|
|
const res = await findJudgeResults(params);
|
|
|
|
// const res = await findJudgeResults(params);
|
|
|
|
setJudgeResultData({
|
|
|
|
// setJudgeResultData({
|
|
|
|
...res?.data,
|
|
|
|
// ...res?.data,
|
|
|
|
selectedRow: e.row,
|
|
|
|
// selectedRow: e.row,
|
|
|
|
judgeTeam: res.data?.judgeTeam
|
|
|
|
// judgeTeam: res.data?.judgeTeam
|
|
|
|
});
|
|
|
|
// });
|
|
|
|
|
|
|
|
//
|
|
|
|
setTitle(`${e.row.msCdate} ${menuName} 심사 결과 (${e.row.msChasu}차 - 총 ${e.row.cnt}건)`);
|
|
|
|
// setTitle(`${e.row.msCdate} ${menuName} 심사 결과 (${e.row.msChasu}차 - 총 ${e.row.cnt}건)`);
|
|
|
|
setOpen(true);
|
|
|
|
// setOpen(true);
|
|
|
|
}
|
|
|
|
// }
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
return (
|
|
|
|
return (
|
|
|
|