Merge branch 'master' into w2p-62339_Relationships-link-to-item-via-HAL-links

Conflicts:
	src/app/+item-page/simple/item-types/shared/item-relationships-utils.ts
	src/app/+item-page/simple/item-types/shared/item.component.ts
This commit is contained in:
Kristof De Langhe
2019-05-29 10:27:19 +02:00
356 changed files with 10541 additions and 1071 deletions

View File

@@ -1,6 +1,7 @@
import { Component, OnInit } from '@angular/core';
import { Observable } from 'rxjs';
import { Item } from '../../../../core/shared/item.model';
import { MetadataRepresentation } from '../../../../core/shared/metadata-representation/metadata-representation.model';
import { ItemViewMode, rendersItemType } from '../../../../shared/items/item-type-decorator';
import { isNotEmpty } from '../../../../shared/empty.util';
import { ItemComponent } from '../../../../+item-page/simple/item-types/shared/item.component';
@@ -19,6 +20,11 @@ import {
* The component for displaying metadata and relations of an item of the type Project
*/
export class ProjectComponent extends ItemComponent implements OnInit {
/**
* The contributors related to this project
*/
contributors$: Observable<MetadataRepresentation[]>;
/**
* The people related to this project
*/
@@ -38,6 +44,8 @@ export class ProjectComponent extends ItemComponent implements OnInit {
super.ngOnInit();
if (isNotEmpty(this.resolvedRelsAndTypes$)) {
this.contributors$ = this.buildRepresentations('OrgUnit', 'project.contributor.other');
this.people$ = this.resolvedRelsAndTypes$.pipe(
filterRelationsByTypeLabel('isPersonOfProject'),
relationsToItems(this.item.id)