Skip to content

Commit

Permalink
115434: Passed relatedEntityType parameter to byLabel endpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
alexandrevryghem authored and tdonohue committed Jun 7, 2024
1 parent 0d3db9f commit 31ab05f
Showing 1 changed file with 8 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ import { FieldChangeType } from '../../../../core/data/object-updates/field-chan
import { APP_CONFIG, AppConfig } from '../../../../../config/app-config.interface';
import { itemLinksToFollow } from '../../../../shared/utils/relation-query.utils';
import { EditItemRelationshipsService } from '../edit-item-relationships.service';
import { RequestParam } from '../../../../core/cache/models/request-param.model';

@Component({
selector: 'ds-edit-relationship-list',
Expand Down Expand Up @@ -464,15 +465,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
currentPage: currentPagination.currentPage,
searchParams: [
new RequestParam('relatedEntityType', relatedEntityType.label),
],
},
true,
true,
Expand Down

0 comments on commit 31ab05f

Please sign in to comment.