mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-07 10:04:11 +00:00
Merge pull request #3098 from alexandrevryghem/w2p-115434_byLabel-related-entity-type_contribute-main
Fixed item edit relationships with same type name but different entities all being shown under same label
This commit is contained in:
@@ -43,6 +43,7 @@ import {
|
||||
AppConfig,
|
||||
} from '../../../../../config/app-config.interface';
|
||||
import { LinkService } from '../../../../core/cache/builders/link.service';
|
||||
import { RequestParam } from '../../../../core/cache/models/request-param.model';
|
||||
import { FieldChangeType } from '../../../../core/data/object-updates/field-change-type.model';
|
||||
import { FieldUpdate } from '../../../../core/data/object-updates/field-update.model';
|
||||
import { FieldUpdates } from '../../../../core/data/object-updates/field-updates.model';
|
||||
@@ -494,15 +495,19 @@ export class EditRelationshipListComponent implements OnInit, OnDestroy {
|
||||
observableCombineLatest([
|
||||
currentPagination$,
|
||||
this.currentItemIsLeftItem$,
|
||||
this.relatedEntityType$,
|
||||
]).pipe(
|
||||
switchMap(([currentPagination, currentItemIsLeftItem]: [PaginationComponentOptions, boolean]) => {
|
||||
// get the relationships for the current item, relationshiptype and page
|
||||
switchMap(([currentPagination, currentItemIsLeftItem, relatedEntityType]: [PaginationComponentOptions, boolean, ItemType]) => {
|
||||
// get the relationships for the current page, item, relationship type and related entity type
|
||||
return this.relationshipService.getItemRelationshipsByLabel(
|
||||
this.item,
|
||||
currentItemIsLeftItem ? this.relationshipType.leftwardType : this.relationshipType.rightwardType,
|
||||
{
|
||||
elementsPerPage: currentPagination.pageSize,
|
||||
currentPage: currentPagination.currentPage,
|
||||
searchParams: [
|
||||
new RequestParam('relatedEntityType', relatedEntityType.label),
|
||||
],
|
||||
},
|
||||
true,
|
||||
true,
|
||||
|
Reference in New Issue
Block a user