fix: 단속내용 인쇄기능 추가 및 답변 내용 수정, 심의목록 심사기간 및 마감일시 수정 기능, 심의 처리 시 에러나면 Exception나는 부분 제거 후 log insert 처리

mpower
sjh88 2 years ago
parent 72486e1b1e
commit 64d6cf2bbc

@ -1,7 +1,7 @@
NODE_PATH=src NODE_PATH=src
REACT_APP_MODE=production REACT_APP_MODE=production
REACT_APP_VERSION = v0.0.1 REACT_APP_VERSION = v0.0.1
#REACT_APP_API_URL=http://localhost:8090 REACT_APP_API_URL=http://localhost:8090
#REACT_APP_API_URL=http://211.119.124.9:8090 #REACT_APP_API_URL=http://211.119.124.9:8090
REACT_APP_API_URL=http://211.119.124.107:8090 #REACT_APP_API_URL=http://211.119.124.62:8090
REACT_APP_SERVER_TIMEOUT=60000 REACT_APP_SERVER_TIMEOUT=60000

@ -29,6 +29,7 @@
"react/no-array-index-key": 0, "react/no-array-index-key": 0,
"react/jsx-props-no-spreading": 0, "react/jsx-props-no-spreading": 0,
"react/forbid-prop-types": 0, "react/forbid-prop-types": 0,
"react/no-unknown-property": 0,
"import/order": 0, "import/order": 0,
"import/no-cycle": 0, "import/no-cycle": 0,
"no-console": 0, "no-console": 0,

2
.gitignore vendored

@ -13,7 +13,7 @@
# misc # misc
.DS_Store .DS_Store
#.env.local #cal
#.env.production #.env.production
npm-debug.log* npm-debug.log*

49223
package-lock.json generated

File diff suppressed because it is too large Load Diff

@ -66,6 +66,7 @@
"react-otp-input-rc-17": "^2.4.1-minor", "react-otp-input-rc-17": "^2.4.1-minor",
"react-pdf": "^5.7.2", "react-pdf": "^5.7.2",
"react-perfect-scrollbar": "^1.5.8", "react-perfect-scrollbar": "^1.5.8",
"react-query": "^3.39.1",
"react-quill": "^2.0.0-beta.4", "react-quill": "^2.0.0-beta.4",
"react-redux": "^7.2.6", "react-redux": "^7.2.6",
"react-resizable": "^3.0.4", "react-resizable": "^3.0.4",

@ -23,7 +23,8 @@ import {
GET_PARKING_FRECAD_IMAGE, GET_PARKING_FRECAD_IMAGE,
GET_PARKING_CONTAD_IMAGE, GET_PARKING_CONTAD_IMAGE,
GET_PARKING_PICAD_IMAGE, GET_PARKING_PICAD_IMAGE,
GET_PARKING_JUDGE_FILE_DOWNLOAD GET_PARKING_JUDGE_FILE_DOWNLOAD,
SAVE_ADMIN_DATE_DATA
} from 'commons/ApiUrl'; } from 'commons/ApiUrl';
import { setRowId } from './common'; import { setRowId } from './common';
import _ from 'lodash'; import _ from 'lodash';
@ -290,3 +291,8 @@ export async function saveParkingJudgeResult(params) {
// eslint-disable-next-line no-return-await // eslint-disable-next-line no-return-await
return await axios.post(SAVE_PARKING_JUDGE_RESULT, params); return await axios.post(SAVE_PARKING_JUDGE_RESULT, params);
} }
export async function saveDateData(params) {
// eslint-disable-next-line no-return-await
return await axios.post(SAVE_ADMIN_DATE_DATA, params);
}

@ -0,0 +1,43 @@
@media print {
.report + .report {
margin-top: 0;
}
}
@page {
size: A4;
margin: 20mm;
}
@page :first {margin:0 20mm}
.report {
//break-after: page;
margin-top: 20mm;
width: 100%;
border-style: double;
border-width: 2px;
border-color: #000000;
border-collapse: collapse;
color: #000000;
}
.report + .report {
margin-top: 40px;
}
.report th, td{
border: 1px solid #000000;
font-family: "??";
font-size:12px;
color: #525252;
}
.tit_text2 {
font-size:1.5em;
font-family: "??";
color:#666666;
text-decoration: none;
line-height: normal;
font-weight: bold;
}

