|
|
|
@ -2,7 +2,7 @@ import { useEffect, useMemo, useRef, useState } from 'react';
|
|
|
|
|
|
|
|
|
|
import { useAlert } from 'react-alert';
|
|
|
|
|
// material-ui
|
|
|
|
|
import { Button, Grid, IconButton, Input, InputAdornment, TextField, Tooltip } from '@mui/material';
|
|
|
|
|
import { Button, Grid, IconButton, Input, InputAdornment, MenuItem, Select, TextField, Tooltip } from '@mui/material';
|
|
|
|
|
|
|
|
|
|
// assets
|
|
|
|
|
|
|
|
|
@ -21,9 +21,10 @@ import FileSaver from 'file-saver';
|
|
|
|
|
import xitCmm from '../../../commons/XitCmm';
|
|
|
|
|
|
|
|
|
|
const PublicBoardForm = (props) => {
|
|
|
|
|
const { inCode, inBgubun, inTitle, inHit, inName, inNalja, inFilename, inContents, setOpen, handleModalSave } = props;
|
|
|
|
|
const { inCode, inDept, inTitle, inHit, inName, inNalja, inFilename, inContents, setOpen, handleModalSave } = props;
|
|
|
|
|
const alert = useAlert();
|
|
|
|
|
const quillRef = useRef();
|
|
|
|
|
const [dept, setDept] = useState('');
|
|
|
|
|
const [contents, setContents] = useState(inContents);
|
|
|
|
|
const [filesInfo, setFilesInfo] = useState(null);
|
|
|
|
|
const [selectedFile, setSelectedFile] = useState(inFilename); // 파일
|
|
|
|
@ -36,7 +37,7 @@ const PublicBoardForm = (props) => {
|
|
|
|
|
const formData = new FormData();
|
|
|
|
|
formData.append('inCode', inCode);
|
|
|
|
|
formData.append('inTitle', inTitle);
|
|
|
|
|
formData.append('inBgubun', inBgubun);
|
|
|
|
|
formData.append('inDept', dept);
|
|
|
|
|
formData.append('inContents', contents);
|
|
|
|
|
formData.append('inFilename', selectedFile);
|
|
|
|
|
|
|
|
|
@ -175,7 +176,26 @@ const PublicBoardForm = (props) => {
|
|
|
|
|
<TextField required label="제목" value={inTitle} fullWidth />
|
|
|
|
|
</Grid>
|
|
|
|
|
<Grid item xs={12} sm={6}>
|
|
|
|
|
<TextField required label="업무구분" value={inBgubun} fullWidth />
|
|
|
|
|
{/* <TextField required label="업무구분" value={inDept} fullWidth /> */}
|
|
|
|
|
<Select
|
|
|
|
|
label="업무구분"
|
|
|
|
|
required
|
|
|
|
|
id="inDept"
|
|
|
|
|
name="inDept"
|
|
|
|
|
defaultValue={dept}
|
|
|
|
|
onChange={(e) => setDept(e.target.value)}
|
|
|
|
|
fullWidth
|
|
|
|
|
>
|
|
|
|
|
<MenuItem key="1" value="주정차위반">
|
|
|
|
|
주정차위반
|
|
|
|
|
</MenuItem>
|
|
|
|
|
<MenuItem key="2" value="장애인위반">
|
|
|
|
|
장애인위반
|
|
|
|
|
</MenuItem>
|
|
|
|
|
<MenuItem key="3" value="기타">
|
|
|
|
|
기타
|
|
|
|
|
</MenuItem>
|
|
|
|
|
</Select>
|
|
|
|
|
</Grid>
|
|
|
|
|
<Grid item xs={12} sm={6}>
|
|
|
|
|
<TextField disabled label="등록일" value={inNalja} fullWidth />
|
|
|
|
|