From 38916ae5e70f43b3176941ce2943248288bd0bf5 Mon Sep 17 00:00:00 2001 From: Alexandre Vryghem Date: Mon, 27 May 2024 00:27:25 +0200 Subject: [PATCH] 115434: Passed relatedEntityType parameter to byLabel endpoint --- .../edit-relationship-list.component.ts | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/app/item-page/edit-item-page/item-relationships/edit-relationship-list/edit-relationship-list.component.ts b/src/app/item-page/edit-item-page/item-relationships/edit-relationship-list/edit-relationship-list.component.ts index b8542f5806f..af1de9f3930 100644 --- a/src/app/item-page/edit-item-page/item-relationships/edit-relationship-list/edit-relationship-list.component.ts +++ b/src/app/item-page/edit-item-page/item-relationships/edit-relationship-list/edit-relationship-list.component.ts @@ -41,6 +41,7 @@ import { FieldUpdates } from '../../../../core/data/object-updates/field-updates import { FieldChangeType } from '../../../../core/data/object-updates/field-change-type.model'; import { APP_CONFIG, AppConfig } from '../../../../../config/app-config.interface'; import { itemLinksToFollow } from '../../../../shared/utils/relation-query.utils'; +import { RequestParam } from '../../../../core/cache/models/request-param.model'; @Component({ selector: 'ds-edit-relationship-list', @@ -499,15 +500,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 this.relationshipService.getItemRelationshipsByLabel( this.item, currentItemIsLeftItem ? this.relationshipType.leftwardType : this.relationshipType.rightwardType, { elementsPerPage: currentPagination.pageSize, - currentPage: currentPagination.currentPage + currentPage: currentPagination.currentPage, + searchParams: [ + new RequestParam('relatedEntityType', relatedEntityType.label), + ], }, false, true,