@ -42,6 +42,8 @@ export const REMOVE_ADMIN_JUDGE = '/api/v2/ctgy/admin/remove';
export const SAVE_ADMIN_JUDGE_STDS = '/api/v2/ctgy/admin/judge'; export const SAVE_ADMIN_JUDGE_STDS = '/api/v2/ctgy/admin/judge';
export const SAVE_ADMIN_DATE_DATA = '/api/v2/ctgy/admin/date';
export const GET_JUDGE_LIST = '/api/v2/ctgy/judge'; export const GET_JUDGE_LIST = '/api/v2/ctgy/judge';
export const SAVE_JUDGE_RESULT = '/api/v2/ctgy/judge'; export const SAVE_JUDGE_RESULT = '/api/v2/ctgy/judge';
export const GET_PARKING_IMAGE2 = '/api/v2/ctgy/parking/judge2/'; export const GET_PARKING_IMAGE2 = '/api/v2/ctgy/parking/judge2/';

@ -1,4 +1,5 @@
import { useState } from 'react'; import { useState, useRef } from 'react';
import ReactToPrint, { useReactToPrint } from 'react-to-print';
import _ from 'lodash'; import _ from 'lodash';
import PropTypes from 'prop-types'; import PropTypes from 'prop-types';
@ -6,12 +7,13 @@ import NumberFormat from 'react-number-format';
import { Grid, TextField, MenuItem, Select, FormControl, InputLabel, Divider } from '@mui/material'; import { Grid, TextField, MenuItem, Select, FormControl, InputLabel, Divider } from '@mui/material';
import Button from '@mui/material/Button'; import Button from '@mui/material/Button';
import { Delete, List } from '@mui/icons-material'; import { List, Print, Delete } from '@mui/icons-material';
import { judgeImgDownload } from 'apis/judge'; import { judgeImgDownload } from 'apis/judge';
import ImageFileViewForm from 'views/cmm/file-ctl/ImageFileViewForm'; import ImageFileViewForm from 'views/cmm/file-ctl/ImageFileViewForm';
import CmmImgViewModal from 'views/cmm/CmmImgViewModal'; import CmmImgViewModal from 'views/cmm/CmmImgViewModal';
import { removeAlert } from 'commons/XitCmm'; import { removeAlert } from 'commons/XitCmm';
import JudgeDataPrintForm from './JudgeDataPrintForm';
const ModifyJudgeDataForm = ({ rowData, contDocs, ingbs, setOpen, handleModalSave, onModify, setDetail }) => { const ModifyJudgeDataForm = ({ rowData, contDocs, ingbs, setOpen, handleModalSave, onModify, setDetail }) => {
const [selectedContDoc, setSelectedContDoc] = useState(rowData?.scContDoc); const [selectedContDoc, setSelectedContDoc] = useState(rowData?.scContDoc);
@ -50,6 +52,8 @@ const ModifyJudgeDataForm = ({ rowData, contDocs, ingbs, setOpen, handleModalSav
setImgName(fileName); setImgName(fileName);
}; };
const ref = useRef();
return ( return (
<> <>
<Grid mt={1}> <Grid mt={1}>
@ -61,7 +65,7 @@ const ModifyJudgeDataForm = ({ rowData, contDocs, ingbs, setOpen, handleModalSav
<TextField disabled size="small" required label="전송상태" fullWidth value={rowData?.scTransferNm} /> <TextField disabled size="small" required label="전송상태" fullWidth value={rowData?.scTransferNm} />
</Grid> </Grid>
<Grid item xs={3}> <Grid item xs={3}>
<TextField disabled size="small" required label="자료상태" fullWidth value={rowData?.scStateNm} /> <TextField disabled size="small" required label="자료상태" fullWidth value={rowData.scStateNm} />
</Grid> </Grid>
<Grid item xs={3}> <Grid item xs={3}>
<TextField disabled required label="차량번호" size="small" fullWidth value={rowData?.scCarnum} autoFocus /> <TextField disabled required label="차량번호" size="small" fullWidth value={rowData?.scCarnum} autoFocus />
@ -218,6 +222,13 @@ const ModifyJudgeDataForm = ({ rowData, contDocs, ingbs, setOpen, handleModalSav
))} ))}
</Grid> </Grid>
</Grid> </Grid>
{(rowData?.scState === '3' || rowData?.scState === '4') && (
<Grid container mt={1}>
<Grid item xs={12}>
<TextField disabled required label="답변내용" size="small" fullWidth value={rowData?.scAnswer} />
</Grid>
</Grid>
)}
<Grid container mt={1}> <Grid container mt={1}>
<Grid item xs={12}> <Grid item xs={12}>
<Divider /> <Divider />
@ -229,6 +240,19 @@ const ModifyJudgeDataForm = ({ rowData, contDocs, ingbs, setOpen, handleModalSav
목록 목록
</Button> </Button>
</Grid> </Grid>
<Grid item>
<ReactToPrint
trigger={() => (
<Button variant="contained" size="small" startIcon={<Print />}>
인쇄
</Button>
)}
content={() => ref.current}
/>
<div style={{ display: 'none' }}>
<JudgeDataPrintForm ref={ref} content={rowData} />
</div>
</Grid>
<Grid item style={{ marginLeft: 'auto' }}> <Grid item style={{ marginLeft: 'auto' }}>
<Button variant="contained" color="primary" size="small" onClick={onModify}> <Button variant="contained" color="primary" size="small" onClick={onModify}>
변경하기 변경하기

@ -29,6 +29,7 @@ const JudgeDataModifyForm = ({ rowData, contDocs, ingbs, setOpen, handleModalSav
const [scCdate, setScCdate] = useState(rowData?.scCdate); const [scCdate, setScCdate] = useState(rowData?.scCdate);
const [scJbtime, setScJbtime] = useState(rowData?.scJbtime); const [scJbtime, setScJbtime] = useState(rowData?.scJbtime);
const [scPos, setScPos] = useState(rowData?.scPos ?? ''); const [scPos, setScPos] = useState(rowData?.scPos ?? '');
const [scAnswer, setScAnswer] = useState(rowData?.scAnswer);
const [picads, setPicads] = useState({}); const [picads, setPicads] = useState({});
const [frecads, setFrecads] = useState({}); const [frecads, setFrecads] = useState({});
@ -55,6 +56,7 @@ const JudgeDataModifyForm = ({ rowData, contDocs, ingbs, setOpen, handleModalSav
formData.append('zipcode2', zipcode1 ? zipcode1.substring(3) : ''); formData.append('zipcode2', zipcode1 ? zipcode1.substring(3) : '');
formData.append('scJuso', scJuso || ''); formData.append('scJuso', scJuso || '');
formData.append('scBunji', scBunji || ''); formData.append('scBunji', scBunji || '');
formData.append('scAnswer', scAnswer || '');
Object.values(picads).forEach((v) => { Object.values(picads).forEach((v) => {
formData.append('picadFiles', v); formData.append('picadFiles', v);
@ -414,6 +416,20 @@ const JudgeDataModifyForm = ({ rowData, contDocs, ingbs, setOpen, handleModalSav
))} ))}
</Grid> </Grid>
</Grid> </Grid>
{(rowData?.scState === '3' || rowData?.scState === '4') && (
<Grid container mt={1}>
<Grid item xs={12}>
<TextField
size="small"
required
label="답변내용"
fullWidth
value={scAnswer || ''}
onChange={(e) => setScAnswer(e?.target?.value)}
/>
</Grid>
</Grid>
)}
<Grid container spacing={1} mt={1}> <Grid container spacing={1} mt={1}>
<Grid item xs={12}> <Grid item xs={12}>
<Divider /> <Divider />

@ -0,0 +1,134 @@
import { forwardRef } from 'react';
import 'assets/scss/print.scss';
import NumberFormat from 'react-number-format';
import format from 'date-fns/format';
const toDate = new Date();
// eslint-disable-next-line
const JudgeDataPrintForm = forwardRef((props, ref) => {
return (
<table ref={ref} className="report">
<tr>
<td colSpan="5" align="center" className="tit_text2" height="50">
{props.content.scDatagb === '1' && '부정주차 이의신청'}
{props.content.scDatagb === '2' && '장애인주차구역 위반 의견진술'}
&nbsp;처리결과 통지서
</td>
</tr>
<tr>
<td rowSpan="2" align="center" width="50">
<b>
&nbsp;&nbsp;&nbsp;
<br />
진술인
</b>
</td>
<td align="center" height="40" width="50">
<b>&nbsp;&nbsp;&nbsp;</b>
</td>
<td colSpan="3" width="480">
{props.content.scName}
</td>
</tr>
<tr>
<td align="center" height="40" width="50">
<b>&nbsp;&nbsp;&nbsp;</b>
</td>
<td colSpan="3">
{props.content.scJuso}&nbsp;{props.content.scBunji}
</td>
</tr>
<tr>
<td colSpan="2" align="center" height="40" width="100">
<b>&nbsp;&nbsp;&nbsp;</b>
</td>
<td align="center" width="120">
{props.content.scSeq}
</td>
<td align="center" width="100">
<b>차량등록번호</b>
</td>
<td width="260">{props.content.scCarnum}</td>
</tr>
<tr>
<td colSpan="2" align="center" height="40" width="100">
<b>&nbsp;&nbsp;&nbsp;</b>
</td>
<td align="center" width="120">
<NumberFormat format="####-##-##" value={props.content.scWdate} displayType="text" />
&nbsp;
<NumberFormat format="##:##" value={props.content.scJbtime} displayType="text" />
</td>
<td align="center" width="100">
<b>&nbsp;&nbsp;&nbsp;</b>
</td>
<td width="260">
{props.content.scDatagb === '1' && '거주자우선주차구역내 부정주차'}
{props.content.scDatagb === '2' && '장애인전용주차 구역내 일반차량 주차'}
</td>
</tr>
<tr>
<td colSpan="2" align="center" height="40" width="100">
<b>&nbsp;&nbsp;&nbsp;</b>
</td>
<td colSpan="3">
{props.content.scDong}&nbsp;{props.content.scPos}
</td>
</tr>
<tr>
<td colSpan="2" align="center" height="40" width="100">
<b>&nbsp;&nbsp;&nbsp;</b>
</td>
<td colSpan="3">
<br />
<br />
<span className="tit_text2">({props.content.scStateNm})</span>
<br />
답변
<br />
{props.content.scAnswer}
<br />
<br />
</td>
</tr>
<tr>
<td colSpan="5">
<br />
<br />
<b>
&nbsp;&nbsp; 거주자우선주차 구역내 부정주차와 관련하여 제출하신 의견진술에 대하여 심의위원회에서 주차장법 제8조2
<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(노상주차장에서의 주차행위 제한 ) 의거하여 위반내용을 심의한 결과 위와같이 결정되었음을
통보합니다.
</b>
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
&nbsp;&nbsp;<b> 기타문의안내 : ARS 1544-2113, FAX : 0505-489-0440</b>
<br />
<br />
<br />
</td>
</tr>
<tr>
<td colSpan="5" align="center" height="90">
<b>{format(toDate, 'yyyy년 MM월 dd일')}</b>
<br />
<br />
<span className="tit_text2">
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span>
</td>
</tr>
</table>
);
});
export default JudgeDataPrintForm;

@ -21,6 +21,7 @@ const JudgeDataReview = ({ scDatagb, menuName }) => {
const showAlert = useAlert(); const showAlert = useAlert();
const [scContDocs, setScContDocs] = useState([]); const [scContDocs, setScContDocs] = useState([]);
const [scIngbs, setScIngbs] = useState([]); const [scIngbs, setScIngbs] = useState([]);
const [scStates, setScStates] = useState([]);
const [newOpen, setNewOpen] = useState(false); const [newOpen, setNewOpen] = useState(false);
const [dtlOpen, setDtlOpen] = useState(false); const [dtlOpen, setDtlOpen] = useState(false);
@ -103,6 +104,9 @@ const JudgeDataReview = ({ scDatagb, menuName }) => {
getComboCodeList({ codeMcd: 'RC_INGB' }).then((res) => { getComboCodeList({ codeMcd: 'RC_INGB' }).then((res) => {
setScIngbs(res.data); setScIngbs(res.data);
}); });
getComboCodeList({ codeMcd: 'SC_STATE' }).then((res) => {
setScStates(res.data);
});
}, []); }, []);
const handleCreate = () => { const handleCreate = () => {
@ -193,6 +197,7 @@ const JudgeDataReview = ({ scDatagb, menuName }) => {
scDatagb={scDatagb} scDatagb={scDatagb}
contDocs={scContDocs} contDocs={scContDocs}
ingbs={scIngbs} ingbs={scIngbs}
states={scStates}
setOpen={setNewOpen} setOpen={setNewOpen}
setCreate={setCreate} setCreate={setCreate}
/> />
@ -204,6 +209,7 @@ const JudgeDataReview = ({ scDatagb, menuName }) => {
rowData={rowData} rowData={rowData}
contDocs={scContDocs} contDocs={scContDocs}
ingbs={scIngbs} ingbs={scIngbs}
states={scStates}
setDetail={setDetail} setDetail={setDetail}
handleModalSave={handleJudgeData} handleModalSave={handleJudgeData}
onModify={openModify} onModify={openModify}
@ -217,6 +223,7 @@ const JudgeDataReview = ({ scDatagb, menuName }) => {
rowData={rowData} rowData={rowData}
contDocs={scContDocs} contDocs={scContDocs}
ingbs={scIngbs} ingbs={scIngbs}
states={scStates}
setModify={setModify} setModify={setModify}
handleModalSave={handleJudgeData} handleModalSave={handleJudgeData}
onModify={openModify} onModify={openModify}

@ -0,0 +1,156 @@
import { useState } from 'react';
import PropTypes from 'prop-types';
import NumberFormat from 'react-number-format';
import { useAlert } from 'react-alert';
import { Grid, TextField } from '@mui/material';
import Button from '@mui/material/Button';
import { saveAlert } from 'commons/XitCmm';
const JudgeDateModifyForm = ({ dateDatas, setDateModify, handleModalSave }) => {
const alert = useAlert();
const [msDatagb, setMsDatagb] = useState(dateDatas?.msDatagb);
const [msYear, setMsYear] = useState(dateDatas?.msYear);
const [msChasu, setMsChasu] = useState(dateDatas?.msChasu);
const [msSdate, setMsSdate] = useState(dateDatas?.msSdate);
const [msEdate, setMsEdate] = useState(dateDatas?.msEdate);
const [msCdate, setMsCdate] = useState(dateDatas?.msCdate);
const [msClosesi, setMsClosesi] = useState(dateDatas?.msClosesi);
const onSave = () => {
// TODO : validation check
const param = {
msDatagb,
msYear,
msChasu,
msSdate,
msEdate,
msCdate,
msClosesi
};
//
if (msSdate.length < 8) {
alert.show('심사 시작일자는 필수입니다.');
return;
}
if (msEdate.length < 8) {
alert.show('심사 종료일자는 필수입니다.');
return;
}
if (msCdate.length < 8) {
alert.show('심사 마감일자는 필수입니다.');
return;
}
if (msClosesi.length < 2) {
alert.show('심사 마감시간은 필수입니다.');
return;
}
if (msEdate.replace(/-/g, '') > msCdate.replace(/-/g, '')) {
alert.show('심사 종료일자가 심사 마감일자보다 클 수 없습니다.');
return;
}
setDateModify(false);
saveAlert(
() => {
handleModalSave('SAVE', param);
},
() => {
setDateModify(true);
}
);
};
const onCancel = () => {
setDateModify(false);
};
return (
<>
<Grid mt={2}>
<Grid container spacing={0.5} mb={1.5}>
<Grid item xs={6}>
<TextField disabled required label="심의 년도" size="small" fullWidth value={msYear} autoFocus />
</Grid>
<Grid item xs={6}>
<TextField disabled required label="심의 차수" size="small" fullWidth value={msChasu} autoFocus />
</Grid>
</Grid>
<Grid container spacing={0.5} mb={1.5}>
<Grid item xs={6}>
<NumberFormat
size="small"
customInput={TextField}
required
label="심사 시작일자"
format="####-##-##"
fullWidth
value={msSdate}
onChange={(e) => setMsSdate(e?.target?.value)}
/>
</Grid>
<Grid item xs={6}>
<NumberFormat
size="small"
customInput={TextField}
required
label="심사 종료일자"
format="####-##-##"
fullWidth
value={msEdate}
onChange={(e) => setMsEdate(e?.target?.value)}
/>
</Grid>
</Grid>
<Grid container spacing={0.5} mb={1.5}>
<Grid item xs={6}>
<NumberFormat
size="small"
customInput={TextField}
required
label="심사 마감일자"
format="####-##-##"
fullWidth
value={msCdate}
onChange={(e) => setMsCdate(e?.target?.value)}
/>
</Grid>
<Grid item xs={6}>
<NumberFormat
size="small"
customInput={TextField}
required
label="심사 마감시간"
format="##"
fullWidth
value={msClosesi}
onChange={(e) => setMsClosesi(e?.target?.value)}
/>
</Grid>
</Grid>
</Grid>
<Grid item container spacing={0.5} xs={12} mt={1}>
<Grid item>
<Button variant="contained" color="error" size="small" onClick={onCancel}>
취소
</Button>
</Grid>
<Grid item style={{ marginLeft: 'auto' }}>
<Button variant="contained" color="primary" size="small" onClick={onSave}>
저장
</Button>
</Grid>
</Grid>
</>
);
};
JudgeDateModifyForm.propTypes = {
dateDatas: PropTypes.object.isRequired,
handleModalSave: PropTypes.func.isRequired,
setDateModify: PropTypes.func.isRequired
};
export default JudgeDateModifyForm;

@ -16,12 +16,27 @@ 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 { findJudgeResults, findJudges, removeJudge } from 'apis/judge'; import { findJudgeResults, findJudges, removeJudge, saveDateData } from 'apis/judge';
import CmmModal from 'views/cmm/CmmModal'; import CmmModal from 'views/cmm/CmmModal';
import ModalJudgeResult from './ModalJudgeResult'; import ModalJudgeResult from './ModalJudgeResult';
import { findParkings, removeParkingJudge } from '../../../../apis/parking'; import { findParkings, removeParkingJudge } from '../../../../apis/parking';
import { useAlert } from 'react-alert'; import { useAlert } from 'react-alert';
import { removeAlert } from '../../../../commons/XitCmm'; import { removeAlert } from '../../../../commons/XitCmm';
import JudgeDateModifyForm from './JudgeDateModifyForm';
import CmmModalStyle from 'views/cmm/CmmModalStyle';
const style = {
position: 'relative',
top: '50%',
left: '50%',
transform: 'translate(-50%, -50%)',
width: 500,
minHeight: 300,
bgcolor: 'background.paper',
border: '2px solid #000',
boxShadow: 24,
p: 3
};
const year = getYear(new Date()); const year = getYear(new Date());
const years = _.range(year, year - 14, -1); const years = _.range(year, year - 14, -1);
@ -30,6 +45,7 @@ const JudgeReview = ({ msDatagb, menuName }) => {
const showAlert = useAlert(); const showAlert = useAlert();
const [open, setOpen] = useState(false); const [open, setOpen] = useState(false);
const [dateModify, setDateModify] = useState(false);
const [title, setTitle] = useState(); const [title, setTitle] = useState();
const [selectedYear, setSelectedYear] = useState(year); const [selectedYear, setSelectedYear] = useState(year);
@ -52,6 +68,15 @@ const JudgeReview = ({ msDatagb, menuName }) => {
judgeTeam: '' judgeTeam: ''
}); });
const [judgeDatas, setJudgeDatas] = useState([]); const [judgeDatas, setJudgeDatas] = useState([]);
const [dateDatas, setDateDatas] = useState({
msDatagb: '',
msYear: '',
msChas: '',
msSdate: '',
msEdate: '',
msCdate: '',
msClosesi: ''
});
const search = useCallback( const search = useCallback(
async (datagb) => { async (datagb) => {
@ -103,6 +128,21 @@ const JudgeReview = ({ msDatagb, menuName }) => {
[] []
); );
const handleDateData = (type, payload) => {
switch (type) {
case 'SAVE':
saveDateData(payload).then((res) => {
if (res?.success) {
search();
} else {
showAlert.show(`${res?.data.message}`);
}
});
break;
default:
}
};
useEffect(() => { useEffect(() => {
search(); search();
}, [search]); }, [search]);
@ -134,6 +174,11 @@ const JudgeReview = ({ msDatagb, menuName }) => {
minWidth: 150, minWidth: 150,
width: 200, width: 200,
valueGetter: (params) => `${params.row.msCdate} ${params.row.msClosesi}`, valueGetter: (params) => `${params.row.msCdate} ${params.row.msClosesi}`,
renderCell: (params) => (
<Link underline="hover" href="#">
{params.value}
</Link>
),
align: 'center' align: 'center'
}, },
{ {
@ -192,6 +237,20 @@ const JudgeReview = ({ msDatagb, menuName }) => {
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);
} }
if (e?.field === 'msCdate') {
const params = {
msDatagb: e.row.msDatagb,
msYear: selectedYear,
msChasu: e.row.msChasu,
msSdate: e.row.msSdate,
msEdate: e.row.msEdate,
msCdate: e.row.msCdate,
msClosesi: e.row.msClosesi
};
setDateDatas(params);
setDateModify(true);
}
}; };
return ( return (
@ -250,6 +309,10 @@ const JudgeReview = ({ msDatagb, menuName }) => {
<CmmModal isBackdrop title={title} open={open} setOpen={setOpen}> <CmmModal isBackdrop title={title} open={open} setOpen={setOpen}>
<ModalJudgeResult {...judgeResultData} judgeData={judgeDatas} /> <ModalJudgeResult {...judgeResultData} judgeData={judgeDatas} />
</CmmModal> </CmmModal>
,
<CmmModalStyle isBackdrop title="심사 기간 및 마감일시 수정" open={dateModify} setOpen={setDateModify} style={style}>
<JudgeDateModifyForm dateDatas={dateDatas} setDateModify={setDateModify} handleModalSave={handleDateData} />
</CmmModalStyle>
</MainCard> </MainCard>
); );
}; };

@ -0,0 +1,44 @@
import PropTypes from 'prop-types';
import Modal from '@mui/material/Modal';
import { IconButton } from '@mui/material';
import CloseOutlined from '@mui/icons-material/CloseOutlined';
import MainCard from 'ui-component/cards/MainCard';
const CmmModal = ({ isBackdrop = false, open, setOpen, title, children, style, callback = () => {} }) => {
const handleClose = () => {
if (callback) callback();
setOpen(false);
};
return (
<div className="modalGroup">
{/* <Button onClick={handleOpen}>Grid Modal(List)</Button> */}
<Modal hideBackdrop={isBackdrop} open={open} aria-labelledby="modal-modal-title" aria-describedby="modal-modal-description">
<MainCard
sx={style}
title={title}
content
secondary={
<IconButton size="small" variant="rounded" onClick={handleClose}>
<CloseOutlined fontSize="small" />
</IconButton>
}
>
{children}
</MainCard>
</Modal>
</div>
);
};
CmmModal.propTypes = {
isBackdrop: PropTypes.bool,
open: PropTypes.bool,
title: PropTypes.string,
children: PropTypes.node,
setOpen: PropTypes.func,
callback: PropTypes.func
};
export default CmmModal;
Loading…
Cancel
Save