From: Peter Amstutz Date: Tue, 9 May 2023 21:56:30 +0000 (-0400) Subject: 20487: Correctly dispatch loadProject from openProjectPanel X-Git-Tag: 2.6.2~3^2~3 X-Git-Url: https://git.arvados.org/arvados-workbench2.git/commitdiff_plain/6319203009ed914504e23ff263b090e6250709fa 20487: Correctly dispatch loadProject from openProjectPanel Also fix it to recognize PDH in the files panel. Arvados-DCO-1.1-Signed-off-by: Peter Amstutz --- diff --git a/src/components/collection-panel-files/collection-panel-files.tsx b/src/components/collection-panel-files/collection-panel-files.tsx index b75f3018..4896641b 100644 --- a/src/components/collection-panel-files/collection-panel-files.tsx +++ b/src/components/collection-panel-files/collection-panel-files.tsx @@ -39,7 +39,7 @@ import { setCollectionFiles } from 'store/collection-panel/collection-panel-file import { sortBy } from 'lodash'; import { formatFileSize } from 'common/formatters'; import { getInlineFileUrl, sanitizeToken } from 'views-components/context-menu/actions/helpers'; -import { extractUuidObjectType, ResourceObjectType } from 'models/resource'; +import { extractUuidKind, ResourceKind } from 'models/resource'; export interface CollectionPanelFilesProps { isWritable: boolean; @@ -261,7 +261,7 @@ export const CollectionPanelFiles = withStyles(styles)(connect((state: RootState const rightData = pathData[rightKey]; React.useEffect(() => { - if (props.currentItemUuid && extractUuidObjectType(props.currentItemUuid) == ResourceObjectType.COLLECTION) { + if (props.currentItemUuid && extractUuidKind(props.currentItemUuid) == ResourceKind.COLLECTION) { setPathData({}); setPath([props.currentItemUuid]); } diff --git a/src/store/project-panel/project-panel-action.ts b/src/store/project-panel/project-panel-action.ts index 6b99e300..7ad18b67 100644 --- a/src/store/project-panel/project-panel-action.ts +++ b/src/store/project-panel/project-panel-action.ts @@ -16,7 +16,7 @@ export const projectPanelActions = bindDataExplorerActions(PROJECT_PANEL_ID); export const openProjectPanel = (projectUuid: string) => async (dispatch: Dispatch) => { - await loadProject(projectUuid); + await dispatch(loadProject(projectUuid)); dispatch(propertiesActions.SET_PROPERTY({ key: PROJECT_PANEL_CURRENT_UUID, value: projectUuid })); dispatch(projectPanelActions.RESET_EXPLORER_SEARCH_VALUE()); dispatch(projectPanelActions.REQUEST_ITEMS());