feat: 공지사항등록 / 삭제 반영
parent
852ef7b64f
commit
e4d4be276f
@ -1,16 +0,0 @@
|
||||
import { IUser } from 'types/auth';
|
||||
import reqApi from './ApiService';
|
||||
import { LOGIN_URL } from 'commons/ApiUrl';
|
||||
import { IApiResponse } from 'types/api';
|
||||
|
||||
class AuthService {
|
||||
login = (user) => reqApi.post(LOGIN_URL, user);
|
||||
|
||||
// getCurrentUser = async () => {
|
||||
// if (!localStorage.getItem(ACCESS_TOKEN_NAME)) {
|
||||
// return Promise.reject('No access token set.');
|
||||
// }
|
||||
// };
|
||||
}
|
||||
|
||||
export default new AuthService();
|
@ -1,17 +0,0 @@
|
||||
import { GET_CMM_CODE_LIST } from 'commons/ApiUrl';
|
||||
import axios from 'utils/axios';
|
||||
|
||||
class CmmService {
|
||||
// eslint-disable-next-line no-return-await
|
||||
getComboCodeList = async (params) => await axios.get(GET_CMM_CODE_LIST, { params });
|
||||
|
||||
// getComboCodeList(params) {
|
||||
// return reqApi.get(CMM_CODE_LIST_URL, { params });
|
||||
// .then(r => console.log(r))
|
||||
// .catch(e => {
|
||||
// console.log(e)
|
||||
// });
|
||||
// }
|
||||
}
|
||||
|
||||
export default CmmService;
|
@ -0,0 +1,51 @@
|
||||
import * as React from 'react';
|
||||
import { Button, IconButton, InputLabel, Tooltip, makeStyles, Theme } from '@mui/material';
|
||||
import { FileDownload, FileUpload, FileUploadTwoTone } from '@mui/icons-material';
|
||||
import { useState } from 'react';
|
||||
import { useTheme } from '@mui/material/styles';
|
||||
|
||||
// const useStyles = makeStyles((theme) => ({
|
||||
// root: {
|
||||
// '& > *': {
|
||||
// margin: theme.spacing(1)
|
||||
// }
|
||||
// },
|
||||
// input: {
|
||||
// display: 'none'
|
||||
// },
|
||||
// faceImage: {
|
||||
// color: theme.palette.primary.light
|
||||
// }
|
||||
// }));
|
||||
|
||||
const FileUploadForm = ({ onSaveFile }) => {
|
||||
const theme = useTheme();
|
||||
const [selectedFile, setSelectedFile] = useState(null);
|
||||
|
||||
const handleCapture = ({ target }) => {
|
||||
setSelectedFile(target.files[0]);
|
||||
};
|
||||
|
||||
const handleSubmit = () => {
|
||||
onSaveFile(selectedFile);
|
||||
};
|
||||
|
||||
return (
|
||||
<>
|
||||
<input accept="image/jpeg" className={theme.input} id="faceImage" type="file" onChange={handleCapture} />
|
||||
<Tooltip title="Select Image">
|
||||
<InputLabel htmlFor="faceImage">
|
||||
<IconButton className={theme.faceImage} color="primary" aria-label="upload picture" component="span">
|
||||
<FileUploadTwoTone fontSize="small" />
|
||||
</IconButton>
|
||||
</InputLabel>
|
||||
</Tooltip>
|
||||
<InputLabel>{selectedFile ? selectedFile.name : 'Select Image'}</InputLabel>. . .
|
||||
<Button onClick={() => handleSubmit()} color="primary">
|
||||
Save
|
||||
</Button>
|
||||
</>
|
||||
);
|
||||
};
|
||||
|
||||
export default FileUploadForm;
|
Loading…
Reference in New Issue