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 committed May 26, 2024
1 parent 404ccd9 commit 38916ae
Showing 1 changed file with 8 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down Expand Up @@ -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,
Expand Down

0 comments on commit 38916ae

Please sign in to comment.