diff --git a/.env b/.env deleted file mode 100755 index c4959fd..0000000 --- a/.env +++ /dev/null @@ -1,4 +0,0 @@ -REACT_APP_VERSION = v0.0.1 -#REACT_APP_API_URL=http://211.119.124.9:8090 -REACT_APP_API_URL=http://localhost:8090 -REACT_APP_SERVER_TIMEOUT=6000 \ No newline at end of file diff --git a/.env.production b/.env.production new file mode 100644 index 0000000..6fa20b9 --- /dev/null +++ b/.env.production @@ -0,0 +1,4 @@ +REACT_APP_MODE=production +REACT_APP_VERSION = v0.0.1 +REACT_APP_API_URL=http://211.119.124.9:8090 +REACT_APP_SERVER_TIMEOUT=6000 \ No newline at end of file diff --git a/package.json b/package.json index 649685b..569239d 100755 --- a/package.json +++ b/package.json @@ -32,6 +32,7 @@ "date-fns": "^2.28.0", "draft-js": "^0.11.7", "emoji-picker-react": "^3.5.1", + "env-cmd": "^10.1.0", "exceljs": "^4.3.0", "file-saver": "^2.0.5", "formik": "^2.2.9", diff --git a/src/views/biz/judge/JudgeDataModifyForm.jsx b/src/views/biz/judge/JudgeDataModifyForm.jsx index 5583656..98502fc 100644 --- a/src/views/biz/judge/JudgeDataModifyForm.jsx +++ b/src/views/biz/judge/JudgeDataModifyForm.jsx @@ -10,9 +10,24 @@ import { IconSearch } from '@tabler/icons'; import FileInputForms from 'views/cmm/file-ctl/FileInputForms'; import DaumPost from '../../cmm/DaumPost'; +import FileReadInputForm from '../../cmm/file-ctl/FileReadInputForm'; // const toDate = new Date(); +function FileReadInputForms(props) { + return null; +} + +FileReadInputForms.propTypes = { + selectedFile: PropTypes.any, + handleChangeFile: PropTypes.func, + fileName: PropTypes.any, + fieldName: PropTypes.string, + index: PropTypes.number, + isDisabled: PropTypes.bool, + labelName: PropTypes.string, + isOrgFileInfo: PropTypes.bool +}; const JudgeDataModifyForm = ({ rowData, contDocs, ingbs, setOpen, handleModalSave }) => { const alert = useAlert(); const [isPostOpen, setIsPostOpen] = useState(false); @@ -259,7 +274,7 @@ const JudgeDataModifyForm = ({ rowData, contDocs, ingbs, setOpen, handleModalSav - }; FileInputForm.propTypes = { - labelName: PropTypes.number.isRequired, + labelName: PropTypes.string.isRequired, selectedFile: PropTypes.string, handleChangeFile: PropTypes.func.isRequired, - alert: PropTypes.func.isRequired + alert: PropTypes.object.isRequired }; export default FileInputForm; diff --git a/src/views/cmm/file-ctl/FileInputForms.jsx b/src/views/cmm/file-ctl/FileInputForms.jsx index 349a82c..9b928e5 100644 --- a/src/views/cmm/file-ctl/FileInputForms.jsx +++ b/src/views/cmm/file-ctl/FileInputForms.jsx @@ -41,7 +41,7 @@ FileInputForms.propTypes = { fileName: PropTypes.string, isDisabled: PropTypes.bool.isRequired, handleChangeFile: PropTypes.func.isRequired, - alert: PropTypes.func.isRequired + alert: PropTypes.object.isRequired }; export default FileInputForms; diff --git a/src/views/cmm/file-ctl/FileReadInputForm.jsx b/src/views/cmm/file-ctl/FileReadInputForm.jsx new file mode 100644 index 0000000..1a3d1bd --- /dev/null +++ b/src/views/cmm/file-ctl/FileReadInputForm.jsx @@ -0,0 +1,45 @@ +import { Button, Grid, TextField, Typography } from '@mui/material'; +import { FileUpload } from '@mui/icons-material'; +import PropTypes from 'prop-types'; + +const FileReadInputForm = ({ labelName, selectedFile, handleChangeFile, alert }) => { + const onChangeFile = (e) => { + const file = e.target.files[0]; + if (file.type.includes('image')) { + alert.show({`${file.name}`}); + } + handleChangeFile(file); + }; + + return ( + + + } + onClick={() => {}} + /> + + + + + + {selectedFile} + + + ); +}; + +FileReadInputForm.propTypes = { + labelName: PropTypes.number.isRequired, + selectedFile: PropTypes.string, + handleChangeFile: PropTypes.func.isRequired, + alert: PropTypes.object.isRequired +}; + +export default FileReadInputForm;