fix: 공지사항 반영

main
Lim Jonguk 3 years ago
parent b7f529ebfe
commit e8225da43f

@ -2,7 +2,7 @@ import { useEffect, useMemo, useRef, useState } from 'react';
import { useAlert } from 'react-alert'; import { useAlert } from 'react-alert';
// material-ui // 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 // assets
@ -21,9 +21,10 @@ import FileSaver from 'file-saver';
import xitCmm from '../../../commons/XitCmm'; import xitCmm from '../../../commons/XitCmm';
const PublicBoardForm = (props) => { 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 alert = useAlert();
const quillRef = useRef(); const quillRef = useRef();
const [dept, setDept] = useState('');
const [contents, setContents] = useState(inContents); const [contents, setContents] = useState(inContents);
const [filesInfo, setFilesInfo] = useState(null); const [filesInfo, setFilesInfo] = useState(null);
const [selectedFile, setSelectedFile] = useState(inFilename); // const [selectedFile, setSelectedFile] = useState(inFilename); //
@ -36,7 +37,7 @@ const PublicBoardForm = (props) => {
const formData = new FormData(); const formData = new FormData();
formData.append('inCode', inCode); formData.append('inCode', inCode);
formData.append('inTitle', inTitle); formData.append('inTitle', inTitle);
formData.append('inBgubun', inBgubun); formData.append('inDept', dept);
formData.append('inContents', contents); formData.append('inContents', contents);
formData.append('inFilename', selectedFile); formData.append('inFilename', selectedFile);
@ -175,7 +176,26 @@ const PublicBoardForm = (props) => {
<TextField required label="제목" value={inTitle} fullWidth /> <TextField required label="제목" value={inTitle} fullWidth />
</Grid> </Grid>
<Grid item xs={12} sm={6}> <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>
<Grid item xs={12} sm={6}> <Grid item xs={12} sm={6}>
<TextField disabled label="등록일" value={inNalja} fullWidth /> <TextField disabled label="등록일" value={inNalja} fullWidth />

Loading…
Cancel
Save