feat: 공지사항 반영
parent
2156689963
commit
971fb3c180
@ -0,0 +1,84 @@
|
||||
import { useEffect, useState } from 'react';
|
||||
|
||||
// material-ui
|
||||
import { Button, Divider, FormControlLabel, Grid, InputAdornment, Radio, RadioGroup, TextField } from '@mui/material';
|
||||
|
||||
// assets
|
||||
import { IconFile, IconFileCheck, IconFileText } from '@tabler/icons';
|
||||
|
||||
// berry ui
|
||||
import ReactQuill from 'react-quill';
|
||||
import 'react-quill/dist/quill.snow.css';
|
||||
|
||||
// project imports
|
||||
import MuiDataGrid from 'views/form/MuiDataGrid';
|
||||
import InputLabel from 'ui-component/extended/Form/InputLabel';
|
||||
import opstBizService from '../../../apis/OpstBizService';
|
||||
import * as React from 'react';
|
||||
import SaveParkingSimsaForm from '../parking/SaveParkingSimsaForm';
|
||||
import CmmModal from '../../form/Modal/CmmModal';
|
||||
import * as PropTypes from 'prop-types';
|
||||
|
||||
const PublicBoardForm = (props) => {
|
||||
console.log(props);
|
||||
const { inCode, inBgubun, inTitle, inHit, inName, inNalja, inFileName, inContents, setOpen } = props;
|
||||
const [contents, setContents] = useState(inContents);
|
||||
// const [editorState, setEditorState] = useState(() => EditorState.createWithContent(ContentState.createFormText(inContents)));
|
||||
const onList = (e) => {
|
||||
setOpen(false);
|
||||
};
|
||||
const onSave = (e) => {
|
||||
const data = {
|
||||
inCode,
|
||||
inTitle,
|
||||
inBgubun,
|
||||
inContents: contents,
|
||||
inFileName
|
||||
};
|
||||
alert(JSON.stringify(data));
|
||||
};
|
||||
const onDelete = (e) => {};
|
||||
const onEditorStateChange = (editorState) => {};
|
||||
// (editorState) => setEditorState(editorState)
|
||||
|
||||
useEffect(() => {}, []);
|
||||
|
||||
return (
|
||||
<>
|
||||
<Grid container spacing={2}>
|
||||
<Grid item xs={12} sm={4}>
|
||||
<TextField label="제목" value={inTitle} fullWidth />
|
||||
</Grid>
|
||||
<Grid item xs={12} sm={6}>
|
||||
<TextField label="업무구분" value={inBgubun} fullWidth />
|
||||
</Grid>
|
||||
<Grid item xs={12} sm={6}>
|
||||
<TextField label="등록일" value={inNalja} fullWidth />
|
||||
</Grid>
|
||||
<Grid item xs={12} sm={6}>
|
||||
<TextField label="번호" value={inCode} fullWidth />
|
||||
</Grid>
|
||||
<Grid item xs={12} sm={6}>
|
||||
<TextField label="조회수" value={inHit} fullWidth />
|
||||
</Grid>
|
||||
<Grid item xs={12} sm={6}>
|
||||
<TextField label="작성자" value={inName} fullWidth />
|
||||
</Grid>
|
||||
<Grid item xs={12} sm={6}>
|
||||
<TextField label="첨부파일" value={inFileName} fullWidth />
|
||||
</Grid>
|
||||
<Grid item xs={12}>
|
||||
<ReactQuill value={contents} onChange={setContents} />
|
||||
</Grid>
|
||||
</Grid>
|
||||
<Grid item xs={12} sx={{ marginTop: 3, justifyContent: 'right' }}>
|
||||
<Button size="small" onClick={onList}>
|
||||
목록
|
||||
</Button>
|
||||
<Button onClick={onSave}>저장</Button>
|
||||
<Button onClick={onDelete}>삭제</Button>
|
||||
</Grid>
|
||||
</>
|
||||
);
|
||||
};
|
||||
export default PublicBoardForm;
|
Loading…
Reference in New Issue