mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-09 02:54:13 +00:00
63123: RelationshipSide argument for filterRelationsByTypeLabel, relationsToItems and new relationship util getRelatedItemsByTypeLabel
This commit is contained in:
@@ -7,7 +7,7 @@ import {
|
|||||||
} from '../../../../shared/items/item-type-decorator';
|
} from '../../../../shared/items/item-type-decorator';
|
||||||
import { ItemComponent } from '../shared/item.component';
|
import { ItemComponent } from '../shared/item.component';
|
||||||
import { MetadataRepresentation } from '../../../../core/shared/metadata-representation/metadata-representation.model';
|
import { MetadataRepresentation } from '../../../../core/shared/metadata-representation/metadata-representation.model';
|
||||||
import { filterRelationsByTypeLabel, relationsToItems } from '../shared/item-relationships-utils';
|
import { getRelatedItemsByTypeLabel } from '../shared/item-relationships-utils';
|
||||||
|
|
||||||
@rendersItemType('Publication', ItemViewMode.Full)
|
@rendersItemType('Publication', ItemViewMode.Full)
|
||||||
@rendersItemType(DEFAULT_ITEM_TYPE, ItemViewMode.Full)
|
@rendersItemType(DEFAULT_ITEM_TYPE, ItemViewMode.Full)
|
||||||
@@ -46,18 +46,15 @@ export class PublicationComponent extends ItemComponent implements OnInit {
|
|||||||
this.authors$ = this.buildRepresentations('Person', 'dc.contributor.author');
|
this.authors$ = this.buildRepresentations('Person', 'dc.contributor.author');
|
||||||
|
|
||||||
this.projects$ = this.resolvedRelsAndTypes$.pipe(
|
this.projects$ = this.resolvedRelsAndTypes$.pipe(
|
||||||
filterRelationsByTypeLabel('isProjectOfPublication'),
|
getRelatedItemsByTypeLabel(this.item.id, 'isProjectOfPublication')
|
||||||
relationsToItems(this.item.id)
|
|
||||||
);
|
);
|
||||||
|
|
||||||
this.orgUnits$ = this.resolvedRelsAndTypes$.pipe(
|
this.orgUnits$ = this.resolvedRelsAndTypes$.pipe(
|
||||||
filterRelationsByTypeLabel('isOrgUnitOfPublication'),
|
getRelatedItemsByTypeLabel(this.item.id, 'isOrgUnitOfPublication')
|
||||||
relationsToItems(this.item.id)
|
|
||||||
);
|
);
|
||||||
|
|
||||||
this.journalIssues$ = this.resolvedRelsAndTypes$.pipe(
|
this.journalIssues$ = this.resolvedRelsAndTypes$.pipe(
|
||||||
filterRelationsByTypeLabel('isJournalIssueOfPublication'),
|
getRelatedItemsByTypeLabel(this.item.id, 'isJournalIssueOfPublication')
|
||||||
relationsToItems(this.item.id)
|
|
||||||
);
|
);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@@ -3,7 +3,7 @@ import { MetadataRepresentation } from '../../../../core/shared/metadata-represe
|
|||||||
import { MetadatumRepresentation } from '../../../../core/shared/metadata-representation/metadatum/metadatum-representation.model';
|
import { MetadatumRepresentation } from '../../../../core/shared/metadata-representation/metadatum/metadatum-representation.model';
|
||||||
import { MetadataValue } from '../../../../core/shared/metadata.models';
|
import { MetadataValue } from '../../../../core/shared/metadata.models';
|
||||||
import { getSucceededRemoteData } from '../../../../core/shared/operators';
|
import { getSucceededRemoteData } from '../../../../core/shared/operators';
|
||||||
import { hasValue } from '../../../../shared/empty.util';
|
import { hasNoValue, hasValue } from '../../../../shared/empty.util';
|
||||||
import { Observable } from 'rxjs/internal/Observable';
|
import { Observable } from 'rxjs/internal/Observable';
|
||||||
import { Relationship } from '../../../../core/shared/item-relationships/relationship.model';
|
import { Relationship } from '../../../../core/shared/item-relationships/relationship.model';
|
||||||
import { RelationshipType } from '../../../../core/shared/item-relationships/relationship-type.model';
|
import { RelationshipType } from '../../../../core/shared/item-relationships/relationship-type.model';
|
||||||
@@ -13,6 +13,14 @@ import { ItemDataService } from '../../../../core/data/item-data.service';
|
|||||||
import { Item } from '../../../../core/shared/item.model';
|
import { Item } from '../../../../core/shared/item.model';
|
||||||
import { RemoteData } from '../../../../core/data/remote-data';
|
import { RemoteData } from '../../../../core/data/remote-data';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* An enum defining one side of a relationship between two entities
|
||||||
|
*/
|
||||||
|
export enum RelationshipSide {
|
||||||
|
left = 'left',
|
||||||
|
right = 'right'
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Operator for comparing arrays using a mapping function
|
* Operator for comparing arrays using a mapping function
|
||||||
* The mapping function should turn the source array into an array of basic types, so that the array can
|
* The mapping function should turn the source array into an array of basic types, so that the array can
|
||||||
@@ -43,15 +51,20 @@ export const compareArraysUsingIds = <T extends { id: string }>() =>
|
|||||||
/**
|
/**
|
||||||
* Fetch the relationships which match the type label given
|
* Fetch the relationships which match the type label given
|
||||||
* @param {string} label Type label
|
* @param {string} label Type label
|
||||||
|
* @param side Which side to filter the relationships on: left/right (takes both sides when not provided)
|
||||||
* @returns {(source: Observable<[Relationship[] , RelationshipType[]]>) => Observable<Relationship[]>}
|
* @returns {(source: Observable<[Relationship[] , RelationshipType[]]>) => Observable<Relationship[]>}
|
||||||
*/
|
*/
|
||||||
export const filterRelationsByTypeLabel = (label: string) =>
|
export const filterRelationsByTypeLabel = (label: string, side?: RelationshipSide) =>
|
||||||
(source: Observable<[Relationship[], RelationshipType[]]>): Observable<Relationship[]> =>
|
(source: Observable<[Relationship[], RelationshipType[]]>): Observable<Relationship[]> =>
|
||||||
source.pipe(
|
source.pipe(
|
||||||
map(([relsCurrentPage, relTypesCurrentPage]) =>
|
map(([relsCurrentPage, relTypesCurrentPage]) =>
|
||||||
relsCurrentPage.filter((rel: Relationship, idx: number) =>
|
relsCurrentPage.filter((rel: Relationship, idx: number) =>
|
||||||
hasValue(relTypesCurrentPage[idx]) && (relTypesCurrentPage[idx].leftLabel === label ||
|
hasValue(relTypesCurrentPage[idx]) && (
|
||||||
relTypesCurrentPage[idx].rightLabel === label)
|
(hasNoValue(side) && (relTypesCurrentPage[idx].leftLabel === label ||
|
||||||
|
relTypesCurrentPage[idx].rightLabel === label)) ||
|
||||||
|
(side === RelationshipSide.left && relTypesCurrentPage[idx].leftLabel === label) ||
|
||||||
|
(side === RelationshipSide.right && relTypesCurrentPage[idx].rightLabel === label)
|
||||||
|
)
|
||||||
)
|
)
|
||||||
),
|
),
|
||||||
distinctUntilChanged(compareArraysUsingIds())
|
distinctUntilChanged(compareArraysUsingIds())
|
||||||
@@ -59,10 +72,11 @@ export const filterRelationsByTypeLabel = (label: string) =>
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Operator for turning a list of relationships into a list of the relevant items
|
* Operator for turning a list of relationships into a list of the relevant items
|
||||||
* @param {string} thisId The item's id of which the relations belong to
|
* @param {string} thisId The item's id of which the relations belong to
|
||||||
|
* @param side Filter only on one side of the relationship (for example: child-parent relationships)
|
||||||
* @returns {(source: Observable<Relationship[]>) => Observable<Item[]>}
|
* @returns {(source: Observable<Relationship[]>) => Observable<Item[]>}
|
||||||
*/
|
*/
|
||||||
export const relationsToItems = (thisId: string) =>
|
export const relationsToItems = (thisId: string, side?: RelationshipSide) =>
|
||||||
(source: Observable<Relationship[]>): Observable<Item[]> =>
|
(source: Observable<Relationship[]>): Observable<Item[]> =>
|
||||||
source.pipe(
|
source.pipe(
|
||||||
flatMap((rels: Relationship[]) =>
|
flatMap((rels: Relationship[]) =>
|
||||||
@@ -74,15 +88,30 @@ export const relationsToItems = (thisId: string) =>
|
|||||||
arr
|
arr
|
||||||
.filter(([leftItem, rightItem]) => leftItem.hasSucceeded && rightItem.hasSucceeded)
|
.filter(([leftItem, rightItem]) => leftItem.hasSucceeded && rightItem.hasSucceeded)
|
||||||
.map(([leftItem, rightItem]) => {
|
.map(([leftItem, rightItem]) => {
|
||||||
if (leftItem.payload.id === thisId) {
|
if ((hasNoValue(side) || side !== RelationshipSide.left) && leftItem.payload.id === thisId) {
|
||||||
return rightItem.payload;
|
return rightItem.payload;
|
||||||
} else if (rightItem.payload.id === thisId) {
|
} else if ((hasNoValue(side) || side !== RelationshipSide.right) && rightItem.payload.id === thisId) {
|
||||||
return leftItem.payload;
|
return leftItem.payload;
|
||||||
}
|
}
|
||||||
})),
|
})
|
||||||
|
.filter((item: Item) => hasValue(item))
|
||||||
|
),
|
||||||
distinctUntilChanged(compareArraysUsingIds()),
|
distinctUntilChanged(compareArraysUsingIds()),
|
||||||
);
|
);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Operator for turning a list of relationships and their relationship-types into a list of relevant items by relationship label
|
||||||
|
* @param thisId The item's id of which the relations belong to
|
||||||
|
* @param label The label of the relationship-type to filter on
|
||||||
|
* @param side Filter only on one side of the relationship (for example: child-parent relationships)
|
||||||
|
*/
|
||||||
|
export const getRelatedItemsByTypeLabel = (thisId: string, label: string, side?: RelationshipSide) =>
|
||||||
|
(source: Observable<[Relationship[], RelationshipType[]]>): Observable<Item[]> =>
|
||||||
|
source.pipe(
|
||||||
|
filterRelationsByTypeLabel(label, side),
|
||||||
|
relationsToItems(thisId, side)
|
||||||
|
);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Operator for turning a list of relationships into a list of metadatarepresentations given the original metadata
|
* Operator for turning a list of relationships into a list of metadatarepresentations given the original metadata
|
||||||
* @param parentId The id of the parent item
|
* @param parentId The id of the parent item
|
||||||
|
@@ -4,10 +4,7 @@ import { Item } from '../../../../core/shared/item.model';
|
|||||||
import { ItemViewMode, rendersItemType } from '../../../../shared/items/item-type-decorator';
|
import { ItemViewMode, rendersItemType } from '../../../../shared/items/item-type-decorator';
|
||||||
import { isNotEmpty } from '../../../../shared/empty.util';
|
import { isNotEmpty } from '../../../../shared/empty.util';
|
||||||
import { ItemComponent } from '../../../../+item-page/simple/item-types/shared/item.component';
|
import { ItemComponent } from '../../../../+item-page/simple/item-types/shared/item.component';
|
||||||
import {
|
import { getRelatedItemsByTypeLabel } from '../../../../+item-page/simple/item-types/shared/item-relationships-utils';
|
||||||
filterRelationsByTypeLabel,
|
|
||||||
relationsToItems
|
|
||||||
} from '../../../../+item-page/simple/item-types/shared/item-relationships-utils';
|
|
||||||
|
|
||||||
@rendersItemType('JournalIssue', ItemViewMode.Full)
|
@rendersItemType('JournalIssue', ItemViewMode.Full)
|
||||||
@Component({
|
@Component({
|
||||||
@@ -34,12 +31,10 @@ export class JournalIssueComponent extends ItemComponent {
|
|||||||
|
|
||||||
if (isNotEmpty(this.resolvedRelsAndTypes$)) {
|
if (isNotEmpty(this.resolvedRelsAndTypes$)) {
|
||||||
this.volumes$ = this.resolvedRelsAndTypes$.pipe(
|
this.volumes$ = this.resolvedRelsAndTypes$.pipe(
|
||||||
filterRelationsByTypeLabel('isJournalVolumeOfIssue'),
|
getRelatedItemsByTypeLabel(this.item.id, 'isJournalVolumeOfIssue')
|
||||||
relationsToItems(this.item.id)
|
|
||||||
);
|
);
|
||||||
this.publications$ = this.resolvedRelsAndTypes$.pipe(
|
this.publications$ = this.resolvedRelsAndTypes$.pipe(
|
||||||
filterRelationsByTypeLabel('isPublicationOfJournalIssue'),
|
getRelatedItemsByTypeLabel(this.item.id, 'isPublicationOfJournalIssue')
|
||||||
relationsToItems(this.item.id)
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -4,10 +4,7 @@ import { Item } from '../../../../core/shared/item.model';
|
|||||||
import { ItemViewMode, rendersItemType } from '../../../../shared/items/item-type-decorator';
|
import { ItemViewMode, rendersItemType } from '../../../../shared/items/item-type-decorator';
|
||||||
import { isNotEmpty } from '../../../../shared/empty.util';
|
import { isNotEmpty } from '../../../../shared/empty.util';
|
||||||
import { ItemComponent } from '../../../../+item-page/simple/item-types/shared/item.component';
|
import { ItemComponent } from '../../../../+item-page/simple/item-types/shared/item.component';
|
||||||
import {
|
import { getRelatedItemsByTypeLabel } from '../../../../+item-page/simple/item-types/shared/item-relationships-utils';
|
||||||
filterRelationsByTypeLabel,
|
|
||||||
relationsToItems
|
|
||||||
} from '../../../../+item-page/simple/item-types/shared/item-relationships-utils';
|
|
||||||
|
|
||||||
@rendersItemType('JournalVolume', ItemViewMode.Full)
|
@rendersItemType('JournalVolume', ItemViewMode.Full)
|
||||||
@Component({
|
@Component({
|
||||||
@@ -34,12 +31,10 @@ export class JournalVolumeComponent extends ItemComponent {
|
|||||||
|
|
||||||
if (isNotEmpty(this.resolvedRelsAndTypes$)) {
|
if (isNotEmpty(this.resolvedRelsAndTypes$)) {
|
||||||
this.journals$ = this.resolvedRelsAndTypes$.pipe(
|
this.journals$ = this.resolvedRelsAndTypes$.pipe(
|
||||||
filterRelationsByTypeLabel('isJournalOfVolume'),
|
getRelatedItemsByTypeLabel(this.item.id, 'isJournalOfVolume')
|
||||||
relationsToItems(this.item.id)
|
|
||||||
);
|
);
|
||||||
this.issues$ = this.resolvedRelsAndTypes$.pipe(
|
this.issues$ = this.resolvedRelsAndTypes$.pipe(
|
||||||
filterRelationsByTypeLabel('isIssueOfJournalVolume'),
|
getRelatedItemsByTypeLabel(this.item.id, 'isIssueOfJournalVolume')
|
||||||
relationsToItems(this.item.id)
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -4,10 +4,7 @@ import { Item } from '../../../../core/shared/item.model';
|
|||||||
import { ItemViewMode, rendersItemType } from '../../../../shared/items/item-type-decorator';
|
import { ItemViewMode, rendersItemType } from '../../../../shared/items/item-type-decorator';
|
||||||
import { isNotEmpty } from '../../../../shared/empty.util';
|
import { isNotEmpty } from '../../../../shared/empty.util';
|
||||||
import { ItemComponent } from '../../../../+item-page/simple/item-types/shared/item.component';
|
import { ItemComponent } from '../../../../+item-page/simple/item-types/shared/item.component';
|
||||||
import {
|
import { getRelatedItemsByTypeLabel } from '../../../../+item-page/simple/item-types/shared/item-relationships-utils';
|
||||||
filterRelationsByTypeLabel,
|
|
||||||
relationsToItems
|
|
||||||
} from '../../../../+item-page/simple/item-types/shared/item-relationships-utils';
|
|
||||||
|
|
||||||
@rendersItemType('Journal', ItemViewMode.Full)
|
@rendersItemType('Journal', ItemViewMode.Full)
|
||||||
@Component({
|
@Component({
|
||||||
@@ -29,8 +26,7 @@ export class JournalComponent extends ItemComponent {
|
|||||||
|
|
||||||
if (isNotEmpty(this.resolvedRelsAndTypes$)) {
|
if (isNotEmpty(this.resolvedRelsAndTypes$)) {
|
||||||
this.volumes$ = this.resolvedRelsAndTypes$.pipe(
|
this.volumes$ = this.resolvedRelsAndTypes$.pipe(
|
||||||
filterRelationsByTypeLabel('isVolumeOfJournal'),
|
getRelatedItemsByTypeLabel(this.item.id, 'isVolumeOfJournal')
|
||||||
relationsToItems(this.item.id)
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -4,10 +4,7 @@ import { Item } from '../../../../core/shared/item.model';
|
|||||||
import { ItemViewMode, rendersItemType } from '../../../../shared/items/item-type-decorator';
|
import { ItemViewMode, rendersItemType } from '../../../../shared/items/item-type-decorator';
|
||||||
import { isNotEmpty } from '../../../../shared/empty.util';
|
import { isNotEmpty } from '../../../../shared/empty.util';
|
||||||
import { ItemComponent } from '../../../../+item-page/simple/item-types/shared/item.component';
|
import { ItemComponent } from '../../../../+item-page/simple/item-types/shared/item.component';
|
||||||
import {
|
import { getRelatedItemsByTypeLabel } from '../../../../+item-page/simple/item-types/shared/item-relationships-utils';
|
||||||
filterRelationsByTypeLabel,
|
|
||||||
relationsToItems
|
|
||||||
} from '../../../../+item-page/simple/item-types/shared/item-relationships-utils';
|
|
||||||
|
|
||||||
@rendersItemType('OrgUnit', ItemViewMode.Full)
|
@rendersItemType('OrgUnit', ItemViewMode.Full)
|
||||||
@Component({
|
@Component({
|
||||||
@@ -39,18 +36,15 @@ export class OrgunitComponent extends ItemComponent implements OnInit {
|
|||||||
|
|
||||||
if (isNotEmpty(this.resolvedRelsAndTypes$)) {
|
if (isNotEmpty(this.resolvedRelsAndTypes$)) {
|
||||||
this.people$ = this.resolvedRelsAndTypes$.pipe(
|
this.people$ = this.resolvedRelsAndTypes$.pipe(
|
||||||
filterRelationsByTypeLabel('isPersonOfOrgUnit'),
|
getRelatedItemsByTypeLabel(this.item.id, 'isPersonOfOrgUnit')
|
||||||
relationsToItems(this.item.id)
|
|
||||||
);
|
);
|
||||||
|
|
||||||
this.projects$ = this.resolvedRelsAndTypes$.pipe(
|
this.projects$ = this.resolvedRelsAndTypes$.pipe(
|
||||||
filterRelationsByTypeLabel('isProjectOfOrgUnit'),
|
getRelatedItemsByTypeLabel(this.item.id, 'isProjectOfOrgUnit')
|
||||||
relationsToItems(this.item.id)
|
|
||||||
);
|
);
|
||||||
|
|
||||||
this.publications$ = this.resolvedRelsAndTypes$.pipe(
|
this.publications$ = this.resolvedRelsAndTypes$.pipe(
|
||||||
filterRelationsByTypeLabel('isPublicationOfOrgUnit'),
|
getRelatedItemsByTypeLabel(this.item.id, 'isPublicationOfOrgUnit')
|
||||||
relationsToItems(this.item.id)
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}}
|
}}
|
||||||
|
@@ -6,10 +6,7 @@ import { ITEM } from '../../../../shared/items/switcher/item-type-switcher.compo
|
|||||||
import { SearchFixedFilterService } from '../../../../+search-page/search-filters/search-filter/search-fixed-filter.service';
|
import { SearchFixedFilterService } from '../../../../+search-page/search-filters/search-filter/search-fixed-filter.service';
|
||||||
import { isNotEmpty } from '../../../../shared/empty.util';
|
import { isNotEmpty } from '../../../../shared/empty.util';
|
||||||
import { ItemComponent } from '../../../../+item-page/simple/item-types/shared/item.component';
|
import { ItemComponent } from '../../../../+item-page/simple/item-types/shared/item.component';
|
||||||
import {
|
import { getRelatedItemsByTypeLabel } from '../../../../+item-page/simple/item-types/shared/item-relationships-utils';
|
||||||
filterRelationsByTypeLabel,
|
|
||||||
relationsToItems
|
|
||||||
} from '../../../../+item-page/simple/item-types/shared/item-relationships-utils';
|
|
||||||
|
|
||||||
@rendersItemType('Person', ItemViewMode.Full)
|
@rendersItemType('Person', ItemViewMode.Full)
|
||||||
@Component({
|
@Component({
|
||||||
@@ -57,18 +54,15 @@ export class PersonComponent extends ItemComponent {
|
|||||||
|
|
||||||
if (isNotEmpty(this.resolvedRelsAndTypes$)) {
|
if (isNotEmpty(this.resolvedRelsAndTypes$)) {
|
||||||
this.publications$ = this.resolvedRelsAndTypes$.pipe(
|
this.publications$ = this.resolvedRelsAndTypes$.pipe(
|
||||||
filterRelationsByTypeLabel('isPublicationOfAuthor'),
|
getRelatedItemsByTypeLabel(this.item.id, 'isPublicationOfAuthor')
|
||||||
relationsToItems(this.item.id)
|
|
||||||
);
|
);
|
||||||
|
|
||||||
this.projects$ = this.resolvedRelsAndTypes$.pipe(
|
this.projects$ = this.resolvedRelsAndTypes$.pipe(
|
||||||
filterRelationsByTypeLabel('isProjectOfPerson'),
|
getRelatedItemsByTypeLabel(this.item.id, 'isProjectOfPerson')
|
||||||
relationsToItems(this.item.id)
|
|
||||||
);
|
);
|
||||||
|
|
||||||
this.orgUnits$ = this.resolvedRelsAndTypes$.pipe(
|
this.orgUnits$ = this.resolvedRelsAndTypes$.pipe(
|
||||||
filterRelationsByTypeLabel('isOrgUnitOfPerson'),
|
getRelatedItemsByTypeLabel(this.item.id, 'isOrgUnitOfPerson')
|
||||||
relationsToItems(this.item.id)
|
|
||||||
);
|
);
|
||||||
|
|
||||||
this.fixedFilterQuery = this.fixedFilterService.getQueryByRelations('isAuthorOfPublication', this.item.id);
|
this.fixedFilterQuery = this.fixedFilterService.getQueryByRelations('isAuthorOfPublication', this.item.id);
|
||||||
|
@@ -5,10 +5,7 @@ import { MetadataRepresentation } from '../../../../core/shared/metadata-represe
|
|||||||
import { ItemViewMode, rendersItemType } from '../../../../shared/items/item-type-decorator';
|
import { ItemViewMode, rendersItemType } from '../../../../shared/items/item-type-decorator';
|
||||||
import { isNotEmpty } from '../../../../shared/empty.util';
|
import { isNotEmpty } from '../../../../shared/empty.util';
|
||||||
import { ItemComponent } from '../../../../+item-page/simple/item-types/shared/item.component';
|
import { ItemComponent } from '../../../../+item-page/simple/item-types/shared/item.component';
|
||||||
import {
|
import { getRelatedItemsByTypeLabel } from '../../../../+item-page/simple/item-types/shared/item-relationships-utils';
|
||||||
filterRelationsByTypeLabel,
|
|
||||||
relationsToItems
|
|
||||||
} from '../../../../+item-page/simple/item-types/shared/item-relationships-utils';
|
|
||||||
|
|
||||||
@rendersItemType('Project', ItemViewMode.Full)
|
@rendersItemType('Project', ItemViewMode.Full)
|
||||||
@Component({
|
@Component({
|
||||||
@@ -47,18 +44,15 @@ export class ProjectComponent extends ItemComponent implements OnInit {
|
|||||||
this.contributors$ = this.buildRepresentations('OrgUnit', 'project.contributor.other');
|
this.contributors$ = this.buildRepresentations('OrgUnit', 'project.contributor.other');
|
||||||
|
|
||||||
this.people$ = this.resolvedRelsAndTypes$.pipe(
|
this.people$ = this.resolvedRelsAndTypes$.pipe(
|
||||||
filterRelationsByTypeLabel('isPersonOfProject'),
|
getRelatedItemsByTypeLabel(this.item.id, 'isPersonOfProject')
|
||||||
relationsToItems(this.item.id)
|
|
||||||
);
|
);
|
||||||
|
|
||||||
this.publications$ = this.resolvedRelsAndTypes$.pipe(
|
this.publications$ = this.resolvedRelsAndTypes$.pipe(
|
||||||
filterRelationsByTypeLabel('isPublicationOfProject'),
|
getRelatedItemsByTypeLabel(this.item.id, 'isPublicationOfProject')
|
||||||
relationsToItems(this.item.id)
|
|
||||||
);
|
);
|
||||||
|
|
||||||
this.orgUnits$ = this.resolvedRelsAndTypes$.pipe(
|
this.orgUnits$ = this.resolvedRelsAndTypes$.pipe(
|
||||||
filterRelationsByTypeLabel('isOrgUnitOfProject'),
|
getRelatedItemsByTypeLabel(this.item.id, 'isOrgUnitOfProject')
|
||||||
relationsToItems(this.item.id)
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user