diff --git a/client/src/components/DataFiles/DataFilesProjectMembers/DataFilesProjectMembers.jsx b/client/src/components/DataFiles/DataFilesProjectMembers/DataFilesProjectMembers.jsx index 7433e0fa3..b8bad0f9e 100644 --- a/client/src/components/DataFiles/DataFilesProjectMembers/DataFilesProjectMembers.jsx +++ b/client/src/components/DataFiles/DataFilesProjectMembers/DataFilesProjectMembers.jsx @@ -286,6 +286,7 @@ const DataFilesProjectMembers = ({ }; DataFilesProjectMembers.propTypes = { + projectId: PropTypes.string, members: PropTypes.arrayOf( PropTypes.shape({ username: PropTypes.string, diff --git a/client/src/components/DataFiles/DataFilesSidebar/DataFilesSidebar.jsx b/client/src/components/DataFiles/DataFilesSidebar/DataFilesSidebar.jsx index aba95d175..6ac81f652 100644 --- a/client/src/components/DataFiles/DataFilesSidebar/DataFilesSidebar.jsx +++ b/client/src/components/DataFiles/DataFilesSidebar/DataFilesSidebar.jsx @@ -27,7 +27,7 @@ const DataFilesAddButton = ({ readOnly }) => { payload: { operation: 'upload', props: {} }, }); }; - const err = useSelector((state) => state.files.error.FilesListing); + const hasError = useSelector((state) => state.files.error.FilesListing); const { api, scheme } = useSelector( (state) => state.files.params.FilesListing ); @@ -60,7 +60,7 @@ const DataFilesAddButton = ({ readOnly }) => { const disabled = readOnly || - err !== false || + hasError !== false || api !== 'tapis' || (scheme !== 'private' && scheme !== 'projects'); diff --git a/client/src/components/DataFiles/DataFilesStatus/DataFilesStatus.jsx b/client/src/components/DataFiles/DataFilesStatus/DataFilesStatus.jsx index f7756c7bf..5a747c3e0 100644 --- a/client/src/components/DataFiles/DataFilesStatus/DataFilesStatus.jsx +++ b/client/src/components/DataFiles/DataFilesStatus/DataFilesStatus.jsx @@ -38,17 +38,18 @@ const OPERATION_MAP = { case 'upload': case 'move': case 'copy': { - const destPath = response.path.split('/').slice(0, -1).join('/'); - const projectName = findProjectTitle(projectList, response.systemId); + const { path, systemId, source } = response; + const destPath = path.split('/').slice(0, -1).join('/'); + const projectName = findProjectTitle(projectList, systemId); let op = mappedOp; if (mappedOp === 'copied') { const srcSystem = - response.source.split('/')[0] === 'https:' - ? response.source.split('/')[7] - : response.source.split('/')[2]; - const destSystem = response.systemId; + source.split('/')[0] === 'https:' + ? source.split('/')[7] + : source.split('/')[2]; + const destSystem = systemId; if (srcSystem !== destSystem) { op = 'started copying'; } @@ -62,7 +63,7 @@ const OPERATION_MAP = { } else { dest = destPath === '/' || destPath === '' - ? `${findSystemDisplayName(systemList, response.systemId)}/` + ? `${findSystemDisplayName(systemList, systemId)}/` : destPath; } diff --git a/client/src/components/DataFiles/DataFilesSystemSelector/DataFilesSystemSelector.jsx b/client/src/components/DataFiles/DataFilesSystemSelector/DataFilesSystemSelector.jsx index 4c1fc721a..55a477207 100644 --- a/client/src/components/DataFiles/DataFilesSystemSelector/DataFilesSystemSelector.jsx +++ b/client/src/components/DataFiles/DataFilesSystemSelector/DataFilesSystemSelector.jsx @@ -5,7 +5,7 @@ import { DropdownSelector } from '_common'; import styles from './DataFilesSystemSelector.module.scss'; const DataFilesSystemSelector = ({ - systemId, + systemAndHomeDirId, section, disabled, operation, @@ -17,11 +17,12 @@ const DataFilesSystemSelector = ({ (state) => state.systems.storage.configuration ); const modalProps = useSelector((state) => state.files.modalProps[operation]); - const findSystem = (id) => + const findSystem = (systemAndHomeDirPath) => systemList.find( - (system) => `${system.system}${system.homeDir || ''}` === id + (system) => + `${system.system}${system.homeDir || ''}` === systemAndHomeDirPath ); - const [selectedSystem, setSelectedSystem] = useState(systemId); + const [selectedSystem, setSelectedSystem] = useState(systemAndHomeDirId); const openSystem = useCallback( (event) => { @@ -69,7 +70,7 @@ const DataFilesSystemSelector = ({ }; useEffect(() => { - setSelectedSystem(systemId); + setSelectedSystem(systemAndHomeDirId); }, []); const dropdownSystems = systemList.filter( @@ -111,7 +112,7 @@ const DataFilesSystemSelector = ({ }; DataFilesSystemSelector.propTypes = { - systemId: PropTypes.string, + systemAndHomeDirId: PropTypes.string, section: PropTypes.string.isRequired, disabled: PropTypes.bool, operation: PropTypes.string.isRequired, @@ -120,7 +121,7 @@ DataFilesSystemSelector.propTypes = { }; DataFilesSystemSelector.defaultProps = { - systemId: '', + systemAndHomeDirId: '', disabled: false, showProjects: false, excludedSystems: [],