diff --git a/client/src/components/Submissions/Submissions.jsx b/client/src/components/Submissions/Submissions.jsx index 0a1c8abb4..f74c0bef5 100644 --- a/client/src/components/Submissions/Submissions.jsx +++ b/client/src/components/Submissions/Submissions.jsx @@ -19,8 +19,8 @@ export const SubmissionsUpload = () => { }; const { data: allSystems } = useSystems(); - console.log('Systems are', allSystems); let submissionSystem = allSystems.find((s) => s.type === 'submission'); + submissionSystem = allSystems.find((s) => s.name === 'My Data (Work)'); const uploadPath = ''; const { status, upload } = useUpload(); @@ -31,26 +31,13 @@ export const SubmissionsUpload = () => { const filteredFiles = uploadedFiles.filter( (f) => status[f.id] !== 'SUCCESS' && !rejectedFiles.includes(f) ); - console.log('Trying to upload with'); - console.log('Path', uploadPath); - console.log('FilteredFiles', filteredFiles); - - submissionSystem = allSystems.find((s) => s.name === 'My Data (Work)'); - - if (!submissionSystem || !submissionSystem.system) { - const msg = "System 'submission' does not exist in submission systems"; - throw new Error(msg, submissionSystem); - } - console.log('Submission System', submissionSystem); - if (filteredFiles.length > 0) { - let result = upload({ + filteredFiles.length > 0 && + upload({ system: submissionSystem.system, path: uploadPath, files: filteredFiles, reloadCallback, }); - console.log('RESULT', result); - } }; const dropZoneDisabled = uploadedFiles.length > 0; @@ -138,15 +125,10 @@ export const SubmissionsUpload = () => { const Submissions = () => { const getSubmitterRole = async () => { - // let response = await fetchUtil({ - // url: '/submissions/check-submitter-role/', - // }); - // Override for now with fake data - const fakeResponse = { - is_submitter: true, - isLoading: false, - }; - return fakeResponse; + let response = await fetchUtil({ + url: '/submissions/check-submitter-role/', + }); + return response; }; const useSubmitterRole = () => { @@ -159,7 +141,6 @@ const Submissions = () => { const { data, isLoading } = useSubmitterRole(); - console.log('The data is ', data); const is_submitter = data?.is_submitter; const Unauthorized = () => ( diff --git a/client/src/components/Workbench/Workbench.jsx b/client/src/components/Workbench/Workbench.jsx index 9e8151979..daedc35e7 100644 --- a/client/src/components/Workbench/Workbench.jsx +++ b/client/src/components/Workbench/Workbench.jsx @@ -75,8 +75,6 @@ function Workbench() { dispatch({ type: 'PROJECTS_GET_LISTING' }); } }, [setupComplete]); - console.log('Submissions', showSubmissions); - console.log('Current path:', path, ROUTES.SUBMISSIONS); return (
diff --git a/client/src/redux/sagas/datafiles.sagas.js b/client/src/redux/sagas/datafiles.sagas.js index f5dda3996..5d983dcec 100644 --- a/client/src/redux/sagas/datafiles.sagas.js +++ b/client/src/redux/sagas/datafiles.sagas.js @@ -536,10 +536,6 @@ export function* uploadFiles(action) { } export function* uploadFile(api, scheme, system, path, file, index) { - console.log('Need to upload at '); - console.log('System', system); - console.log('Path', path); - console.log('File', file); yield put({ type: 'DATA_FILES_SET_OPERATION_STATUS_BY_KEY', payload: { status: 'UPLOADING', key: index, operation: 'upload' }, @@ -551,13 +547,10 @@ export function* uploadFile(api, scheme, system, path, file, index) { payload: { status: 'SUCCESS', key: index, operation: 'upload' }, }); } catch (e) { - console.log('Found an error of', e); yield put({ type: 'DATA_FILES_SET_OPERATION_STATUS_BY_KEY', payload: { status: 'ERROR', key: index, operation: 'upload' }, }); - // Add description of error to the state with some kind of put to a reducer - yield put({ type: 'DATA_FILES_SET_ERROR', payload: { message: e.toString() }, diff --git a/server/portal/settings/settings_default.py b/server/portal/settings/settings_default.py index e5ad93be0..421d62e19 100644 --- a/server/portal/settings/settings_default.py +++ b/server/portal/settings/settings_default.py @@ -227,7 +227,7 @@ "makePublic": True, "hideApps": False, "hideDataFiles": False, - "showSubmissions": True, + "showSubmissions": False, "hideAllocations": False, "hideManageAccount": False, "hideSystemStatus": False,