diff --git a/frontend/src/components/FileUploader.js b/frontend/src/components/FileUploader.js index 6239e4bc19..9d8455527e 100644 --- a/frontend/src/components/FileUploader.js +++ b/frontend/src/components/FileUploader.js @@ -78,6 +78,30 @@ Dropzone.propTypes = { id: PropTypes.string.isRequired, }; +export const getStatus = (status) => { + switch (status) { + case 'UPLOADING': + return 'Uploading'; + case 'UPLOADED': + return 'Uploaded'; + case 'UPLOAD_FAILED': + return 'Upload Failed'; + case 'SCANNING_QUEUED': + return 'Scanning'; + case 'QUEUEING_FAILED': + return 'Upload Failed'; + case 'SCANNING': + return 'Scanning'; + case 'APPROVED': + return 'Approved'; + case 'REJECTED': + return 'Rejected'; + default: + break; + } + return 'Upload Failed'; +}; + const FileTable = ({ onFileRemoved, files }) => (
@@ -106,7 +130,7 @@ const FileTable = ({ onFileRemoved, files }) => ( {`${(file.fileSize / 1000).toFixed(1)} KB`}
- {file.status} + {getStatus(file.status)}