mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-07 10:04:11 +00:00
Merge branch 'w2p-65195_dynamic-component-refactoring' into clean-relationships-in-submission
This commit is contained in:
@@ -159,10 +159,10 @@ export class RelationshipService extends DataService<Relationship> {
|
||||
getSucceededRemoteData(),
|
||||
map((relationshipTypeRD) => relationshipTypeRD.payload),
|
||||
map((relationshipType: RelationshipType) => {
|
||||
if (otherItem.uuid == item.uuid) {
|
||||
return relationshipType.leftLabel;
|
||||
if (otherItem.uuid === item.uuid) {
|
||||
return relationshipType.leftwardType;
|
||||
} else {
|
||||
return relationshipType.rightLabel;
|
||||
return relationshipType.rightwardType;
|
||||
}
|
||||
})
|
||||
)
|
||||
@@ -211,7 +211,6 @@ export class RelationshipService extends DataService<Relationship> {
|
||||
return this.searchBy('byLabel', findAllOptions);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Method for fetching an item's relationships, but filtered by related item IDs (essentially performing a reverse lookup)
|
||||
* Only relationships where leftItem or rightItem's ID is present in the list provided will be returned
|
||||
@@ -231,7 +230,7 @@ export class RelationshipService extends DataService<Relationship> {
|
||||
);
|
||||
}))
|
||||
}),
|
||||
map((relationships: Relationship[]) => relationships.filter((relationship => hasValue(relationship)))),
|
||||
map((relationships: Relationship[]) => relationships.filter(((relationship) => hasValue(relationship)))),
|
||||
)
|
||||
}
|
||||
|
||||
@@ -243,7 +242,6 @@ export class RelationshipService extends DataService<Relationship> {
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
getRelationshipByItemsAndLabel(item1: Item, item2: Item, label: string): Observable<Relationship> {
|
||||
return this.getItemRelationshipsByLabel(item1, label)
|
||||
.pipe(
|
||||
@@ -260,7 +258,7 @@ export class RelationshipService extends DataService<Relationship> {
|
||||
);
|
||||
}))
|
||||
}),
|
||||
map((relationships: Relationship[]) => relationships.find((relationship => hasValue(relationship))))
|
||||
map((relationships: Relationship[]) => relationships.find(((relationship) => hasValue(relationship))))
|
||||
)
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user