Skip to content

Commit 38916ae

Browse files
115434: Passed relatedEntityType parameter to byLabel endpoint
1 parent 404ccd9 commit 38916ae

1 file changed

Lines changed: 8 additions & 3 deletions

File tree

src/app/item-page/edit-item-page/item-relationships/edit-relationship-list/edit-relationship-list.component.ts

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ import { FieldUpdates } from '../../../../core/data/object-updates/field-updates
4141
import { FieldChangeType } from '../../../../core/data/object-updates/field-change-type.model';
4242
import { APP_CONFIG, AppConfig } from '../../../../../config/app-config.interface';
4343
import { itemLinksToFollow } from '../../../../shared/utils/relation-query.utils';
44+
import { RequestParam } from '../../../../core/cache/models/request-param.model';
4445

4546
@Component({
4647
selector: 'ds-edit-relationship-list',
@@ -499,15 +500,19 @@ export class EditRelationshipListComponent implements OnInit, OnDestroy {
499500
observableCombineLatest([
500501
currentPagination$,
501502
this.currentItemIsLeftItem$,
503+
this.relatedEntityType$,
502504
]).pipe(
503-
switchMap(([currentPagination, currentItemIsLeftItem]: [PaginationComponentOptions, boolean]) =>
504-
// get the relationships for the current item, relationshiptype and page
505+
switchMap(([currentPagination, currentItemIsLeftItem, relatedEntityType]: [PaginationComponentOptions, boolean, ItemType]) =>
506+
// get the relationships for the current page, item, relationship type and related entity type
505507
this.relationshipService.getItemRelationshipsByLabel(
506508
this.item,
507509
currentItemIsLeftItem ? this.relationshipType.leftwardType : this.relationshipType.rightwardType,
508510
{
509511
elementsPerPage: currentPagination.pageSize,
510-
currentPage: currentPagination.currentPage
512+
currentPage: currentPagination.currentPage,
513+
searchParams: [
514+
new RequestParam('relatedEntityType', relatedEntityType.label),
515+
],
511516
},
512517
false,
513518
true,

0 commit comments

Comments
 (0)