fix: 주정차의견진술 반영

main
minuk926 3 years ago
parent 35c19a4c66
commit 32ffe642e9

@ -42,9 +42,9 @@ const ParkingRegister = () => {
{ headerName: '최초차량번호', headerAlign: 'center', field: 'mmOcarno', align: 'center', minWidth: 110 }, { headerName: '최초차량번호', headerAlign: 'center', field: 'mmOcarno', align: 'center', minWidth: 110 },
{ headerName: '최종차량번호', headerAlign: 'center', field: 'mmNcarno', align: 'center', minWidth: 110 }, { headerName: '최종차량번호', headerAlign: 'center', field: 'mmNcarno', align: 'center', minWidth: 110 },
{ headerName: '성명', headerAlign: 'center', field: 'rcName', minWidth: 150 }, { headerName: '성명', headerAlign: 'center', field: 'rcName', minWidth: 150 },
{ headerName: '진술유형', headerAlign: 'center', field: 'rcContDocStr', minWidth: 130 }, { headerName: '진술유형', headerAlign: 'center', field: 'rcContDocNm', minWidth: 130 },
{ headerName: '접수일자', headerAlign: 'center', field: 'rcDate', align: 'center' }, { headerName: '접수일자', headerAlign: 'center', field: 'rcDate', align: 'center' },
{ headerName: '접수방법', headerAlign: 'center', field: 'rcIngbStr', align: 'center' } { headerName: '접수방법', headerAlign: 'center', field: 'rcIngbNm', align: 'center' }
]; ];
const search = () => { const search = () => {
@ -166,7 +166,14 @@ const ParkingRegister = () => {
</Button> </Button>
</Grid> </Grid>
<Grid item> <Grid item>
<Button variant="contained" color="primary" size="small" startIcon={<PersonAddTwoToneIcon />} onClick={handleSave}> <Button
disabled={selection.length === 0}
variant="contained"
color="primary"
size="small"
startIcon={<PersonAddTwoToneIcon />}
onClick={handleSave}
>
저장 저장
</Button> </Button>
</Grid> </Grid>
@ -193,7 +200,7 @@ const ParkingRegister = () => {
handleSelection={handleSelection} handleSelection={handleSelection}
/> />
<CmmModal isBackdrop title="심의등록" open={open} setOpen={setOpen}> <CmmModal isBackdrop title="심의등록" open={open} setOpen={setOpen}>
<SaveParkingSimsaForm handleModalSave={submitParkingSimsa} /> <SaveParkingSimsaForm isDisabled={selection.length === 0} handleModalSave={submitParkingSimsa} />
</CmmModal> </CmmModal>
</MainCard> </MainCard>
); );

@ -11,6 +11,7 @@ import LocalizationProvider from '@mui/lab/LocalizationProvider';
import { DatePicker, TimePicker } from '@mui/lab'; import { DatePicker, TimePicker } from '@mui/lab';
import Button from '@mui/material/Button'; import Button from '@mui/material/Button';
import PropTypes from 'prop-types'; import PropTypes from 'prop-types';
import { IconFileExport } from '@tabler/icons';
const teams = [ const teams = [
{ code: '001', value: '1팀' }, { code: '001', value: '1팀' },
@ -20,12 +21,12 @@ const teams = [
]; ];
const toDate = new Date(); const toDate = new Date();
const SaveParkingSimsaForm = ({ handleModalSave }) => { const SaveParkingSimsaForm = ({ isDisabled = true, handleModalSave }) => {
const [msuTeam, setMsuTeam] = useState(teams[0].code); const [msuTeam, setMsuTeam] = useState(teams[0].code);
const [msSdate, setMsSdate] = useState(format(toDate, 'yyyy-MM-dd')); const [msSdate, setMsSdate] = useState(format(toDate, 'yyyy-MM-dd'));
const [msStartsi, setMsStartsi] = useState(getHours(toDate)); const [msStartsi, setMsStartsi] = useState(getHours(toDate));
const [msEdate, setMsEdate] = useState(format(toDate, 'yyyy-MM-dd')); const [msEdate, setMsEdate] = useState(format(toDate, 'yyyy-MM-dd'));
const [msChasu, setMsChasu] = useState(); const [msChasu, setMsChasu] = useState(99);
const [msCdate, setMsCdate] = useState(format(toDate, 'yyyy-MM-dd')); const [msCdate, setMsCdate] = useState(format(toDate, 'yyyy-MM-dd'));
const [msClosesi, setMsClosesi] = useState(getHours(toDate)); const [msClosesi, setMsClosesi] = useState(getHours(toDate));
@ -160,12 +161,15 @@ const SaveParkingSimsaForm = ({ handleModalSave }) => {
</Grid> </Grid>
</Grid> </Grid>
<Grid item sx={{ marginTop: 3 }}> <Grid item sx={{ marginTop: 3 }}>
<Button onClick={onSave}>저장</Button> <Button variant="contained" color="primary" size="small" startIcon={<IconFileExport />} onClick={onSave}>
저장
</Button>
</Grid> </Grid>
</> </>
); );
}; };
SaveParkingSimsaForm.propTypes = { SaveParkingSimsaForm.propTypes = {
handleModalSave: PropTypes.func handleModalSave: PropTypes.func.isRequired,
isDisabled: PropTypes.bool.isRequired
}; };
export default SaveParkingSimsaForm; export default SaveParkingSimsaForm;

Loading…
Cancel
Save