Skip to content

Commit 31ab05f

Browse files
alexandrevryghemtdonohue
authored andcommitted
115434: Passed relatedEntityType parameter to byLabel endpoint
1 parent 0d3db9f commit 31ab05f

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
@@ -64,6 +64,7 @@ import { FieldChangeType } from '../../../../core/data/object-updates/field-chan
6464
import { APP_CONFIG, AppConfig } from '../../../../../config/app-config.interface';
6565
import { itemLinksToFollow } from '../../../../shared/utils/relation-query.utils';
6666
import { EditItemRelationshipsService } from '../edit-item-relationships.service';
67+
import { RequestParam } from '../../../../core/cache/models/request-param.model';
6768

6869
@Component({
6970
selector: 'ds-edit-relationship-list',
@@ -464,15 +465,19 @@ export class EditRelationshipListComponent implements OnInit, OnDestroy {
464465
observableCombineLatest([
465466
currentPagination$,
466467
this.currentItemIsLeftItem$,
468+
this.relatedEntityType$,
467469
]).pipe(
468-
switchMap(([currentPagination, currentItemIsLeftItem]: [PaginationComponentOptions, boolean]) => {
469-
// get the relationships for the current item, relationshiptype and page
470+
switchMap(([currentPagination, currentItemIsLeftItem, relatedEntityType]: [PaginationComponentOptions, boolean, ItemType]) => {
471+
// get the relationships for the current page, item, relationship type and related entity type
470472
return this.relationshipService.getItemRelationshipsByLabel(
471473
this.item,
472474
currentItemIsLeftItem ? this.relationshipType.leftwardType : this.relationshipType.rightwardType,
473475
{
474476
elementsPerPage: currentPagination.pageSize,
475-
currentPage: currentPagination.currentPage
477+
currentPage: currentPagination.currentPage,
478+
searchParams: [
479+
new RequestParam('relatedEntityType', relatedEntityType.label),
480+
],
476481
},
477482
true,
478483
true,

0 commit comments

Comments
 (0)