feat: 심의등록 저장 반영
parent
5f42b45a85
commit
e5de6c5462
@ -1,9 +1,9 @@
|
||||
import GridModal from '../../form/Modal/GridModal';
|
||||
import CmmModal from '../../form/Modal/CmmModal';
|
||||
import Board from '../board/Board';
|
||||
|
||||
const ModalDetails = () => (
|
||||
<GridModal>
|
||||
<>
|
||||
<Board />
|
||||
</GridModal>
|
||||
</>
|
||||
);
|
||||
export default ModalDetails;
|
||||
|
@ -0,0 +1,63 @@
|
||||
import React, { useState } from 'react';
|
||||
import { Checkbox, FormControlLabel, Grid, Typography, TextField } from '@mui/material';
|
||||
import AdapterDateFns from '@mui/lab/AdapterDateFns';
|
||||
import LocalizationProvider from '@mui/lab/LocalizationProvider';
|
||||
import { DatePicker, TimePicker } from '@mui/lab';
|
||||
|
||||
const SaveParkingSimsaForm = () => {
|
||||
const [sDate, setSdate] = useState(new Date());
|
||||
const [sTime, setStime] = useState(new Date());
|
||||
return (
|
||||
<>
|
||||
<Grid container spacing={3}>
|
||||
<Grid item xs={12} sm={6}>
|
||||
<TextField required id="msuTeam" name="msuTeam" label="팀" fullWidth autoComplete="given-name" />
|
||||
</Grid>
|
||||
<Grid item xs={12} sm={6}>
|
||||
<TextField required id="msChasu" name="msChasu" label="차수" fullWidth autoComplete="family-name" />
|
||||
</Grid>
|
||||
<Grid item xs={12}>
|
||||
<TextField required id="msSdate" name="msSdate" label="심사시작일" fullWidth autoComplete="shipping address-line1" />
|
||||
<LocalizationProvider dateAdapter={AdapterDateFns}>
|
||||
<DatePicker
|
||||
renderInput={(props) => <TextField fullWidth {...props} helperText="" />}
|
||||
label="심의시작일"
|
||||
value={sDate}
|
||||
inputFormat="yyyy-MM-dd"
|
||||
mask="____-__-__"
|
||||
onChange={(newValue) => {
|
||||
setSdate(newValue);
|
||||
}}
|
||||
/>
|
||||
</LocalizationProvider>
|
||||
</Grid>
|
||||
<Grid item xs={12}>
|
||||
<TextField required id="msStartsi" name="msStartsi" label="심사시작시간" fullWidth autoComplete="shipping address-line2" />
|
||||
<LocalizationProvider dateAdapter={AdapterDateFns}>
|
||||
<TimePicker
|
||||
renderInput={(props) => <TextField fullWidth {...props} helperText="" />}
|
||||
label="심사시작시간"
|
||||
value={sTime}
|
||||
inputFormat="HH"
|
||||
mask="__"
|
||||
onChange={(newValue) => {
|
||||
setStime(newValue);
|
||||
}}
|
||||
/>
|
||||
</LocalizationProvider>
|
||||
</Grid>
|
||||
<Grid item xs={12} sm={6}>
|
||||
<TextField required id="msEdate" name="msEdate" label="심사종료일" fullWidth autoComplete="shipping address-level2" />
|
||||
</Grid>
|
||||
<Grid item xs={12} sm={6}>
|
||||
<TextField id="msCdate" name="msCdate" label="심사마감일" fullWidth />
|
||||
</Grid>
|
||||
<Grid item xs={12} sm={6}>
|
||||
<TextField required id="msClosesi" name="msClosesi" label="심사마감시간" fullWidth autoComplete="shipping postal-code" />
|
||||
</Grid>
|
||||
</Grid>
|
||||
</>
|
||||
);
|
||||
};
|
||||
|
||||
export default SaveParkingSimsaForm;
|
@ -0,0 +1,59 @@
|
||||
import * as React from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
|
||||
import Box from '@mui/material/Box';
|
||||
import Button from '@mui/material/Button';
|
||||
import Typography from '@mui/material/Typography';
|
||||
import Modal from '@mui/material/Modal';
|
||||
import { Divider, Grid } from '@mui/material';
|
||||
|
||||
const style = {
|
||||
position: 'absolute',
|
||||
top: '50%',
|
||||
left: '50%',
|
||||
transform: 'translate(-50%, -50%)',
|
||||
width: 900,
|
||||
bgcolor: 'background.paper',
|
||||
border: '2px solid #000',
|
||||
boxShadow: 24,
|
||||
p: 4
|
||||
};
|
||||
|
||||
export default function CmmModal({ isBackdrop = false, open, setOpen, title, children, callback = () => {} }) {
|
||||
const handleClose = () => {
|
||||
if (callback) callback();
|
||||
setOpen(false);
|
||||
};
|
||||
|
||||
return (
|
||||
<div>
|
||||
{/* <Button onClick={handleOpen}>Grid Modal(List)</Button> */}
|
||||
<Modal
|
||||
hideBackdrop={isBackdrop}
|
||||
open={open}
|
||||
onClose={handleClose}
|
||||
aria-labelledby="modal-modal-title"
|
||||
aria-describedby="modal-modal-description"
|
||||
>
|
||||
<Box sx={style}>
|
||||
<Typography id="modal-modal-title" variant="h2" component="h2" sx={{ marginBottom: 3 }}>
|
||||
{title}
|
||||
</Typography>
|
||||
{children}
|
||||
<Grid item sx={{ marginTop: 3 }}>
|
||||
<Button onClick={handleClose}>Close Modal</Button>
|
||||
</Grid>
|
||||
</Box>
|
||||
</Modal>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
CmmModal.propTypes = {
|
||||
isBackdrop: PropTypes.bool,
|
||||
open: PropTypes.bool,
|
||||
title: PropTypes.string,
|
||||
children: PropTypes.node,
|
||||
setOpen: PropTypes.func,
|
||||
callback: PropTypes.func
|
||||
};
|
@ -1,44 +0,0 @@
|
||||
import * as React from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
|
||||
import Box from '@mui/material/Box';
|
||||
import Button from '@mui/material/Button';
|
||||
import Typography from '@mui/material/Typography';
|
||||
import Modal from '@mui/material/Modal';
|
||||
|
||||
const style = {
|
||||
position: 'absolute',
|
||||
top: '50%',
|
||||
left: '50%',
|
||||
transform: 'translate(-50%, -50%)',
|
||||
width: 900,
|
||||
bgcolor: 'background.paper',
|
||||
border: '2px solid #000',
|
||||
boxShadow: 24,
|
||||
p: 4
|
||||
};
|
||||
|
||||
export default function GridModal({ children }) {
|
||||
const [open, setOpen] = React.useState(true);
|
||||
const handleOpen = () => setOpen(true);
|
||||
const handleClose = () => setOpen(false);
|
||||
|
||||
return (
|
||||
<div>
|
||||
{/* <Button onClick={handleOpen}>Grid Modal(List)</Button> */}
|
||||
<Modal open={open} onClose={handleClose} aria-labelledby="modal-modal-title" aria-describedby="modal-modal-description">
|
||||
<Box sx={style}>
|
||||
<Typography id="modal-modal-title" variant="h2" component="h2">
|
||||
Text in a modal
|
||||
</Typography>
|
||||
{children}
|
||||
<Button onClick={handleClose}>Close Modal</Button>
|
||||
</Box>
|
||||
</Modal>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
GridModal.propTypes = {
|
||||
children: PropTypes.node
|
||||
};
|
Loading…
Reference in New Issue