mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-07 18:14:17 +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,
|
AppConfig,
|
||||||
} from '../../../../../config/app-config.interface';
|
} from '../../../../../config/app-config.interface';
|
||||||
import { LinkService } from '../../../../core/cache/builders/link.service';
|
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 { FieldChangeType } from '../../../../core/data/object-updates/field-change-type.model';
|
||||||
import { FieldUpdate } from '../../../../core/data/object-updates/field-update.model';
|
import { FieldUpdate } from '../../../../core/data/object-updates/field-update.model';
|
||||||
import { FieldUpdates } from '../../../../core/data/object-updates/field-updates.model';
|
import { FieldUpdates } from '../../../../core/data/object-updates/field-updates.model';
|
||||||
@@ -494,15 +495,19 @@ export class EditRelationshipListComponent implements OnInit, OnDestroy {
|
|||||||
observableCombineLatest([
|
observableCombineLatest([
|
||||||
currentPagination$,
|
currentPagination$,
|
||||||
this.currentItemIsLeftItem$,
|
this.currentItemIsLeftItem$,
|
||||||
|
this.relatedEntityType$,
|
||||||
]).pipe(
|
]).pipe(
|
||||||
switchMap(([currentPagination, currentItemIsLeftItem]: [PaginationComponentOptions, boolean]) => {
|
switchMap(([currentPagination, currentItemIsLeftItem, relatedEntityType]: [PaginationComponentOptions, boolean, ItemType]) => {
|
||||||
// get the relationships for the current item, relationshiptype and page
|
// get the relationships for the current page, item, relationship type and related entity type
|
||||||
return this.relationshipService.getItemRelationshipsByLabel(
|
return this.relationshipService.getItemRelationshipsByLabel(
|
||||||
this.item,
|
this.item,
|
||||||
currentItemIsLeftItem ? this.relationshipType.leftwardType : this.relationshipType.rightwardType,
|
currentItemIsLeftItem ? this.relationshipType.leftwardType : this.relationshipType.rightwardType,
|
||||||
{
|
{
|
||||||
elementsPerPage: currentPagination.pageSize,
|
elementsPerPage: currentPagination.pageSize,
|
||||||
currentPage: currentPagination.currentPage,
|
currentPage: currentPagination.currentPage,
|
||||||
|
searchParams: [
|
||||||
|
new RequestParam('relatedEntityType', relatedEntityType.label),
|
||||||
|
],
|
||||||
},
|
},
|
||||||
true,
|
true,
|
||||||
true,
|
true,
|
||||||
|
Reference in New Issue
Block a user