feat: 심사자 심의 진행

main
minuk926 3 years ago
parent 88d5a33e25
commit ff4955f351

@ -6,9 +6,9 @@ import getYear from 'date-fns/getYear';
// material-ui
import { GridActionsCellItem } from '@mui/x-data-grid';
import { Button, Divider, FormControl, Grid, InputAdornment, Link, MenuItem, OutlinedInput, Select } from '@mui/material';
import DeleteIcon from '@mui/icons-material/Delete';
import { IconSearch, IconFileReport } from '@tabler/icons';
import { Divider, FormControl, Grid, InputAdornment, Link, MenuItem, OutlinedInput, Select } from '@mui/material';
import CreditScoreIcon from '@mui/icons-material/CreditScore';
import { IconSearch } from '@tabler/icons';
// berry ui
import MainCard from 'ui-component/cards/MainCard';
@ -16,7 +16,7 @@ import MainCard from 'ui-component/cards/MainCard';
// project imports
import MuiDataGrid from 'views/cmm/mui-grid/MuiDataGrid';
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';
const JudgeReview = ({ msDatagb, menuName }) => {
@ -128,6 +128,21 @@ const JudgeReview = ({ msDatagb, menuName }) => {
},
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: '심사 마감 일시',
headerAlign: 'center',
@ -138,39 +153,14 @@ const JudgeReview = ({ msDatagb, menuName }) => {
valueGetter: (params) => `${params.row.msCdate} ${params.row.msClosesi}`,
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: '개별심사',
headerAlign: 'center',
field: 'actions',
type: 'actions',
width: 80,
// getActions: (params) => [<GridActionsCellItem icon={<IconFileReport />} label="" onClick={deleteJudge(params.row)} />],
getActions: (params) => [
<Button color="warning" onClick={execJudge(params.row)}>
처리
</Button>
<GridActionsCellItem color="error" icon={<CreditScoreIcon />} label="개별심사" onClick={execJudge(params.row)} />
],
align: 'center'
}
@ -196,24 +186,24 @@ const JudgeReview = ({ msDatagb, menuName }) => {
}, [search]);
const handleOnCellClick = async (e) => {
if (e?.field === 'msDate') {
const params = {
msDatagb: e.row.msDatagb,
msSdate: e.row.msSdate,
msEdate: e.row.msEdate,
msChasu: e.row.msChasu,
msuTeam: e.row.msuTeam
};
const res = await findJudgeResults(params);
setJudgeResultData({
...res?.data,
selectedRow: e.row,
judgeTeam: res.data?.judgeTeam
});
setTitle(`${e.row.msCdate} ${menuName} 심사 결과 (${e.row.msChasu}차 - 총 ${e.row.cnt}건)`);
setOpen(true);
}
// if (e?.field === 'msDate') {
// const params = {
// msDatagb: e.row.msDatagb,
// msSdate: e.row.msSdate,
// msEdate: e.row.msEdate,
// msChasu: e.row.msChasu,
// msuTeam: e.row.msuTeam
// };
// const res = await findJudgeResults(params);
// setJudgeResultData({
// ...res?.data,
// selectedRow: e.row,
// judgeTeam: res.data?.judgeTeam
// });
//
// setTitle(`${e.row.msCdate} ${menuName} (${e.row.msChasu} - ${e.row.cnt})`);
// setOpen(true);
// }
};
return (

Loading…
Cancel
Save