Feature #13666
Arvados-DCO-1.1-Signed-off-by: Daniel Kos <daniel.kos@contractors.roche.com>
return localStorage.getItem(API_TOKEN_KEY) || undefined;
}
return localStorage.getItem(API_TOKEN_KEY) || undefined;
}
+ public getUuid() {
+ return localStorage.getItem(USER_UUID_KEY) || undefined;
+ }
+
public getOwnerUuid() {
return localStorage.getItem(USER_OWNER_UUID_KEY) || undefined;
}
public getOwnerUuid() {
return localStorage.getItem(USER_OWNER_UUID_KEY) || undefined;
}
CREATE_COLLECTION: collection => [...state, collection],
REMOVE_COLLECTION: () => state,
COLLECTIONS_REQUEST: () => {
CREATE_COLLECTION: collection => [...state, collection],
REMOVE_COLLECTION: () => state,
COLLECTIONS_REQUEST: () => {
},
COLLECTIONS_SUCCESS: ({ collections }) => {
return collections;
},
COLLECTIONS_SUCCESS: ({ collections }) => {
return collections;
dispatch(push(getResourceUrl({...resource, kind: itemKind})));
};
dispatch(push(getResourceUrl({...resource, kind: itemKind})));
};
- const treeItem = findTreeItem(projects, itemId);
+ let treeItem = findTreeItem(projects, itemId);
+ if (treeItem && itemKind === ResourceKind.LEVEL_UP) {
+ treeItem = findTreeItem(projects, treeItem.data.ownerUuid);
+ }
if (treeItem) {
if (treeItem.status === TreeItemStatus.Loaded) {
openProjectItem(treeItem.data);
} else {
dispatch<any>(getProjectList(itemId))
if (treeItem) {
if (treeItem.status === TreeItemStatus.Loaded) {
openProjectItem(treeItem.data);
} else {
dispatch<any>(getProjectList(itemId))
- .then(() => openProjectItem(treeItem.data));
+ .then(() => openProjectItem(treeItem!.data));
}
if (itemMode === ItemMode.ACTIVE || itemMode === ItemMode.BOTH) {
dispatch<any>(getCollectionList(itemId));
}
if (itemMode === ItemMode.ACTIVE || itemMode === ItemMode.BOTH) {
dispatch<any>(getCollectionList(itemId));
item.open = !item.open;
}
return {
item.open = !item.open;
}
return {
+ items,
+ currentItemId: itemId
};
},
TOGGLE_PROJECT_TREE_ITEM_ACTIVE: itemId => {
};
},
TOGGLE_PROJECT_TREE_ITEM_ACTIVE: itemId => {
const items = _.cloneDeep(state.items);
resetTreeActivity(items);
return {
const items = _.cloneDeep(state.items);
resetTreeActivity(items);
return {
+ items,
+ currentItemId: ""
};
},
default: () => state
};
},
default: () => state
mainAppBarActions: MainAppBarActionProps = {
onBreadcrumbClick: ({ itemId }: NavBreadcrumb) => {
mainAppBarActions: MainAppBarActionProps = {
onBreadcrumbClick: ({ itemId }: NavBreadcrumb) => {
- // this.toggleProjectTreeItem(itemId, status);
+ this.props.dispatch<any>(
+ setProjectItem(this.props.projects, itemId, ResourceKind.PROJECT, ItemMode.BOTH)
+ );
},
onSearch: searchText => {
this.setState({ searchText });
},
onSearch: searchText => {
this.setState({ searchText });