From 1e66cf10da1c9bb43bb811c1be600a6ef8c18c8e Mon Sep 17 00:00:00 2001 From: Giuseppe Digilio Date: Mon, 14 Oct 2024 23:31:32 +0200 Subject: [PATCH 1/7] [DSC-1974] Fix search manager to better fetch data and follow authority for objects which are not item --- src/app/core/browse/search-manager.ts | 27 +++++++++++++--------- src/app/core/browse/search.manager.spec.ts | 16 +++++++++---- src/app/shared/search/search.component.ts | 6 ++++- src/config/default-app-config.ts | 4 ++++ 4 files changed, 36 insertions(+), 17 deletions(-) diff --git a/src/app/core/browse/search-manager.ts b/src/app/core/browse/search-manager.ts index 2d377e0d9d6..4e911652139 100644 --- a/src/app/core/browse/search-manager.ts +++ b/src/app/core/browse/search-manager.ts @@ -14,13 +14,14 @@ import { DSpaceObject } from '../shared/dspace-object.model'; import { PaginatedSearchOptions } from '../../shared/search/models/paginated-search-options.model'; import { SearchObjects } from '../../shared/search/models/search-objects.model'; import { SearchService } from '../shared/search/search.service'; -import { WorkspaceItem } from '../submission/models/workspaceitem.model'; -import { WorkflowItem } from '../submission/models/workflowitem.model'; -import { hasValue } from '../../shared/empty.util'; +import { hasValue, isNotEmpty } from '../../shared/empty.util'; import { FollowAuthorityMetadata } from '../../../config/search-follow-metadata.interface'; import { MetadataValue } from '../shared/metadata.models'; import { Metadata } from '../shared/metadata.utils'; import isArray from 'lodash/isArray'; +import { WORKSPACEITEM } from '../eperson/models/workspaceitem.resource-type'; +import { WORKFLOWITEM } from '../eperson/models/workflowitem.resource-type'; +import { ITEM } from '../shared/item.resource-type'; /** * The service aims to manage browse requests and subsequent extra fetch requests. @@ -84,7 +85,8 @@ export class SearchManager { protected completeSearchObjectsWithExtraData() { return switchMap((searchObjectsRD: RemoteData>) => { if (searchObjectsRD.isSuccess) { - const items: Item[] = searchObjectsRD.payload.page.map((searchResult) => searchResult.indexableObject) as any; + const items: Item[] = searchObjectsRD.payload.page + .map((searchResult) => isNotEmpty(searchResult?._embedded?.indexableObject) ? searchResult._embedded.indexableObject : searchResult.indexableObject) as any; return this.fetchExtraData(items).pipe(map(() => { return searchObjectsRD; })); @@ -96,13 +98,16 @@ export class SearchManager { protected fetchExtraData(objects: T[]): Observable { const items: Item[] = objects - .map((object) => { - if (object instanceof WorkspaceItem || object instanceof WorkflowItem) { - return object.item as Item; - } - if (object instanceof Item) { + .map((object: any) => { + if (object.type === ITEM.value) { return object as Item; + } else if (object.type === WORKSPACEITEM.value || object.type === WORKFLOWITEM.value) { + return object?._embedded?.item as Item; + } else { + // Handle workflow task here, where the item is embedded in a workflowitem + return object?._embedded?.workflowitem?._embedded?.item as Item; } + }) .filter((item) => hasValue(item)); @@ -127,12 +132,12 @@ export class SearchManager { if (item.entityType === followMetadata.type) { if (isArray(followMetadata.metadata)) { followMetadata.metadata.forEach((metadata) => { - item.allMetadata(metadata) + Metadata.all(item.metadata, metadata) .filter((metadataValue: MetadataValue) => Metadata.hasValidItemAuthority(metadataValue.authority)) .forEach((metadataValue: MetadataValue) => uuidMap[metadataValue.authority] = metadataValue); }); } else { - item.allMetadata(followMetadata.metadata) + Metadata.all(item.metadata, followMetadata.metadata) .filter((metadataValue: MetadataValue) => Metadata.hasValidItemAuthority(metadataValue.authority)) .forEach((metadataValue: MetadataValue) => uuidMap[metadataValue.authority] = metadataValue); } diff --git a/src/app/core/browse/search.manager.spec.ts b/src/app/core/browse/search.manager.spec.ts index d03a1ff5edf..96e2eed790e 100644 --- a/src/app/core/browse/search.manager.spec.ts +++ b/src/app/core/browse/search.manager.spec.ts @@ -12,6 +12,7 @@ import { of } from 'rxjs'; import { MetadataValue } from '../shared/metadata.models'; import { v4 as uuidv4 } from 'uuid'; import { AUTHORITY_REFERENCE } from '../shared/metadata.utils'; +import { ITEM } from '../shared/item.resource-type'; describe('SearchManager', () => { let scheduler: TestScheduler; @@ -31,7 +32,8 @@ describe('SearchManager', () => { }) ] - } + }, + type: ITEM.value }); const secondPublication = Object.assign(new Item(), { @@ -44,7 +46,8 @@ describe('SearchManager', () => { value: 'author2' }) ] - } + }, + type: ITEM.value }); const firstProject = Object.assign(new Item(), { @@ -57,7 +60,8 @@ describe('SearchManager', () => { value: 'author3' }) ] - } + }, + type: ITEM.value }); const thirdPublication = Object.assign(new Item(), { @@ -70,7 +74,8 @@ describe('SearchManager', () => { }) ] - } + }, + type: ITEM.value }); const invalidAuthorityPublication = Object.assign(new Item(), { @@ -84,7 +89,8 @@ describe('SearchManager', () => { }) ] - } + }, + type: ITEM.value }); const mockBrowseService: any = { diff --git a/src/app/shared/search/search.component.ts b/src/app/shared/search/search.component.ts index ef74c2b3c4e..ee292bf35e7 100644 --- a/src/app/shared/search/search.component.ts +++ b/src/app/shared/search/search.component.ts @@ -104,7 +104,11 @@ export class SearchComponent implements OnInit, OnDestroy { /** * Embedded keys to force during the search */ - @Input() forcedEmbeddedKeys: Map = new Map([['default', ['metrics']]]); + @Input() forcedEmbeddedKeys: Map = new Map([ + ['default', ['metrics']], + ['workspace', ['item','metrics']], + ['workflow', ['workflowitem', 'item','metrics']] + ]); /** * If this is true, the request will only be sent if there's diff --git a/src/config/default-app-config.ts b/src/config/default-app-config.ts index ab5e0f48434..fdc18fb2a8c 100644 --- a/src/config/default-app-config.ts +++ b/src/config/default-app-config.ts @@ -396,6 +396,10 @@ export class DefaultAppConfig implements AppConfig { { type: 'Product', metadata: ['dc.contributor.author'] + }, + { + type: 'Patent', + metadata: ['dc.contributor.author'] } ]; From 4f93515c56b7078cc33569b50a0399a2121fc4c4 Mon Sep 17 00:00:00 2001 From: Giuseppe Digilio Date: Mon, 14 Oct 2024 23:33:13 +0200 Subject: [PATCH 2/7] [DSC-1974] Use page size of 10 in order to reduce the number of request --- src/app/core/data/entity-type-data.service.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/app/core/data/entity-type-data.service.ts b/src/app/core/data/entity-type-data.service.ts index 4020ff638dd..20aeeffe52c 100644 --- a/src/app/core/data/entity-type-data.service.ts +++ b/src/app/core/data/entity-type-data.service.ts @@ -83,7 +83,7 @@ export class EntityTypeDataService extends BaseDataService implements */ hasMoreThanOneAuthorized(): Observable { const findListOptions: FindListOptions = { - elementsPerPage: 2, + elementsPerPage: 10, currentPage: 1 }; return this.getAllAuthorizedRelationshipType(findListOptions).pipe( @@ -117,7 +117,7 @@ export class EntityTypeDataService extends BaseDataService implements */ hasMoreThanOneAuthorizedImport(): Observable { const findListOptions: FindListOptions = { - elementsPerPage: 2, + elementsPerPage: 10, currentPage: 1 }; return this.getAllAuthorizedRelationshipTypeImport(findListOptions).pipe( From 297815f2fa044ac804a1d845dc6d7a1c1cd43b2e Mon Sep 17 00:00:00 2001 From: Giuseppe Digilio Date: Tue, 15 Oct 2024 16:12:50 +0200 Subject: [PATCH 3/7] [DSC-1974] Remove unused follow links --- .../claimed-search-result-list-element.component.ts | 2 +- .../pool-search-result-list-element.component.ts | 2 +- .../workflow-item-search-result-list-element.component.html | 1 + .../workspace-item-search-result-list-element.component.html | 2 +- 4 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/app/shared/object-list/my-dspace-result-list-element/claimed-search-result/claimed-search-result-list-element.component.ts b/src/app/shared/object-list/my-dspace-result-list-element/claimed-search-result/claimed-search-result-list-element.component.ts index 541f5aad430..2baadf9ee37 100644 --- a/src/app/shared/object-list/my-dspace-result-list-element/claimed-search-result/claimed-search-result-list-element.component.ts +++ b/src/app/shared/object-list/my-dspace-result-list-element/claimed-search-result/claimed-search-result-list-element.component.ts @@ -71,7 +71,7 @@ export class ClaimedSearchResultListElementComponent extends SearchResultListEle ngOnInit() { super.ngOnInit(); this.linkService.resolveLinks(this.dso, followLink('workflowitem', {}, - followLink('item', {}, followLink('bundles')), + followLink('item'), followLink('submitter') ), followLink('action')); diff --git a/src/app/shared/object-list/my-dspace-result-list-element/pool-search-result/pool-search-result-list-element.component.ts b/src/app/shared/object-list/my-dspace-result-list-element/pool-search-result/pool-search-result-list-element.component.ts index 1fe45818181..2691dcf8475 100644 --- a/src/app/shared/object-list/my-dspace-result-list-element/pool-search-result/pool-search-result-list-element.component.ts +++ b/src/app/shared/object-list/my-dspace-result-list-element/pool-search-result/pool-search-result-list-element.component.ts @@ -81,7 +81,7 @@ export class PoolSearchResultListElementComponent extends SearchResultListElemen ngOnInit() { super.ngOnInit(); this.linkService.resolveLinks(this.dso, followLink('workflowitem', {}, - followLink('item', {}, followLink('bundles')), + followLink('item'), followLink('submitter') ), followLink('action')); diff --git a/src/app/shared/object-list/my-dspace-result-list-element/workflow-item-search-result/workflow-item-search-result-list-element.component.html b/src/app/shared/object-list/my-dspace-result-list-element/workflow-item-search-result/workflow-item-search-result-list-element.component.html index 0d8c44b4ea2..adb51a5bd1f 100644 --- a/src/app/shared/object-list/my-dspace-result-list-element/workflow-item-search-result/workflow-item-search-result-list-element.component.html +++ b/src/app/shared/object-list/my-dspace-result-list-element/workflow-item-search-result/workflow-item-search-result-list-element.component.html @@ -3,6 +3,7 @@ [viewMode]="ViewModes.ListElement" [object]="derivedSearchResult$ | async" [linkType]="LinkTypes.None" [context]="badgeContext" + [showMetrics]="false" [showThumbnails]="showThumbnails">
diff --git a/src/app/shared/object-list/my-dspace-result-list-element/workspace-item-search-result/workspace-item-search-result-list-element.component.html b/src/app/shared/object-list/my-dspace-result-list-element/workspace-item-search-result/workspace-item-search-result-list-element.component.html index c7937d67717..eecb93901d0 100644 --- a/src/app/shared/object-list/my-dspace-result-list-element/workspace-item-search-result/workspace-item-search-result-list-element.component.html +++ b/src/app/shared/object-list/my-dspace-result-list-element/workspace-item-search-result/workspace-item-search-result-list-element.component.html @@ -4,7 +4,7 @@ [object]="derivedSearchResult$ | async" [linkType]="LinkTypes.None" [context]="badgeContext" [showLabel]="showLabel" - [showMetrics]="showMetrics" + [showMetrics]="false" [showThumbnails]="showThumbnails">
From fa2d395e3f641c52035e70951a4f0c88e2b89c28 Mon Sep 17 00:00:00 2001 From: Giuseppe Digilio Date: Tue, 15 Oct 2024 17:05:36 +0200 Subject: [PATCH 4/7] [DSC-1974] Use preventMetadataSecurity projection as default --- src/app/shared/search/search.component.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app/shared/search/search.component.ts b/src/app/shared/search/search.component.ts index ee292bf35e7..0b1d7f5ba33 100644 --- a/src/app/shared/search/search.component.ts +++ b/src/app/shared/search/search.component.ts @@ -144,7 +144,7 @@ export class SearchComponent implements OnInit, OnDestroy { /** * Optional projection to use during the search */ - @Input() projection; + @Input() projection = 'preventMetadataSecurity'; /** * Whether or not the search bar should be visible From 71f05292ef4b255d87170d13a109d834e0a0f947 Mon Sep 17 00:00:00 2001 From: Giuseppe Digilio Date: Tue, 15 Oct 2024 17:06:23 +0200 Subject: [PATCH 5/7] [DSC-1974] Refactoring of browse most component in order to use preventMetadataSecurity projection as default --- .../abstract-browse-elements.component.ts | 52 +++++++++++++++---- .../browse-most-elements.component.html | 4 +- .../browse-most-elements.component.ts | 41 +++++++++++---- .../default-browse-elements.component.ts | 21 +++----- ...hemed-default-browse-elements.component.ts | 4 +- .../themed-browse-most-elements.component.ts | 14 +++-- .../top-section/top-section.component.html | 6 ++- 7 files changed, 104 insertions(+), 38 deletions(-) diff --git a/src/app/shared/browse-most-elements/abstract-browse-elements.component.ts b/src/app/shared/browse-most-elements/abstract-browse-elements.component.ts index 63a839234ad..1e8a67800ce 100644 --- a/src/app/shared/browse-most-elements/abstract-browse-elements.component.ts +++ b/src/app/shared/browse-most-elements/abstract-browse-elements.component.ts @@ -1,6 +1,5 @@ import { followLink } from '../utils/follow-link-config.model'; import { CollectionElementLinkType } from '../object-collection/collection-element-link.type'; -import { TopSection } from '../../core/layout/models/section.model'; import { Component, Input, OnChanges, OnInit, PLATFORM_ID, inject } from '@angular/core'; import { isPlatformServer } from '@angular/common'; @@ -31,17 +30,42 @@ export abstract class AbstractBrowseElementsComponent implements OnInit, OnChang protected readonly platformId = inject(PLATFORM_ID); protected readonly searchService = inject(SearchService); - protected followThumbnailLink: boolean; // to be overridden + protected abstract followMetricsLink: boolean; // to be overridden + protected abstract followThumbnailLink: boolean; // to be overridden + /** + * The context of listable object + */ + @Input() context: Context; + + /** + * The pagination options + */ @Input() paginatedSearchOptions: PaginatedSearchOptions; - @Input() context: Context; + /** + * Optional projection to use during the search + */ + @Input() projection = 'preventMetadataSecurity'; + + /** + * Whether to show the badge label or not + */ + @Input() showLabel: boolean; - @Input() topSection: TopSection; + /** + * Whether to show the metrics badges + */ + @Input() showMetrics = this.appConfig.browseBy.showMetrics; + + /** + * Whether to show the thumbnail preview + */ + @Input() showThumbnails = this.appConfig.browseBy.showThumbnails; public collectionElementLinkTypeEnum = CollectionElementLinkType; - paginatedSearchOptionsBS: BehaviorSubject; + paginatedSearchOptions$: BehaviorSubject; searchResults$: Observable>>>; @@ -51,13 +75,23 @@ export abstract class AbstractBrowseElementsComponent implements OnInit, OnChang if (isPlatformServer(this.platformId)) { return; } - this.paginatedSearchOptionsBS?.next(this.paginatedSearchOptions); + this.paginatedSearchOptions$?.next(this.paginatedSearchOptions); } ngOnInit() { - const followLinks = this.followThumbnailLink ? [followLink('thumbnail'), followLink('metrics')] : [followLink('metrics')]; - this.paginatedSearchOptionsBS = new BehaviorSubject(this.paginatedSearchOptions); - this.searchResults$ = this.paginatedSearchOptionsBS.asObservable().pipe( + const followLinks = []; + if (this.followThumbnailLink) { + followLinks.push(followLink('thumbnail')); + } + if (this.followMetricsLink) { + followLinks.push(followLink('metrics')); + } + + this.paginatedSearchOptions = Object.assign(new PaginatedSearchOptions({}), this.paginatedSearchOptions, { + projection: this.projection + }); + this.paginatedSearchOptions$ = new BehaviorSubject(this.paginatedSearchOptions); + this.searchResults$ = this.paginatedSearchOptions$.asObservable().pipe( mergeMap((paginatedSearchOptions) => this.searchService.search(paginatedSearchOptions, null, true, true, ...followLinks), ), diff --git a/src/app/shared/browse-most-elements/browse-most-elements.component.html b/src/app/shared/browse-most-elements/browse-most-elements.component.html index 173d4e2c00d..ff882513074 100644 --- a/src/app/shared/browse-most-elements/browse-most-elements.component.html +++ b/src/app/shared/browse-most-elements/browse-most-elements.component.html @@ -3,10 +3,10 @@ diff --git a/src/app/shared/browse-most-elements/browse-most-elements.component.ts b/src/app/shared/browse-most-elements/browse-most-elements.component.ts index 835347c54ae..198b413072c 100644 --- a/src/app/shared/browse-most-elements/browse-most-elements.component.ts +++ b/src/app/shared/browse-most-elements/browse-most-elements.component.ts @@ -1,4 +1,4 @@ -import { TopSection, TopSectionTemplateType } from './../../core/layout/models/section.model'; +import { TopSection, TopSectionTemplateType } from '../../core/layout/models/section.model'; import { Component, Input, OnChanges, OnInit } from '@angular/core'; import { PaginatedSearchOptions } from '../search/models/paginated-search-options.model'; import { Context } from '../../core/shared/context.model'; @@ -12,19 +12,42 @@ import { BehaviorSubject } from 'rxjs'; export class BrowseMostElementsComponent implements OnInit, OnChanges { + /** + * The pagination options + */ @Input() paginatedSearchOptions: PaginatedSearchOptions; + /** + * The context of listable object + */ @Input() context: Context; - showLabel: boolean; - - showMetrics = true; - + /** + * Optional projection to use during the search + */ + @Input() projection = 'preventMetadataSecurity'; + + /** + * Whether to show the badge label or not + */ + @Input() showLabel: boolean; + + /** + * Whether to show the metrics badges + */ + @Input() showMetrics: boolean; + + /** + * Whether to show the thumbnail preview + */ + @Input() showThumbnails: boolean; + + /* + * The top section object + */ @Input() topSection: TopSection; - paginatedSearchOptionsBS = new BehaviorSubject(null); - - templateTypeEnum = TopSectionTemplateType; + paginatedSearchOptions$ = new BehaviorSubject(null); sectionTemplateType: TopSectionTemplateType; @@ -33,6 +56,6 @@ export class BrowseMostElementsComponent implements OnInit, OnChanges { } ngOnChanges() { // trigger change detection on child components - this.paginatedSearchOptionsBS.next(this.paginatedSearchOptions); + this.paginatedSearchOptions$.next(this.paginatedSearchOptions); } } diff --git a/src/app/shared/browse-most-elements/default-browse-elements/default-browse-elements.component.ts b/src/app/shared/browse-most-elements/default-browse-elements/default-browse-elements.component.ts index ad78eed4fdd..580d74cd734 100644 --- a/src/app/shared/browse-most-elements/default-browse-elements/default-browse-elements.component.ts +++ b/src/app/shared/browse-most-elements/default-browse-elements/default-browse-elements.component.ts @@ -1,4 +1,4 @@ -import { Component, Input, OnChanges, OnInit } from '@angular/core'; +import { Component, OnChanges, OnInit } from '@angular/core'; import { AbstractBrowseElementsComponent } from '../abstract-browse-elements.component'; @Component({ @@ -8,17 +8,12 @@ import { AbstractBrowseElementsComponent } from '../abstract-browse-elements.com }) export class DefaultBrowseElementsComponent extends AbstractBrowseElementsComponent implements OnInit, OnChanges { - /** - * Whether to show the metrics badges - */ - @Input() showMetrics = this.appConfig.browseBy.showMetrics; + protected followMetricsLink: boolean; + protected followThumbnailLink: boolean; - /** - * Whether to show the thumbnail preview - */ - @Input() showThumbnails = this.appConfig.browseBy.showThumbnails; - - @Input() showLabel: boolean; - - protected followThumbnailLink = this.appConfig.browseBy.showThumbnails; + ngOnInit() { + this.followMetricsLink = this.showMetrics ?? this.appConfig.browseBy.showMetrics; + this.followThumbnailLink = this.showThumbnails ?? this.appConfig.browseBy.showThumbnails; + super.ngOnInit(); + } } diff --git a/src/app/shared/browse-most-elements/default-browse-elements/themed-default-browse-elements.component.ts b/src/app/shared/browse-most-elements/default-browse-elements/themed-default-browse-elements.component.ts index 7f98e42ce77..28c3c1fdad5 100644 --- a/src/app/shared/browse-most-elements/default-browse-elements/themed-default-browse-elements.component.ts +++ b/src/app/shared/browse-most-elements/default-browse-elements/themed-default-browse-elements.component.ts @@ -25,13 +25,15 @@ export class ThemedDefaultBrowseElementsComponent extends ThemedComponent{{ 'explore.index.' + topSection.titleKey | translate }}
{{ 'explore.index.' + topSection.sortField | translate }}
- +
From d78b4516a035b59e3450e10d4f1767a29417d10a Mon Sep 17 00:00:00 2001 From: Giuseppe Digilio Date: Wed, 16 Oct 2024 12:15:05 +0200 Subject: [PATCH 6/7] [DSC-1974] Disable cache when retrieving the item with the resolver --- src/app/cris-item-page/cris-item-page.resolver.ts | 10 +++------- src/app/item-page/item.resolver.ts | 3 ++- 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/src/app/cris-item-page/cris-item-page.resolver.ts b/src/app/cris-item-page/cris-item-page.resolver.ts index 91cdccd9ca5..f3d54e028ea 100644 --- a/src/app/cris-item-page/cris-item-page.resolver.ts +++ b/src/app/cris-item-page/cris-item-page.resolver.ts @@ -3,9 +3,9 @@ import { Observable } from 'rxjs'; import { ActivatedRouteSnapshot, Resolve, RouterStateSnapshot } from '@angular/router'; import { RemoteData } from '../core/data/remote-data'; import { ItemDataService } from '../core/data/item-data.service'; -import { followLink } from '../shared/utils/follow-link-config.model'; import { Item } from '../core/shared/item.model'; import { getFirstCompletedRemoteData } from '../core/shared/operators'; +import { ITEM_PAGE_LINKS_TO_FOLLOW } from '../item-page/item.resolver'; /** * This class represents a resolver that requests a specific item before the route is activated @@ -25,13 +25,9 @@ export class CrisItemPageResolver implements Resolve> { * or an error if something went wrong */ resolve(route: ActivatedRouteSnapshot, state: RouterStateSnapshot): Observable> { - // TODO temporary disable cache to have always an update item, check if after update with 7.3, it's only necessary to invalidate a cache on edit item saving return this.itemService.findById(route.params.id, - false, true, - followLink('owningCollection'), - followLink('bundles'), - followLink('relationships'), - followLink('version', {}, followLink('versionhistory')), + true, true, + ...ITEM_PAGE_LINKS_TO_FOLLOW ).pipe( getFirstCompletedRemoteData() ); diff --git a/src/app/item-page/item.resolver.ts b/src/app/item-page/item.resolver.ts index 2f99dcecdd2..bc1a41a4a85 100644 --- a/src/app/item-page/item.resolver.ts +++ b/src/app/item-page/item.resolver.ts @@ -45,9 +45,10 @@ export class ItemResolver implements Resolve> { * or an error if something went wrong */ resolve(route: ActivatedRouteSnapshot, state: RouterStateSnapshot): Observable> { + // Fetch item with cache disabled to have always a fresh item object const itemRD$ = this.itemService.findById(route.params.id, false, - false, + true, ...ITEM_PAGE_LINKS_TO_FOLLOW ).pipe( getFirstCompletedRemoteData(), From 27dc1ca72b7d71e99b7ea6c7915de2e94c9c05be Mon Sep 17 00:00:00 2001 From: Giuseppe Digilio Date: Wed, 16 Oct 2024 12:17:26 +0200 Subject: [PATCH 7/7] [DSC-1974] Remove default DSO edit resolver --- src/app/collection-page/collection-page-routing.module.ts | 2 -- src/app/community-page/community-page-routing.module.ts | 2 -- src/app/item-page/item-page-routing.module.ts | 2 -- 3 files changed, 6 deletions(-) diff --git a/src/app/collection-page/collection-page-routing.module.ts b/src/app/collection-page/collection-page-routing.module.ts index 3d23f18c5ef..59308e8b8f0 100644 --- a/src/app/collection-page/collection-page-routing.module.ts +++ b/src/app/collection-page/collection-page-routing.module.ts @@ -21,7 +21,6 @@ import { CollectionPageAdministratorGuard } from './collection-page-administrato import { LinkMenuItemModel } from '../shared/menu/menu-item/models/link.model'; import { ThemedCollectionPageComponent } from './themed-collection-page.component'; import { MenuItemType } from '../shared/menu/menu-item-type.model'; -import { DSOEditMenuResolver } from '../shared/dso-page/dso-edit-menu.resolver'; import { CommunityBreadcrumbResolver } from '../core/breadcrumbs/community-breadcrumb.resolver'; import { EditCollectionResolver } from '../core/shared/resolvers/edit-collection.resolver'; @@ -56,7 +55,6 @@ import { EditCollectionResolver } from '../core/shared/resolvers/edit-collection resolve: { dso: CollectionPageResolver, breadcrumb: CollectionBreadcrumbResolver, - menu: DSOEditMenuResolver }, runGuardsAndResolvers: 'always', children: [ diff --git a/src/app/community-page/community-page-routing.module.ts b/src/app/community-page/community-page-routing.module.ts index f3611024335..6331e54f7e1 100644 --- a/src/app/community-page/community-page-routing.module.ts +++ b/src/app/community-page/community-page-routing.module.ts @@ -14,7 +14,6 @@ import { CommunityPageAdministratorGuard } from './community-page-administrator. import { LinkMenuItemModel } from '../shared/menu/menu-item/models/link.model'; import { ThemedCommunityPageComponent } from './themed-community-page.component'; import { MenuItemType } from '../shared/menu/menu-item-type.model'; -import { DSOEditMenuResolver } from '../shared/dso-page/dso-edit-menu.resolver'; import { I18nBreadcrumbResolver } from '../core/breadcrumbs/i18n-breadcrumb.resolver'; @NgModule({ @@ -48,7 +47,6 @@ import { I18nBreadcrumbResolver } from '../core/breadcrumbs/i18n-breadcrumb.reso resolve: { dso: CommunityPageResolver, breadcrumb: CommunityBreadcrumbResolver, - menu: DSOEditMenuResolver }, runGuardsAndResolvers: 'always', children: [ diff --git a/src/app/item-page/item-page-routing.module.ts b/src/app/item-page/item-page-routing.module.ts index 378bcd717dc..fce889397b8 100644 --- a/src/app/item-page/item-page-routing.module.ts +++ b/src/app/item-page/item-page-routing.module.ts @@ -19,7 +19,6 @@ import { REQUEST_COPY_MODULE_PATH } from '../app-routing-paths'; import { CrisItemPageTabResolver } from './cris-item-page-tab.resolver'; import { OrcidPageComponent } from './orcid-page/orcid-page.component'; import { OrcidPageGuard } from './orcid-page/orcid-page.guard'; -import { DSOEditMenuResolver } from '../shared/dso-page/dso-edit-menu.resolver'; @NgModule({ imports: [ @@ -29,7 +28,6 @@ import { DSOEditMenuResolver } from '../shared/dso-page/dso-edit-menu.resolver'; resolve: { dso: ItemPageResolver, breadcrumb: ItemBreadcrumbResolver, - menu: DSOEditMenuResolver }, runGuardsAndResolvers: 'always', children: [