setting-breadcrumbs
authorPawel Kowalczyk <pawel.kowalczyk@contractors.roche.com>
Fri, 10 May 2019 10:44:35 +0000 (12:44 +0200)
committerPawel Kowalczyk <pawel.kowalczyk@contractors.roche.com>
Fri, 10 May 2019 10:44:35 +0000 (12:44 +0200)
Feature #15020

Arvados-DCO-1.1-Signed-off-by: Pawel Kowalczyk <pawel.kowalczyk@contractors.roche.com>

src/store/collections-content-address-panel/collections-content-address-middleware-service.ts

index fcc75340a006e6acc3c3d8ffdf7dae28356ca242..0e35d93fa68446b8c9eea15c6d365a8184c2017e 100644 (file)
@@ -20,6 +20,7 @@ import { collectionsContentAddressActions } from './collections-content-address-
 import { navigateTo } from '~/store/navigation/navigation-action';
 import { updateFavorites } from '~/store/favorites/favorites-actions';
 import { updatePublicFavorites } from '~/store/public-favorites/public-favorites-actions';
 import { navigateTo } from '~/store/navigation/navigation-action';
 import { updateFavorites } from '~/store/favorites/favorites-actions';
 import { updatePublicFavorites } from '~/store/public-favorites/public-favorites-actions';
+import { setBreadcrumbs } from '../breadcrumbs/breadcrumbs-actions';
 
 export class CollectionsWithSameContentAddressMiddlewareService extends DataExplorerMiddlewareService {
     constructor(private services: ServiceRepository, id: string) {
 
 export class CollectionsWithSameContentAddressMiddlewareService extends DataExplorerMiddlewareService {
     constructor(private services: ServiceRepository, id: string) {
@@ -45,6 +46,7 @@ export class CollectionsWithSameContentAddressMiddlewareService extends DataExpl
             }
             try {
                 api.dispatch(progressIndicatorActions.START_WORKING(this.getId()));
             }
             try {
                 api.dispatch(progressIndicatorActions.START_WORKING(this.getId()));
+                const userUuid = api.getState().auth.user!.uuid;
                 const pathname = api.getState().router.location!.pathname;
                 const contentAddress = pathname.split('/')[2];
                 const response = await this.services.collectionService.list({
                 const pathname = api.getState().router.location!.pathname;
                 const contentAddress = pathname.split('/')[2];
                 const response = await this.services.collectionService.list({
@@ -55,6 +57,7 @@ export class CollectionsWithSameContentAddressMiddlewareService extends DataExpl
                         .addILike("name", dataExplorer.searchValue)
                         .getFilters()
                 });
                         .addILike("name", dataExplorer.searchValue)
                         .getFilters()
                 });
+                api.dispatch<any>(setBreadcrumbs([{ label: 'Projects', uuid: userUuid }]));
                 api.dispatch<any>(updateFavorites(response.items.map(item => item.uuid)));
                 api.dispatch<any>(updatePublicFavorites(response.items.map(item => item.uuid)));
                 if (response.itemsAvailable === 1) {
                 api.dispatch<any>(updateFavorites(response.items.map(item => item.uuid)));
                 api.dispatch<any>(updatePublicFavorites(response.items.map(item => item.uuid)));
                 if (response.itemsAvailable === 1) {