From e89d0649348fe7f56b69c9fab0b865f3b52f2257 Mon Sep 17 00:00:00 2001 From: Marie Verdonck Date: Thu, 6 Aug 2020 17:13:32 +0200 Subject: [PATCH 1/3] multiple dsoType allowed in search & in selector modals --- .../collection-item-mapper.component.ts | 2 +- .../+collection-page/collection-page.component.ts | 2 +- .../item-collection-mapper.component.ts | 2 +- .../edit-item-page/item-move/item-move.component.ts | 2 +- .../dso-selector/dso-selector.component.html | 4 ++-- .../dso-selector/dso-selector.component.spec.ts | 4 ++-- .../dso-selector/dso-selector.component.ts | 10 +++++++--- .../create-collection-parent-selector.component.ts | 2 +- .../create-community-parent-selector.component.html | 2 +- .../create-community-parent-selector.component.ts | 2 +- .../create-item-parent-selector.component.ts | 2 +- .../dso-selector-modal-wrapper.component.html | 2 +- .../dso-selector-modal-wrapper.component.spec.ts | 2 +- .../dso-selector-modal-wrapper.component.ts | 4 ++-- .../edit-collection-selector.component.ts | 2 +- .../edit-community-selector.component.ts | 2 +- .../edit-item-selector.component.ts | 2 +- .../export-metadata-selector.component.ts | 2 +- .../search/paginated-search-options.model.spec.ts | 2 +- .../shared/search/paginated-search-options.model.ts | 2 +- src/app/shared/search/search-options.model.spec.ts | 2 +- src/app/shared/search/search-options.model.ts | 12 +++++++----- src/app/statistics/statistics.service.spec.ts | 4 ++-- src/app/statistics/statistics.service.ts | 5 +++-- 24 files changed, 42 insertions(+), 35 deletions(-) diff --git a/src/app/+collection-page/collection-item-mapper/collection-item-mapper.component.ts b/src/app/+collection-page/collection-item-mapper/collection-item-mapper.component.ts index 64ad426584..84475c95eb 100644 --- a/src/app/+collection-page/collection-item-mapper/collection-item-mapper.component.ts +++ b/src/app/+collection-page/collection-item-mapper/collection-item-mapper.component.ts @@ -133,7 +133,7 @@ export class CollectionItemMapperComponent implements OnInit { return this.searchService.search(Object.assign(new PaginatedSearchOptions(options), { query: this.buildQuery(collectionRD.payload.id, options.query), scope: undefined, - dsoType: DSpaceObjectType.ITEM, + dsoTypes: [DSpaceObjectType.ITEM], sort: this.defaultSortOptions }), 10000).pipe( toDSpaceObjectListRD(), diff --git a/src/app/+collection-page/collection-page.component.ts b/src/app/+collection-page/collection-page.component.ts index 7f54e0f9d7..c7d287ed6a 100644 --- a/src/app/+collection-page/collection-page.component.ts +++ b/src/app/+collection-page/collection-page.component.ts @@ -87,7 +87,7 @@ export class CollectionPageComponent implements OnInit { scope: id, pagination: dto.paginationConfig, sort: dto.sortConfig, - dsoType: DSpaceObjectType.ITEM + dsoTypes: [DSpaceObjectType.ITEM] })).pipe(toDSpaceObjectListRD()) as Observable>> }), startWith(undefined) // Make sure switching pages shows loading component diff --git a/src/app/+item-page/edit-item-page/item-collection-mapper/item-collection-mapper.component.ts b/src/app/+item-page/edit-item-page/item-collection-mapper/item-collection-mapper.component.ts index 8477ae5c21..1409e06ddb 100644 --- a/src/app/+item-page/edit-item-page/item-collection-mapper/item-collection-mapper.component.ts +++ b/src/app/+item-page/edit-item-page/item-collection-mapper/item-collection-mapper.component.ts @@ -125,7 +125,7 @@ export class ItemCollectionMapperComponent implements OnInit { switchMap(([itemCollectionsRD, owningCollectionRD, searchOptions]) => { return this.searchService.search(Object.assign(new PaginatedSearchOptions(searchOptions), { query: this.buildQuery([...itemCollectionsRD.payload.page, owningCollectionRD.payload], searchOptions.query), - dsoType: DSpaceObjectType.COLLECTION + dsoTypes: [DSpaceObjectType.COLLECTION] }), 10000).pipe( toDSpaceObjectListRD(), startWith(undefined) diff --git a/src/app/+item-page/edit-item-page/item-move/item-move.component.ts b/src/app/+item-page/edit-item-page/item-move/item-move.component.ts index 4db7cf94da..44928e6722 100644 --- a/src/app/+item-page/edit-item-page/item-move/item-move.component.ts +++ b/src/app/+item-page/edit-item-page/item-move/item-move.component.ts @@ -79,7 +79,7 @@ export class ItemMoveComponent implements OnInit { loadSuggestions(query): void { this.collectionSearchResults = this.searchService.search(new PaginatedSearchOptions({ pagination: this.pagination, - dsoType: DSpaceObjectType.COLLECTION, + dsoTypes: [DSpaceObjectType.COLLECTION], query: query })).pipe( first(), diff --git a/src/app/shared/dso-selector/dso-selector/dso-selector.component.html b/src/app/shared/dso-selector/dso-selector/dso-selector.component.html index 8a30399391..92ddf4cf36 100644 --- a/src/app/shared/dso-selector/dso-selector/dso-selector.component.html +++ b/src/app/shared/dso-selector/dso-selector/dso-selector.component.html @@ -2,14 +2,14 @@
diff --git a/src/app/shared/dso-selector/modal-wrappers/create-community-parent-selector/create-community-parent-selector.component.ts b/src/app/shared/dso-selector/modal-wrappers/create-community-parent-selector/create-community-parent-selector.component.ts index 914dc7582f..2ceb2316a6 100644 --- a/src/app/shared/dso-selector/modal-wrappers/create-community-parent-selector/create-community-parent-selector.component.ts +++ b/src/app/shared/dso-selector/modal-wrappers/create-community-parent-selector/create-community-parent-selector.component.ts @@ -27,7 +27,7 @@ import { }) export class CreateCommunityParentSelectorComponent extends DSOSelectorModalWrapperComponent implements OnInit { objectType = DSpaceObjectType.COMMUNITY; - selectorType = DSpaceObjectType.COMMUNITY; + selectorTypes = [DSpaceObjectType.COMMUNITY]; action = SelectorActionType.CREATE; constructor(protected activeModal: NgbActiveModal, protected route: ActivatedRoute, private router: Router) { diff --git a/src/app/shared/dso-selector/modal-wrappers/create-item-parent-selector/create-item-parent-selector.component.ts b/src/app/shared/dso-selector/modal-wrappers/create-item-parent-selector/create-item-parent-selector.component.ts index 45d15ae306..5729ac8460 100644 --- a/src/app/shared/dso-selector/modal-wrappers/create-item-parent-selector/create-item-parent-selector.component.ts +++ b/src/app/shared/dso-selector/modal-wrappers/create-item-parent-selector/create-item-parent-selector.component.ts @@ -18,7 +18,7 @@ import { DSOSelectorModalWrapperComponent, SelectorActionType } from '../dso-sel }) export class CreateItemParentSelectorComponent extends DSOSelectorModalWrapperComponent implements OnInit { objectType = DSpaceObjectType.ITEM; - selectorType = DSpaceObjectType.COLLECTION; + selectorTypes = [DSpaceObjectType.COLLECTION]; action = SelectorActionType.CREATE; constructor(protected activeModal: NgbActiveModal, protected route: ActivatedRoute, private router: Router) { diff --git a/src/app/shared/dso-selector/modal-wrappers/dso-selector-modal-wrapper.component.html b/src/app/shared/dso-selector/modal-wrappers/dso-selector-modal-wrapper.component.html index 4800bb8733..e1c18ec1e0 100644 --- a/src/app/shared/dso-selector/modal-wrappers/dso-selector-modal-wrapper.component.html +++ b/src/app/shared/dso-selector/modal-wrappers/dso-selector-modal-wrapper.component.html @@ -5,6 +5,6 @@ diff --git a/src/app/shared/dso-selector/modal-wrappers/dso-selector-modal-wrapper.component.spec.ts b/src/app/shared/dso-selector/modal-wrappers/dso-selector-modal-wrapper.component.spec.ts index f52ce3fc8f..0422953e17 100644 --- a/src/app/shared/dso-selector/modal-wrappers/dso-selector-modal-wrapper.component.spec.ts +++ b/src/app/shared/dso-selector/modal-wrappers/dso-selector-modal-wrapper.component.spec.ts @@ -124,7 +124,7 @@ describe('DSOSelectorModalWrapperComponent', () => { }) class TestComponent extends DSOSelectorModalWrapperComponent implements OnInit { objectType = DSpaceObjectType.ITEM; - selectorType = DSpaceObjectType.ITEM; + selectorTypes = [DSpaceObjectType.ITEM]; action = SelectorActionType.EDIT; constructor(protected activeModal: NgbActiveModal, protected route: ActivatedRoute) { diff --git a/src/app/shared/dso-selector/modal-wrappers/dso-selector-modal-wrapper.component.ts b/src/app/shared/dso-selector/modal-wrappers/dso-selector-modal-wrapper.component.ts index 0f166dac51..b56a901b12 100644 --- a/src/app/shared/dso-selector/modal-wrappers/dso-selector-modal-wrapper.component.ts +++ b/src/app/shared/dso-selector/modal-wrappers/dso-selector-modal-wrapper.component.ts @@ -29,9 +29,9 @@ export abstract class DSOSelectorModalWrapperComponent implements OnInit { objectType: DSpaceObjectType; /** - * The type of DSO that can be selected from this list + * The types of DSO that can be selected from this list */ - selectorType: DSpaceObjectType; + selectorTypes: DSpaceObjectType[]; /** * The type of action to perform diff --git a/src/app/shared/dso-selector/modal-wrappers/edit-collection-selector/edit-collection-selector.component.ts b/src/app/shared/dso-selector/modal-wrappers/edit-collection-selector/edit-collection-selector.component.ts index 79660b9589..f7c5aa5991 100644 --- a/src/app/shared/dso-selector/modal-wrappers/edit-collection-selector/edit-collection-selector.component.ts +++ b/src/app/shared/dso-selector/modal-wrappers/edit-collection-selector/edit-collection-selector.component.ts @@ -20,7 +20,7 @@ import { }) export class EditCollectionSelectorComponent extends DSOSelectorModalWrapperComponent implements OnInit { objectType = DSpaceObjectType.COLLECTION; - selectorType = DSpaceObjectType.COLLECTION; + selectorTypes = [DSpaceObjectType.COLLECTION]; action = SelectorActionType.EDIT; constructor(protected activeModal: NgbActiveModal, protected route: ActivatedRoute, private router: Router) { diff --git a/src/app/shared/dso-selector/modal-wrappers/edit-community-selector/edit-community-selector.component.ts b/src/app/shared/dso-selector/modal-wrappers/edit-community-selector/edit-community-selector.component.ts index 6b9efc1ff4..936dc55773 100644 --- a/src/app/shared/dso-selector/modal-wrappers/edit-community-selector/edit-community-selector.component.ts +++ b/src/app/shared/dso-selector/modal-wrappers/edit-community-selector/edit-community-selector.component.ts @@ -21,7 +21,7 @@ import { export class EditCommunitySelectorComponent extends DSOSelectorModalWrapperComponent implements OnInit { objectType = DSpaceObjectType.COMMUNITY; - selectorType = DSpaceObjectType.COMMUNITY; + selectorTypes = [DSpaceObjectType.COMMUNITY]; action = SelectorActionType.EDIT; constructor(protected activeModal: NgbActiveModal, protected route: ActivatedRoute, private router: Router) { diff --git a/src/app/shared/dso-selector/modal-wrappers/edit-item-selector/edit-item-selector.component.ts b/src/app/shared/dso-selector/modal-wrappers/edit-item-selector/edit-item-selector.component.ts index dae36d3017..3d35de5a80 100644 --- a/src/app/shared/dso-selector/modal-wrappers/edit-item-selector/edit-item-selector.component.ts +++ b/src/app/shared/dso-selector/modal-wrappers/edit-item-selector/edit-item-selector.component.ts @@ -17,7 +17,7 @@ import { DSOSelectorModalWrapperComponent, SelectorActionType } from '../dso-sel }) export class EditItemSelectorComponent extends DSOSelectorModalWrapperComponent implements OnInit { objectType = DSpaceObjectType.ITEM; - selectorType = DSpaceObjectType.ITEM; + selectorTypes = [DSpaceObjectType.ITEM]; action = SelectorActionType.EDIT; constructor(protected activeModal: NgbActiveModal, protected route: ActivatedRoute, private router: Router) { diff --git a/src/app/shared/dso-selector/modal-wrappers/export-metadata-selector/export-metadata-selector.component.ts b/src/app/shared/dso-selector/modal-wrappers/export-metadata-selector/export-metadata-selector.component.ts index 523c1c592a..c03de2ab12 100644 --- a/src/app/shared/dso-selector/modal-wrappers/export-metadata-selector/export-metadata-selector.component.ts +++ b/src/app/shared/dso-selector/modal-wrappers/export-metadata-selector/export-metadata-selector.component.ts @@ -28,7 +28,7 @@ import { DSOSelectorModalWrapperComponent, SelectorActionType } from '../dso-sel }) export class ExportMetadataSelectorComponent extends DSOSelectorModalWrapperComponent implements OnInit { objectType = DSpaceObjectType.DSPACEOBJECT; - selectorType = DSpaceObjectType.DSPACEOBJECT; + selectorTypes = [DSpaceObjectType.COLLECTION, DSpaceObjectType.COMMUNITY]; action = SelectorActionType.EXPORT_METADATA; constructor(protected activeModal: NgbActiveModal, protected route: ActivatedRoute, private router: Router, diff --git a/src/app/shared/search/paginated-search-options.model.spec.ts b/src/app/shared/search/paginated-search-options.model.spec.ts index 1739fd54fb..c8bef4b721 100644 --- a/src/app/shared/search/paginated-search-options.model.spec.ts +++ b/src/app/shared/search/paginated-search-options.model.spec.ts @@ -13,7 +13,7 @@ describe('PaginatedSearchOptions', () => { const scope = '0fde1ecb-82cc-425a-b600-ac3576d76b47'; const baseUrl = 'www.rest.com'; beforeEach(() => { - options = new PaginatedSearchOptions({sort: sortOptions, pagination: pageOptions, filters: filters, query: query, scope: scope, dsoType: DSpaceObjectType.ITEM}); + options = new PaginatedSearchOptions({sort: sortOptions, pagination: pageOptions, filters: filters, query: query, scope: scope, dsoTypes: [DSpaceObjectType.ITEM]}); }); describe('when toRestUrl is called', () => { diff --git a/src/app/shared/search/paginated-search-options.model.ts b/src/app/shared/search/paginated-search-options.model.ts index 13ab4cabea..950b207c3a 100644 --- a/src/app/shared/search/paginated-search-options.model.ts +++ b/src/app/shared/search/paginated-search-options.model.ts @@ -12,7 +12,7 @@ export class PaginatedSearchOptions extends SearchOptions { pagination?: PaginationComponentOptions; sort?: SortOptions; - constructor(options: {configuration?: string, scope?: string, query?: string, dsoType?: DSpaceObjectType, filters?: SearchFilter[], fixedFilter?: any, pagination?: PaginationComponentOptions, sort?: SortOptions}) { + constructor(options: {configuration?: string, scope?: string, query?: string, dsoTypes?: DSpaceObjectType[], filters?: SearchFilter[], fixedFilter?: any, pagination?: PaginationComponentOptions, sort?: SortOptions}) { super(options); this.pagination = options.pagination; this.sort = options.sort; diff --git a/src/app/shared/search/search-options.model.spec.ts b/src/app/shared/search/search-options.model.spec.ts index 3195ec3660..7982eba6d3 100644 --- a/src/app/shared/search/search-options.model.spec.ts +++ b/src/app/shared/search/search-options.model.spec.ts @@ -10,7 +10,7 @@ describe('SearchOptions', () => { const scope = '0fde1ecb-82cc-425a-b600-ac3576d76b47'; const baseUrl = 'www.rest.com'; beforeEach(() => { - options = new SearchOptions({ filters: filters, query: query, scope: scope , dsoType: DSpaceObjectType.ITEM}); + options = new SearchOptions({ filters: filters, query: query, scope: scope , dsoTypes: [DSpaceObjectType.ITEM]}); }); describe('when toRestUrl is called', () => { diff --git a/src/app/shared/search/search-options.model.ts b/src/app/shared/search/search-options.model.ts index 7d5f4dd207..387ae6a517 100644 --- a/src/app/shared/search/search-options.model.ts +++ b/src/app/shared/search/search-options.model.ts @@ -12,15 +12,15 @@ export class SearchOptions { view?: ViewMode = ViewMode.ListElement; scope?: string; query?: string; - dsoType?: DSpaceObjectType; + dsoTypes?: DSpaceObjectType[]; filters?: any; fixedFilter?: any; - constructor(options: {configuration?: string, scope?: string, query?: string, dsoType?: DSpaceObjectType, filters?: SearchFilter[], fixedFilter?: any}) { + constructor(options: {configuration?: string, scope?: string, query?: string, dsoTypes?: DSpaceObjectType[], filters?: SearchFilter[], fixedFilter?: any}) { this.configuration = options.configuration; this.scope = options.scope; this.query = options.query; - this.dsoType = options.dsoType; + this.dsoTypes = options.dsoTypes; this.filters = options.filters; this.fixedFilter = options.fixedFilter; } @@ -44,8 +44,10 @@ export class SearchOptions { if (isNotEmpty(this.scope)) { args.push(`scope=${this.scope}`); } - if (isNotEmpty(this.dsoType)) { - args.push(`dsoType=${this.dsoType}`); + if (isNotEmpty(this.dsoTypes)) { + this.dsoTypes.forEach((dsoType: string) => { + args.push(`dsoType=${dsoType}`); + }) } if (isNotEmpty(this.filters)) { this.filters.forEach((filter: SearchFilter) => { diff --git a/src/app/statistics/statistics.service.spec.ts b/src/app/statistics/statistics.service.spec.ts index e508d25ded..eee10eaf02 100644 --- a/src/app/statistics/statistics.service.spec.ts +++ b/src/app/statistics/statistics.service.spec.ts @@ -82,7 +82,7 @@ describe('StatisticsService', () => { const mockSearch: any = new SearchOptions({ query: 'mock-query', configuration: 'mock-configuration', - dsoType: DSpaceObjectType.ITEM, + dsoTypes: [DSpaceObjectType.ITEM], scope: 'mock-scope' }); @@ -112,7 +112,7 @@ describe('StatisticsService', () => { const body = JSON.parse(request.body); it('should specify the dsoType', () => { - expect(body.dsoType).toBe('item'); + expect(body.dsoTypes).toBe('item'); }); it('should specify the scope', () => { diff --git a/src/app/statistics/statistics.service.ts b/src/app/statistics/statistics.service.ts index 004e013164..6284e0c8b8 100644 --- a/src/app/statistics/statistics.service.ts +++ b/src/app/statistics/statistics.service.ts @@ -68,8 +68,9 @@ export class StatisticsService { if (hasValue(searchOptions.configuration)) { Object.assign(body, { configuration: searchOptions.configuration }) } - if (hasValue(searchOptions.dsoType)) { - Object.assign(body, { dsoType: searchOptions.dsoType.toLowerCase() }) + if (isNotEmpty(searchOptions.dsoTypes)) { + // TODO: check if backend statistics search even can handle multiple dsoTypes in body + Object.assign(body, { dsoTypes: searchOptions.dsoTypes.map( dsoType => dsoType.toLowerCase() ) }) } if (hasValue(searchOptions.scope)) { Object.assign(body, { scope: searchOptions.scope }) From e9d77c4d2c5e790dc618f3c882f4d46771c2626c Mon Sep 17 00:00:00 2001 From: Marie Verdonck Date: Tue, 11 Aug 2020 23:26:47 +0200 Subject: [PATCH 2/3] 72444: statistics searchevent.dsoTypes changed until backend changes & error on export modal dso selector for item removed, only returns comcols, not items now & test fixes --- .../export-metadata-selector.component.spec.ts | 5 ++--- .../export-metadata-selector.component.ts | 1 - src/app/statistics/statistics.service.spec.ts | 4 +++- src/app/statistics/statistics.service.ts | 5 +++-- src/assets/i18n/en.json5 | 2 -- 5 files changed, 8 insertions(+), 9 deletions(-) diff --git a/src/app/shared/dso-selector/modal-wrappers/export-metadata-selector/export-metadata-selector.component.spec.ts b/src/app/shared/dso-selector/modal-wrappers/export-metadata-selector/export-metadata-selector.component.spec.ts index ca7a339a04..40aab2fad5 100644 --- a/src/app/shared/dso-selector/modal-wrappers/export-metadata-selector/export-metadata-selector.component.spec.ts +++ b/src/app/shared/dso-selector/modal-wrappers/export-metadata-selector/export-metadata-selector.component.spec.ts @@ -130,9 +130,8 @@ describe('ExportMetadataSelectorComponent', () => { done() }); }); - it('should show error notification', () => { - expect(notificationService.error).toHaveBeenCalled(); - expect(scriptRequestSucceeded).toBeFalse(); + it('should not invoke metadata-export script', () => { + expect(scriptService.invoke).not.toHaveBeenCalled(); }); }); diff --git a/src/app/shared/dso-selector/modal-wrappers/export-metadata-selector/export-metadata-selector.component.ts b/src/app/shared/dso-selector/modal-wrappers/export-metadata-selector/export-metadata-selector.component.ts index c03de2ab12..f294390ecf 100644 --- a/src/app/shared/dso-selector/modal-wrappers/export-metadata-selector/export-metadata-selector.component.ts +++ b/src/app/shared/dso-selector/modal-wrappers/export-metadata-selector/export-metadata-selector.component.ts @@ -66,7 +66,6 @@ export class ExportMetadataSelectorComponent extends DSOSelectorModalWrapperComp resp$.subscribe(); return resp$; } else { - this.notificationsService.error(this.translationService.get('dso-selector.export-metadata.notValidDSO')); return observableOf(false); } } diff --git a/src/app/statistics/statistics.service.spec.ts b/src/app/statistics/statistics.service.spec.ts index eee10eaf02..94b8893154 100644 --- a/src/app/statistics/statistics.service.spec.ts +++ b/src/app/statistics/statistics.service.spec.ts @@ -112,7 +112,9 @@ describe('StatisticsService', () => { const body = JSON.parse(request.body); it('should specify the dsoType', () => { - expect(body.dsoTypes).toBe('item'); + // TODO: change when backend statistics search even can handle multiple dsoTypes in body + // expect(body.dsoTypes).toBe(['item']); + expect(body.dsoType).toBe('item'); }); it('should specify the scope', () => { diff --git a/src/app/statistics/statistics.service.ts b/src/app/statistics/statistics.service.ts index 6284e0c8b8..b8c26a851e 100644 --- a/src/app/statistics/statistics.service.ts +++ b/src/app/statistics/statistics.service.ts @@ -69,8 +69,9 @@ export class StatisticsService { Object.assign(body, { configuration: searchOptions.configuration }) } if (isNotEmpty(searchOptions.dsoTypes)) { - // TODO: check if backend statistics search even can handle multiple dsoTypes in body - Object.assign(body, { dsoTypes: searchOptions.dsoTypes.map( dsoType => dsoType.toLowerCase() ) }) + // TODO: change when backend statistics search even can handle multiple dsoTypes in body + // Object.assign(body, { dsoTypes: searchOptions.dsoTypes.map( dsoType => dsoType.toLowerCase() ) }) + Object.assign(body, { dsoType: searchOptions.dsoTypes[0].toLowerCase() }) } if (hasValue(searchOptions.scope)) { Object.assign(body, { scope: searchOptions.scope }) diff --git a/src/assets/i18n/en.json5 b/src/assets/i18n/en.json5 index b2540162ab..b6a7c7f7aa 100644 --- a/src/assets/i18n/en.json5 +++ b/src/assets/i18n/en.json5 @@ -989,8 +989,6 @@ "dso-selector.export-metadata.dspaceobject.head": "Export metadata from", - "dso-selector.export-metadata.notValidDSO": "You can only export metadata for collections and communities", - "dso-selector.no-results": "No {{ type }} found", "dso-selector.placeholder": "Search for a {{ type }}", From 81fc26b8443d6071be4817ddcde8b625921e0b21 Mon Sep 17 00:00:00 2001 From: Marie Verdonck Date: Thu, 27 Aug 2020 15:17:02 +0200 Subject: [PATCH 3/3] 72444: Statistics search event dsoType single string & small fix --- .../create-community-parent-selector.component.html | 2 +- src/app/statistics/statistics.service.spec.ts | 2 -- src/app/statistics/statistics.service.ts | 2 -- 3 files changed, 1 insertion(+), 5 deletions(-) diff --git a/src/app/shared/dso-selector/modal-wrappers/create-community-parent-selector/create-community-parent-selector.component.html b/src/app/shared/dso-selector/modal-wrappers/create-community-parent-selector/create-community-parent-selector.component.html index 708c209a29..84fdd34c01 100644 --- a/src/app/shared/dso-selector/modal-wrappers/create-community-parent-selector/create-community-parent-selector.component.html +++ b/src/app/shared/dso-selector/modal-wrappers/create-community-parent-selector/create-community-parent-selector.component.html @@ -14,6 +14,6 @@
{{'dso-selector.create.community.sub-level' | translate}}
- + diff --git a/src/app/statistics/statistics.service.spec.ts b/src/app/statistics/statistics.service.spec.ts index 94b8893154..2ca80f9b07 100644 --- a/src/app/statistics/statistics.service.spec.ts +++ b/src/app/statistics/statistics.service.spec.ts @@ -112,8 +112,6 @@ describe('StatisticsService', () => { const body = JSON.parse(request.body); it('should specify the dsoType', () => { - // TODO: change when backend statistics search even can handle multiple dsoTypes in body - // expect(body.dsoTypes).toBe(['item']); expect(body.dsoType).toBe('item'); }); diff --git a/src/app/statistics/statistics.service.ts b/src/app/statistics/statistics.service.ts index b8c26a851e..20d1ebd3fe 100644 --- a/src/app/statistics/statistics.service.ts +++ b/src/app/statistics/statistics.service.ts @@ -69,8 +69,6 @@ export class StatisticsService { Object.assign(body, { configuration: searchOptions.configuration }) } if (isNotEmpty(searchOptions.dsoTypes)) { - // TODO: change when backend statistics search even can handle multiple dsoTypes in body - // Object.assign(body, { dsoTypes: searchOptions.dsoTypes.map( dsoType => dsoType.toLowerCase() ) }) Object.assign(body, { dsoType: searchOptions.dsoTypes[0].toLowerCase() }) } if (hasValue(searchOptions.scope)) {