|
|
@ -21,12 +21,12 @@ const PublicBoardForm = (props) => {
|
|
|
|
const { create, inCode, inDept, inTitle, inHit, inName, inNalja, inFilename, inContents, setOpen, handleModalSave } = props;
|
|
|
|
const { create, inCode, inDept, inTitle, inHit, inName, inNalja, inFilename, inContents, setOpen, handleModalSave } = props;
|
|
|
|
const alert = useAlert();
|
|
|
|
const alert = useAlert();
|
|
|
|
const quillRef = useRef();
|
|
|
|
const quillRef = useRef();
|
|
|
|
const [dept, setDept] = useState(inDept);
|
|
|
|
const [dept, setDept] = useState(inDept || '주정차위반');
|
|
|
|
const [subject, setSubject] = useState(inTitle);
|
|
|
|
const [subject, setSubject] = useState(inTitle || '');
|
|
|
|
const [contents, setContents] = useState(inContents);
|
|
|
|
const [contents, setContents] = useState(inContents || '');
|
|
|
|
const [filesInfo, setFilesInfo] = useState();
|
|
|
|
const [filesInfo, setFilesInfo] = useState();
|
|
|
|
const [selectedFile, setSelectedFile] = useState(inFilename); // 파일
|
|
|
|
const [selectedFile, setSelectedFile] = useState(inFilename || ''); // 파일
|
|
|
|
const [fileData, setFileData] = useState();
|
|
|
|
// const [fileData, setFileData] = useState();
|
|
|
|
|
|
|
|
|
|
|
|
const onList = () => {
|
|
|
|
const onList = () => {
|
|
|
|
setOpen(false);
|
|
|
|
setOpen(false);
|
|
|
@ -131,26 +131,17 @@ const PublicBoardForm = (props) => {
|
|
|
|
<TextField required label="제목" value={subject} onChange={(e) => setSubject(e.target.value)} fullWidth />
|
|
|
|
<TextField required label="제목" value={subject} onChange={(e) => setSubject(e.target.value)} fullWidth />
|
|
|
|
</Grid>
|
|
|
|
</Grid>
|
|
|
|
<Grid item xs={12} sm={6}>
|
|
|
|
<Grid item xs={12} sm={6}>
|
|
|
|
<Select
|
|
|
|
{/* <FormControl variant="filled" sx={{ m:1, minWidth: 120 }}> */}
|
|
|
|
disabled={!create}
|
|
|
|
{/* <InputLabel id="demo-simple-select-filled-label">Age</InputLabel> */}
|
|
|
|
label="업무구분"
|
|
|
|
<Select disabled={!create} label="업무구분" required value={dept} onChange={(e) => setDept(e.target.value)} fullWidth>
|
|
|
|
required
|
|
|
|
{/* <MenuItem value=""> */}
|
|
|
|
id="inDept"
|
|
|
|
{/* <em>None</em> */}
|
|
|
|
name="inDept"
|
|
|
|
{/* </MenuItem> */}
|
|
|
|
defaultValue={dept || '주정차위반'}
|
|
|
|
<MenuItem value="주정차위반">주정차위반</MenuItem>
|
|
|
|
onChange={(e) => setDept(e.target.value)}
|
|
|
|
<MenuItem value="장애인위반">장애인위반</MenuItem>
|
|
|
|
fullWidth
|
|
|
|
<MenuItem value="기타">기타</MenuItem>
|
|
|
|
>
|
|
|
|
|
|
|
|
<MenuItem key="1" value="주정차위반">
|
|
|
|
|
|
|
|
주정차위반
|
|
|
|
|
|
|
|
</MenuItem>
|
|
|
|
|
|
|
|
<MenuItem key="2" value="장애인위반">
|
|
|
|
|
|
|
|
장애인위반
|
|
|
|
|
|
|
|
</MenuItem>
|
|
|
|
|
|
|
|
<MenuItem key="3" value="기타">
|
|
|
|
|
|
|
|
기타
|
|
|
|
|
|
|
|
</MenuItem>
|
|
|
|
|
|
|
|
</Select>
|
|
|
|
</Select>
|
|
|
|
|
|
|
|
{/* </FormControl> */}
|
|
|
|
</Grid>
|
|
|
|
</Grid>
|
|
|
|
<Grid item xs={12} sm={6}>
|
|
|
|
<Grid item xs={12} sm={6}>
|
|
|
|
<TextField disabled label="등록일" value={inNalja} fullWidth />
|
|
|
|
<TextField disabled label="등록일" value={inNalja} fullWidth />
|
|
|
@ -168,7 +159,7 @@ const PublicBoardForm = (props) => {
|
|
|
|
<Grid>
|
|
|
|
<Grid>
|
|
|
|
<TextField
|
|
|
|
<TextField
|
|
|
|
// label="첨부파일"
|
|
|
|
// label="첨부파일"
|
|
|
|
value={selectedFile || ''}
|
|
|
|
value={selectedFile}
|
|
|
|
// inputProps={{ display: 'none' }}
|
|
|
|
// inputProps={{ display: 'none' }}
|
|
|
|
fullWidth
|
|
|
|
fullWidth
|
|
|
|
// InputProps={{
|
|
|
|
// InputProps={{
|
|
|
|