1 // Copyright (C) The Arvados Authors. All rights reserved.
3 // SPDX-License-Identifier: AGPL-3.0
5 import { Dispatch } from "redux";
6 import { propertiesActions } from "store/properties/properties-actions";
7 import { loadProject } from "store/workbench/workbench-actions";
8 import { projectPanelRunActions, projectPanelDataActions } from "store/project-panel/project-panel-action-bind";
9 import { PROJECT_PANEL_CURRENT_UUID, IS_PROJECT_PANEL_TRASHED } from "./project-panel";
11 export const openProjectPanel = (projectUuid: string) => async (dispatch: Dispatch) => {
12 await dispatch<any>(loadProject(projectUuid));
13 dispatch(propertiesActions.SET_PROPERTY({ key: PROJECT_PANEL_CURRENT_UUID, value: projectUuid }));
15 dispatch(projectPanelDataActions.RESET_EXPLORER_SEARCH_VALUE());
16 dispatch(projectPanelDataActions.REQUEST_ITEMS());
18 dispatch(projectPanelRunActions.RESET_EXPLORER_SEARCH_VALUE());
19 dispatch(projectPanelRunActions.REQUEST_ITEMS());
22 export const setIsProjectPanelTrashed = (isTrashed: boolean) => propertiesActions.SET_PROPERTY({ key: IS_PROJECT_PANEL_TRASHED, value: isTrashed });