projects
/
arvados-workbench2.git
/ blobdiff
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
add property isAdmin to the user interface
[arvados-workbench2.git]
/
src
/
store
/
project-panel
/
project-panel-action.ts
diff --git
a/src/store/project-panel/project-panel-action.ts
b/src/store/project-panel/project-panel-action.ts
index 49041032c273000d2009eae452290fba987b83a0..21598fad1c6072eb7de02ac7d64215af1f42bfa9 100644
(file)
--- a/
src/store/project-panel/project-panel-action.ts
+++ b/
src/store/project-panel/project-panel-action.ts
@@
-2,21
+2,24
@@
//
// SPDX-License-Identifier: AGPL-3.0
//
// SPDX-License-Identifier: AGPL-3.0
-import { bindDataExplorerActions } from "../data-explorer/data-explorer-action";
-import { propertiesActions } from "~/store/properties/properties-actions";
import { Dispatch } from 'redux';
import { Dispatch } from 'redux';
-import { ServiceRepository } from "~/services/services";
+import { bindDataExplorerActions } from "~/store/data-explorer/data-explorer-action";
+import { propertiesActions } from "~/store/properties/properties-actions";
import { RootState } from '~/store/store';
import { getProperty } from "~/store/properties/properties";
import { RootState } from '~/store/store';
import { getProperty } from "~/store/properties/properties";
+
export const PROJECT_PANEL_ID = "projectPanel";
export const PROJECT_PANEL_CURRENT_UUID = "projectPanelCurrentUuid";
export const PROJECT_PANEL_ID = "projectPanel";
export const PROJECT_PANEL_CURRENT_UUID = "projectPanelCurrentUuid";
+export const IS_PROJECT_PANEL_TRASHED = 'isProjectPanelTrashed';
export const projectPanelActions = bindDataExplorerActions(PROJECT_PANEL_ID);
export const openProjectPanel = (projectUuid: string) =>
export const projectPanelActions = bindDataExplorerActions(PROJECT_PANEL_ID);
export const openProjectPanel = (projectUuid: string) =>
- (dispatch: Dispatch
, getState: () => RootState, services: ServiceRepository
) => {
+ (dispatch: Dispatch) => {
dispatch(propertiesActions.SET_PROPERTY({ key: PROJECT_PANEL_CURRENT_UUID, value: projectUuid }));
dispatch(projectPanelActions.REQUEST_ITEMS());
};
dispatch(propertiesActions.SET_PROPERTY({ key: PROJECT_PANEL_CURRENT_UUID, value: projectUuid }));
dispatch(projectPanelActions.REQUEST_ITEMS());
};
-export const getProjectPanelCurrentUuid = (state: RootState) => getProperty(PROJECT_PANEL_CURRENT_UUID)(state.properties);
+export const getProjectPanelCurrentUuid = (state: RootState) => getProperty
<string>
(PROJECT_PANEL_CURRENT_UUID)(state.properties);
+export const setIsProjectPanelTrashed = (isTrashed: boolean) =>
+ propertiesActions.SET_PROPERTY({ key: IS_PROJECT_PANEL_TRASHED, value: isTrashed });