SHARED_WITH_ME = 'Shared with me',
PUBLIC_FAVORITES = 'Public Favorites',
WORKFLOWS = 'Workflows',
- FAVORITES = 'Favorites',
- TRASH = 'Trash'
+ FAVORITES = 'My Favorites',
+ TRASH = 'Trash',
+ ALL_PROCESSES = 'All Processes'
}
export const SIDE_PANEL_TREE = 'sidePanelTree';
const SIDE_PANEL_CATEGORIES = [
SidePanelTreeCategory.PUBLIC_FAVORITES,
- SidePanelTreeCategory.WORKFLOWS,
SidePanelTreeCategory.FAVORITES,
+ SidePanelTreeCategory.WORKFLOWS,
+ SidePanelTreeCategory.ALL_PROCESSES,
SidePanelTreeCategory.TRASH,
];
export const initSidePanelTree = () =>
(dispatch: Dispatch, getState: () => RootState, { authService }: ServiceRepository) => {
const rootProjectUuid = getUserUuid(getState());
- if (!rootProjectUuid) {
- return;
- }
+ if (!rootProjectUuid) { return; }
const nodes = SIDE_PANEL_CATEGORIES.map(id => initTreeNode({ id, value: id }));
const projectsNode = initTreeNode({ id: rootProjectUuid, value: SidePanelTreeCategory.PROJECTS });
const sharedNode = initTreeNode({ id: SidePanelTreeCategory.SHARED_WITH_ME, value: SidePanelTreeCategory.SHARED_WITH_ME });
dispatch(treePickerActions.LOAD_TREE_PICKER_NODE({ id: projectUuid, pickerId: SIDE_PANEL_TREE }));
const params = {
filters: new FilterBuilder()
- .addEqual('ownerUuid', projectUuid)
+ .addEqual('owner_uuid', projectUuid)
.getFilters(),
order: new OrderBuilder<ProjectResource>()
.addAsc('name')
dispatch(resourcesActions.SET_RESOURCES(items));
};
-const loadSharedRoot = async (dispatch: Dispatch, _: () => RootState, services: ServiceRepository) => {
+const loadSharedRoot = async (dispatch: Dispatch, getState: () => RootState, services: ServiceRepository) => {
dispatch(treePickerActions.LOAD_TREE_PICKER_NODE({ id: SidePanelTreeCategory.SHARED_WITH_ME, pickerId: SIDE_PANEL_TREE }));
const params = {
filters: `[${new FilterBuilder()
.addIsA('uuid', ResourceKind.PROJECT)
- .addEqual('groupClass', GroupClass.PROJECT)
+ .addEqual('group_class', GroupClass.PROJECT)
+ .addDistinct('uuid', getState().auth.config.uuidPrefix + '-j7d0g-publicfavorites')
.getFilters()}]`,
order: new OrderBuilder<ProjectResource>()
.addAsc('name', GroupContentsResourcePrefix.PROJECT)
export const activateSidePanelTreeBranch = (id: string) =>
async (dispatch: Dispatch, getState: () => RootState, services: ServiceRepository) => {
const userUuid = getUserUuid(getState());
- if (!userUuid) {
- return;
- }
+ if (!userUuid) { return; }
const ancestors = await services.ancestorsService.ancestors(id, userUuid);
const isShared = ancestors.every(({ uuid }) => uuid !== userUuid);
if (isShared) {