mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-16 14:33:03 +00:00
62339: itemIds to item remotedata in relationships
This commit is contained in:
@@ -1,9 +1,7 @@
|
||||
import { Component, Inject, OnInit } from '@angular/core';
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import { Observable } from 'rxjs';
|
||||
import { ItemDataService } from '../../../../core/data/item-data.service';
|
||||
import { Item } from '../../../../core/shared/item.model';
|
||||
import { ItemViewMode, rendersItemType } from '../../../../shared/items/item-type-decorator';
|
||||
import { ITEM } from '../../../../shared/items/switcher/item-type-switcher.component';
|
||||
import { isNotEmpty } from '../../../../shared/empty.util';
|
||||
import { ItemComponent } from '../../../../+item-page/simple/item-types/shared/item.component';
|
||||
import {
|
||||
@@ -36,30 +34,23 @@ export class ProjectComponent extends ItemComponent implements OnInit {
|
||||
*/
|
||||
orgUnits$: Observable<Item[]>;
|
||||
|
||||
constructor(
|
||||
@Inject(ITEM) public item: Item,
|
||||
private ids: ItemDataService
|
||||
) {
|
||||
super(item);
|
||||
}
|
||||
|
||||
ngOnInit(): void {
|
||||
super.ngOnInit();
|
||||
|
||||
if (isNotEmpty(this.resolvedRelsAndTypes$)) {
|
||||
this.people$ = this.resolvedRelsAndTypes$.pipe(
|
||||
filterRelationsByTypeLabel('isPersonOfProject'),
|
||||
relationsToItems(this.item.id, this.ids)
|
||||
relationsToItems(this.item.id)
|
||||
);
|
||||
|
||||
this.publications$ = this.resolvedRelsAndTypes$.pipe(
|
||||
filterRelationsByTypeLabel('isPublicationOfProject'),
|
||||
relationsToItems(this.item.id, this.ids)
|
||||
relationsToItems(this.item.id)
|
||||
);
|
||||
|
||||
this.orgUnits$ = this.resolvedRelsAndTypes$.pipe(
|
||||
filterRelationsByTypeLabel('isOrgUnitOfProject'),
|
||||
relationsToItems(this.item.id, this.ids)
|
||||
relationsToItems(this.item.id)
|
||||
);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user