From 06665dc31f26a8522ab741579d5a9378f729d8a4 Mon Sep 17 00:00:00 2001 From: Yana De Pauw Date: Tue, 28 May 2024 15:53:00 +0200 Subject: [PATCH 1/5] 115284: Fix issue with same type relationships --- .../edit-item-relationships.service.spec.ts | 89 +++++++++++++ .../edit-item-relationships.service.ts | 51 +++++++- ...t-relationship-list-wrapper.component.html | 30 +++++ ...t-relationship-list-wrapper.component.scss | 0 ...elationship-list-wrapper.component.spec.ts | 121 ++++++++++++++++++ ...dit-relationship-list-wrapper.component.ts | 114 +++++++++++++++++ .../edit-relationship-list.component.spec.ts | 9 +- .../edit-relationship-list.component.ts | 40 ++---- .../item-relationships.component.html | 4 +- .../item-relationships.component.ts | 2 + ...namic-lookup-relation-modal.component.html | 1 + ...dynamic-lookup-relation-modal.component.ts | 5 + ...-lookup-relation-search-tab.component.html | 1 + ...ic-lookup-relation-search-tab.component.ts | 5 + ...ic-lookup-relation-search-tab.component.ts | 4 +- .../shared/search/search.component.spec.ts | 2 + src/app/shared/search/search.component.ts | 19 ++- .../shared/search/themed-search.component.ts | 3 + 18 files changed, 463 insertions(+), 37 deletions(-) create mode 100644 src/app/item-page/edit-item-page/item-relationships/edit-relationship-list-wrapper/edit-relationship-list-wrapper.component.html create mode 100644 src/app/item-page/edit-item-page/item-relationships/edit-relationship-list-wrapper/edit-relationship-list-wrapper.component.scss create mode 100644 src/app/item-page/edit-item-page/item-relationships/edit-relationship-list-wrapper/edit-relationship-list-wrapper.component.spec.ts create mode 100644 src/app/item-page/edit-item-page/item-relationships/edit-relationship-list-wrapper/edit-relationship-list-wrapper.component.ts diff --git a/src/app/item-page/edit-item-page/item-relationships/edit-item-relationships.service.spec.ts b/src/app/item-page/edit-item-page/item-relationships/edit-item-relationships.service.spec.ts index f9694167838..835e3d4559a 100644 --- a/src/app/item-page/edit-item-page/item-relationships/edit-item-relationships.service.spec.ts +++ b/src/app/item-page/edit-item-page/item-relationships/edit-item-relationships.service.spec.ts @@ -265,6 +265,95 @@ describe('EditItemRelationshipsService', () => { }); }); + describe('isProvidedItemTypeLeftType', () => { + it('should return true if the provided item corresponds to the left type of the relationship', (done) => { + const relationshipType = Object.assign(new RelationshipType(), { + leftType: createSuccessfulRemoteDataObject$({ id: 'leftType' }), + rightType: createSuccessfulRemoteDataObject$({ id: 'rightType' }), + }); + const itemType = Object.assign(new ItemType(), { id: 'leftType' } ); + const item = Object.assign(new Item(), { uuid: 'item-uuid' }); + + const result = service.isProvidedItemTypeLeftType(relationshipType, itemType, item); + result.subscribe((resultValue) => { + expect(resultValue).toBeTrue(); + done(); + }); + }); + + it('should return false if the provided item corresponds to the right type of the relationship', (done) => { + const relationshipType = Object.assign(new RelationshipType(), { + leftType: createSuccessfulRemoteDataObject$({ id: 'leftType' }), + rightType: createSuccessfulRemoteDataObject$({ id: 'rightType' }), + }); + const itemType = Object.assign(new ItemType(), { id: 'rightType' } ); + const item = Object.assign(new Item(), { uuid: 'item-uuid' }); + + const result = service.isProvidedItemTypeLeftType(relationshipType, itemType, item); + result.subscribe((resultValue) => { + expect(resultValue).toBeFalse(); + done(); + }); + }); + + it('should return undefined if the provided item corresponds does not match any of the relationship types', (done) => { + const relationshipType = Object.assign(new RelationshipType(), { + leftType: createSuccessfulRemoteDataObject$({ id: 'leftType' }), + rightType: createSuccessfulRemoteDataObject$({ id: 'rightType' }), + }); + const itemType = Object.assign(new ItemType(), { id: 'something-else' } ); + const item = Object.assign(new Item(), { uuid: 'item-uuid' }); + + const result = service.isProvidedItemTypeLeftType(relationshipType, itemType, item); + result.subscribe((resultValue) => { + expect(resultValue).toBeUndefined(); + done(); + }); + }); + }); + + describe('relationshipMatchesBothSameTypes', () => { + it('should return true if both left and right type of the relationship type are the same and match the provided itemtype', (done) => { + const relationshipType = Object.assign(new RelationshipType(), { + leftType: createSuccessfulRemoteDataObject$({ id: 'sameType' }), + rightType: createSuccessfulRemoteDataObject$({ id:'sameType' }), + }); + const itemType = Object.assign(new ItemType(), { id: 'sameType' } ); + + const result = service.relationshipMatchesBothSameTypes(relationshipType, itemType); + result.subscribe((resultValue) => { + expect(resultValue).toBeTrue(); + done(); + }); + }); + it('should return false if both left and right type of the relationship type are the same and do not match the provided itemtype', (done) => { + const relationshipType = Object.assign(new RelationshipType(), { + leftType: createSuccessfulRemoteDataObject$({ id: 'sameType' }), + rightType: createSuccessfulRemoteDataObject$({ id: 'sameType' }), + }); + const itemType = Object.assign(new ItemType(), { id: 'something-else' } ); + + const result = service.relationshipMatchesBothSameTypes(relationshipType, itemType); + result.subscribe((resultValue) => { + expect(resultValue).toBeFalse(); + done(); + }); + }); + it('should return false if both left and right type of the relationship type are different', (done) => { + const relationshipType = Object.assign(new RelationshipType(), { + leftType: createSuccessfulRemoteDataObject$({ id: 'leftType' }), + rightType: createSuccessfulRemoteDataObject$({ id: 'rightType' }), + }); + const itemType = Object.assign(new ItemType(), { id: 'leftType' } ); + + const result = service.relationshipMatchesBothSameTypes(relationshipType, itemType); + result.subscribe((resultValue) => { + expect(resultValue).toBeFalse(); + done(); + }); + }); + }); + describe('displayNotifications', () => { it('should show one success notification when multiple requests succeeded', () => { service.displayNotifications([ diff --git a/src/app/item-page/edit-item-page/item-relationships/edit-item-relationships.service.ts b/src/app/item-page/edit-item-page/item-relationships/edit-item-relationships.service.ts index 14fa226bf41..b55ee60cae5 100644 --- a/src/app/item-page/edit-item-page/item-relationships/edit-item-relationships.service.ts +++ b/src/app/item-page/edit-item-page/item-relationships/edit-item-relationships.service.ts @@ -3,6 +3,7 @@ import { NgbModal } from '@ng-bootstrap/ng-bootstrap'; import { TranslateService } from '@ngx-translate/core'; import { BehaviorSubject, + combineLatest as observableCombineLatest, EMPTY, Observable, Subscription, @@ -28,8 +29,14 @@ import { ObjectUpdatesService } from '../../../core/data/object-updates/object-u import { RelationshipDataService } from '../../../core/data/relationship-data.service'; import { RemoteData } from '../../../core/data/remote-data'; import { Item } from '../../../core/shared/item.model'; +import { ItemType } from '../../../core/shared/item-relationships/item-type.model'; import { Relationship } from '../../../core/shared/item-relationships/relationship.model'; +import { RelationshipType } from '../../../core/shared/item-relationships/relationship-type.model'; import { NoContent } from '../../../core/shared/NoContent.model'; +import { + getFirstSucceededRemoteData, + getRemoteDataPayload, +} from '../../../core/shared/operators'; import { hasValue } from '../../../shared/empty.util'; import { NotificationsService } from '../../../shared/notifications/notifications.service'; @@ -181,6 +188,49 @@ export class EditItemRelationshipsService { } } + isProvidedItemTypeLeftType(relationshipType: RelationshipType, itemType: ItemType, item: Item): Observable { + return this.getRelationshipLeftAndRightType(relationshipType).pipe( + map(([leftType, rightType]: [ItemType, ItemType]) => { + if (leftType.id === itemType.id) { + return true; + } + + if (rightType.id === itemType.id) { + return false; + } + + // should never happen... + console.warn(`The item ${item.uuid} is not on the right or the left side of relationship type ${relationshipType.uuid}`); + return undefined; + }), + ); + } + + relationshipMatchesBothSameTypes(relationshipType: RelationshipType, itemType: ItemType): Observable { + return this.getRelationshipLeftAndRightType(relationshipType).pipe( + map(([leftType, rightType]: [ItemType, ItemType]) => { + return leftType.id === itemType.id && rightType.id === itemType.id; + }), + ); + } + + protected getRelationshipLeftAndRightType(relationshipType: RelationshipType): Observable<[ItemType, ItemType]> { + const leftType$: Observable = relationshipType.leftType.pipe( + getFirstSucceededRemoteData(), + getRemoteDataPayload(), + ); + + const rightType$: Observable = relationshipType.rightType.pipe( + getFirstSucceededRemoteData(), + getRemoteDataPayload(), + ); + + return observableCombineLatest([ + leftType$, + rightType$, + ]); + } + /** @@ -197,6 +247,5 @@ export class EditItemRelationshipsService { */ getNotificationContent(key: string): string { return this.translateService.instant(this.notificationsPrefix + key + '.content'); - } } diff --git a/src/app/item-page/edit-item-page/item-relationships/edit-relationship-list-wrapper/edit-relationship-list-wrapper.component.html b/src/app/item-page/edit-item-page/item-relationships/edit-relationship-list-wrapper/edit-relationship-list-wrapper.component.html new file mode 100644 index 00000000000..ec6aa6cef27 --- /dev/null +++ b/src/app/item-page/edit-item-page/item-relationships/edit-relationship-list-wrapper/edit-relationship-list-wrapper.component.html @@ -0,0 +1,30 @@ + + + + + + + + + diff --git a/src/app/item-page/edit-item-page/item-relationships/edit-relationship-list-wrapper/edit-relationship-list-wrapper.component.scss b/src/app/item-page/edit-item-page/item-relationships/edit-relationship-list-wrapper/edit-relationship-list-wrapper.component.scss new file mode 100644 index 00000000000..e69de29bb2d diff --git a/src/app/item-page/edit-item-page/item-relationships/edit-relationship-list-wrapper/edit-relationship-list-wrapper.component.spec.ts b/src/app/item-page/edit-item-page/item-relationships/edit-relationship-list-wrapper/edit-relationship-list-wrapper.component.spec.ts new file mode 100644 index 00000000000..8c3e03add6b --- /dev/null +++ b/src/app/item-page/edit-item-page/item-relationships/edit-relationship-list-wrapper/edit-relationship-list-wrapper.component.spec.ts @@ -0,0 +1,121 @@ +import { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core'; +import { + ComponentFixture, + TestBed, + waitForAsync, +} from '@angular/core/testing'; +import { By } from '@angular/platform-browser'; +import { of as observableOf } from 'rxjs'; + +import { Item } from '../../../../core/shared/item.model'; +import { ItemType } from '../../../../core/shared/item-relationships/item-type.model'; +import { RelationshipType } from '../../../../core/shared/item-relationships/relationship-type.model'; +import { createSuccessfulRemoteDataObject$ } from '../../../../shared/remote-data.utils'; +import { EditItemRelationshipsService } from '../edit-item-relationships.service'; +import { EditRelationshipListComponent } from '../edit-relationship-list/edit-relationship-list.component'; +import { EditRelationshipListWrapperComponent } from './edit-relationship-list-wrapper.component'; + +describe('EditRelationshipListWrapperComponent', () => { + let editItemRelationshipsService: EditItemRelationshipsService; + let comp: EditRelationshipListWrapperComponent; + let fixture: ComponentFixture; + + const leftType = Object.assign(new ItemType(), { id: 'leftType', label: 'leftTypeString' }); + const rightType = Object.assign(new ItemType(), { id: 'rightType', label: 'rightTypeString' }); + + const relationshipType = Object.assign(new RelationshipType(), { + id: '1', + leftMaxCardinality: null, + leftMinCardinality: 0, + leftType: createSuccessfulRemoteDataObject$(leftType), + leftwardType: 'isOrgUnitOfOrgUnit', + rightMaxCardinality: null, + rightMinCardinality: 0, + rightType: createSuccessfulRemoteDataObject$(rightType), + rightwardType: 'isOrgUnitOfOrgUnit', + uuid: 'relationshiptype-1', + }); + + const item = Object.assign(new Item(), { uuid: 'item-uuid' }); + + beforeEach(waitForAsync(() => { + + editItemRelationshipsService = jasmine.createSpyObj('editItemRelationshipsService', { + isProvidedItemTypeLeftType: observableOf(true), + relationshipMatchesBothSameTypes: observableOf(false), + }); + + + TestBed.configureTestingModule({ + imports: [ + EditRelationshipListWrapperComponent, + ], + providers: [ + { provide: EditItemRelationshipsService, useValue: editItemRelationshipsService }, + ], + schemas: [ + CUSTOM_ELEMENTS_SCHEMA, + ], + }).overrideComponent(EditRelationshipListWrapperComponent, { + remove: { + imports: [ + EditRelationshipListComponent, + ], + }, + }).compileComponents(); + + })); + + beforeEach(() => { + fixture = TestBed.createComponent(EditRelationshipListWrapperComponent); + comp = fixture.componentInstance; + comp.relationshipType = relationshipType; + comp.itemType = leftType; + comp.item = item; + + fixture.detectChanges(); + }); + + describe('onInit', () => { + it('should render the component', () => { + expect(comp).toBeTruthy(); + }); + it('should set currentItemIsLeftItem$ and bothItemsMatchType$ based on the provided relationshipType, itemType and item', () => { + expect(editItemRelationshipsService.isProvidedItemTypeLeftType).toHaveBeenCalledWith(relationshipType, leftType, item); + expect(editItemRelationshipsService.relationshipMatchesBothSameTypes).toHaveBeenCalledWith(relationshipType, leftType); + + expect(comp.currentItemIsLeftItem$.getValue()).toEqual(true); + expect(comp.bothItemsMatchType$.getValue()).toEqual(false); + }); + }); + + describe('when the current item is left', () => { + it('should render one relationship list section', () => { + const relationshipLists = fixture.debugElement.queryAll(By.css('ds-edit-relationship-list')); + expect(relationshipLists.length).toEqual(1); + }); + }); + + describe('when the current item is right', () => { + it('should render one relationship list section', () => { + (editItemRelationshipsService.isProvidedItemTypeLeftType as jasmine.Spy).and.returnValue(observableOf(false)); + comp.ngOnInit(); + fixture.detectChanges(); + + const relationshipLists = fixture.debugElement.queryAll(By.css('ds-edit-relationship-list')); + expect(relationshipLists.length).toEqual(1); + }); + }); + + describe('when the current item is both left and right', () => { + it('should render two relationship list sections', () => { + (editItemRelationshipsService.relationshipMatchesBothSameTypes as jasmine.Spy).and.returnValue(observableOf(true)); + comp.ngOnInit(); + fixture.detectChanges(); + + const relationshipLists = fixture.debugElement.queryAll(By.css('ds-edit-relationship-list')); + expect(relationshipLists.length).toEqual(2); + }); + }); + +}); diff --git a/src/app/item-page/edit-item-page/item-relationships/edit-relationship-list-wrapper/edit-relationship-list-wrapper.component.ts b/src/app/item-page/edit-item-page/item-relationships/edit-relationship-list-wrapper/edit-relationship-list-wrapper.component.ts new file mode 100644 index 00000000000..f2cb790ff8d --- /dev/null +++ b/src/app/item-page/edit-item-page/item-relationships/edit-relationship-list-wrapper/edit-relationship-list-wrapper.component.ts @@ -0,0 +1,114 @@ +import { + AsyncPipe, + NgIf, +} from '@angular/common'; +import { + Component, + EventEmitter, + Input, + OnDestroy, + OnInit, + Output, +} from '@angular/core'; +import { + BehaviorSubject, + Observable, + Subscription, +} from 'rxjs'; + +import { Item } from '../../../../core/shared/item.model'; +import { ItemType } from '../../../../core/shared/item-relationships/item-type.model'; +import { RelationshipType } from '../../../../core/shared/item-relationships/relationship-type.model'; +import { hasValue } from '../../../../shared/empty.util'; +import { EditItemRelationshipsService } from '../edit-item-relationships.service'; +import { EditRelationshipListComponent } from '../edit-relationship-list/edit-relationship-list.component'; + +@Component({ + selector: 'ds-edit-relationship-list-wrapper', + styleUrls: ['./edit-relationship-list-wrapper.component.scss'], + templateUrl: './edit-relationship-list-wrapper.component.html', + standalone: true, + imports: [ + AsyncPipe, + EditRelationshipListComponent, + NgIf, + ], +}) +/** + * A component creating a list of editable relationships of a certain type + * The relationships are rendered as a list of related items + */ +export class EditRelationshipListWrapperComponent implements OnInit, OnDestroy { + + /** + * The item to display related items for + */ + @Input() item: Item; + + @Input() itemType: ItemType; + + /** + * The URL to the current page + * Used to fetch updates for the current item from the store + */ + @Input() url: string; + + /** + * The label of the relationship-type we're rendering a list for + */ + @Input() relationshipType: RelationshipType; + + /** + * If updated information has changed + */ + @Input() hasChanges!: Observable; + + /** + * The event emmiter to submit the new information + */ + @Output() submitModal: EventEmitter = new EventEmitter(); + + /** + * Observable that emits true if {@link itemType} is on the left-hand side of {@link relationshipType}, + * false if it is on the right-hand side and undefined in the rare case that it is on neither side. + */ + currentItemIsLeftItem$: BehaviorSubject = new BehaviorSubject(undefined); + + + isLeftItem$ = new BehaviorSubject(true); + + isRightItem$ = new BehaviorSubject(false); + + bothItemsMatchType$: BehaviorSubject = new BehaviorSubject(undefined); + + /** + * Array to track all subscriptions and unsubscribe them onDestroy + * @type {Array} + */ + private subs: Subscription[] = []; + + constructor( + protected editItemRelationshipsService: EditItemRelationshipsService, + ) { + } + + + ngOnInit(): void { + this.subs.push(this.editItemRelationshipsService.isProvidedItemTypeLeftType(this.relationshipType, this.itemType, this.item) + .subscribe((nextValue: boolean) => { + this.currentItemIsLeftItem$.next(nextValue); + })); + + this.subs.push(this.editItemRelationshipsService.relationshipMatchesBothSameTypes(this.relationshipType, this.itemType) + .subscribe((nextValue: boolean) => { + this.bothItemsMatchType$.next(nextValue); + })); + } + + + ngOnDestroy(): void { + this.subs + .filter((subscription) => hasValue(subscription)) + .forEach((subscription) => subscription.unsubscribe()); + } +} diff --git a/src/app/item-page/edit-item-page/item-relationships/edit-relationship-list/edit-relationship-list.component.spec.ts b/src/app/item-page/edit-item-page/item-relationships/edit-relationship-list/edit-relationship-list.component.spec.ts index 2d2f7f627bb..48415000be6 100644 --- a/src/app/item-page/edit-item-page/item-relationships/edit-relationship-list/edit-relationship-list.component.spec.ts +++ b/src/app/item-page/edit-item-page/item-relationships/edit-relationship-list/edit-relationship-list.component.spec.ts @@ -15,7 +15,10 @@ import { import { provideMockStore } from '@ngrx/store/testing'; import { TranslateModule } from '@ngx-translate/core'; import { cold } from 'jasmine-marbles'; -import { of as observableOf } from 'rxjs'; +import { + BehaviorSubject, + of as observableOf, +} from 'rxjs'; import { APP_CONFIG } from '../../../../../config/app-config.interface'; import { environment } from '../../../../../environments/environment.test'; @@ -82,6 +85,7 @@ describe('EditRelationshipListComponent', () => { let relationships: Relationship[]; let relationshipType: RelationshipType; let paginationOptions: PaginationComponentOptions; + let currentItemIsLeftItem$ = new BehaviorSubject(true); const resetComponent = () => { fixture = TestBed.createComponent(EditRelationshipListComponent); @@ -92,6 +96,7 @@ describe('EditRelationshipListComponent', () => { comp.url = url; comp.relationshipType = relationshipType; comp.hasChanges = observableOf(false); + comp.currentItemIsLeftItem$ = currentItemIsLeftItem$; fixture.detectChanges(); }; @@ -328,6 +333,7 @@ describe('EditRelationshipListComponent', () => { leftwardType: 'isAuthorOfPublication', rightwardType: 'isPublicationOfAuthor', }); + currentItemIsLeftItem$ = new BehaviorSubject(true); relationshipService.getItemRelationshipsByLabel.calls.reset(); resetComponent(); }); @@ -352,6 +358,7 @@ describe('EditRelationshipListComponent', () => { leftwardType: 'isPublicationOfAuthor', rightwardType: 'isAuthorOfPublication', }); + currentItemIsLeftItem$ = new BehaviorSubject(false); relationshipService.getItemRelationshipsByLabel.calls.reset(); resetComponent(); }); 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 6f817bbdbca..2c6872b07ab 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 @@ -143,7 +143,7 @@ export class EditRelationshipListComponent implements OnInit, OnDestroy { * Observable that emits true if {@link itemType} is on the left-hand side of {@link relationshipType}, * false if it is on the right-hand side and undefined in the rare case that it is on neither side. */ - private currentItemIsLeftItem$: BehaviorSubject = new BehaviorSubject(undefined); + @Input() currentItemIsLeftItem$: BehaviorSubject = new BehaviorSubject(undefined); relatedEntityType$: Observable; @@ -243,17 +243,14 @@ export class EditRelationshipListComponent implements OnInit, OnDestroy { * Get the relevant label for this relationship type */ private getLabel(): Observable { - return observableCombineLatest([ - this.relationshipType.leftType, - this.relationshipType.rightType, - ].map((itemTypeRD) => itemTypeRD.pipe( - getFirstSucceededRemoteData(), - getRemoteDataPayload(), - ))).pipe( - map((itemTypes: ItemType[]) => [ - this.relationshipType.leftwardType, - this.relationshipType.rightwardType, - ][itemTypes.findIndex((itemType) => itemType.id === this.itemType.id)]), + return this.currentItemIsLeftItem$.pipe( + map((currentItemIsLeftItem) => { + if (currentItemIsLeftItem) { + return this.relationshipType.leftwardType; + } else { + return this.relationshipType.rightwardType; + } + }), ); } @@ -281,6 +278,7 @@ export class EditRelationshipListComponent implements OnInit, OnDestroy { modalComp.toAdd = []; modalComp.toRemove = []; modalComp.isPending = false; + modalComp.hiddenQuery = '-search.resourceid:' + this.item.uuid; this.item.owningCollection.pipe( getFirstSucceededRemoteDataPayload(), @@ -454,24 +452,6 @@ export class EditRelationshipListComponent implements OnInit, OnDestroy { this.relationshipMessageKey$ = this.getRelationshipMessageKey(); - this.subs.push(this.relationshipLeftAndRightType$.pipe( - map(([leftType, rightType]: [ItemType, ItemType]) => { - if (leftType.id === this.itemType.id) { - return true; - } - - if (rightType.id === this.itemType.id) { - return false; - } - - // should never happen... - console.warn(`The item ${this.item.uuid} is not on the right or the left side of relationship type ${this.relationshipType.uuid}`); - return undefined; - }), - ).subscribe((nextValue: boolean) => { - this.currentItemIsLeftItem$.next(nextValue); - })); - // initialize the pagination options this.paginationConfig = new PaginationComponentOptions(); diff --git a/src/app/item-page/edit-item-page/item-relationships/item-relationships.component.html b/src/app/item-page/edit-item-page/item-relationships/item-relationships.component.html index 53eb412a8fa..4c8ea49f993 100644 --- a/src/app/item-page/edit-item-page/item-relationships/item-relationships.component.html +++ b/src/app/item-page/edit-item-page/item-relationships/item-relationships.component.html @@ -5,13 +5,13 @@
- + >
diff --git a/src/app/item-page/edit-item-page/item-relationships/item-relationships.component.ts b/src/app/item-page/edit-item-page/item-relationships/item-relationships.component.ts index 051c4db1361..7b0cc466474 100644 --- a/src/app/item-page/edit-item-page/item-relationships/item-relationships.component.ts +++ b/src/app/item-page/edit-item-page/item-relationships/item-relationships.component.ts @@ -50,6 +50,7 @@ import { compareArraysUsingIds } from '../../simple/item-types/shared/item-relat import { AbstractItemUpdateComponent } from '../abstract-item-update/abstract-item-update.component'; import { EditItemRelationshipsService } from './edit-item-relationships.service'; import { EditRelationshipListComponent } from './edit-relationship-list/edit-relationship-list.component'; +import { EditRelationshipListWrapperComponent } from './edit-relationship-list-wrapper/edit-relationship-list-wrapper.component'; @Component({ selector: 'ds-item-relationships', @@ -65,6 +66,7 @@ import { EditRelationshipListComponent } from './edit-relationship-list/edit-rel ThemedLoadingComponent, TranslateModule, VarDirective, + EditRelationshipListWrapperComponent, ], standalone: true, }) diff --git a/src/app/shared/form/builder/ds-dynamic-form-ui/relation-lookup-modal/dynamic-lookup-relation-modal.component.html b/src/app/shared/form/builder/ds-dynamic-form-ui/relation-lookup-modal/dynamic-lookup-relation-modal.component.html index 90c4a41ffd1..cef8516b847 100644 --- a/src/app/shared/form/builder/ds-dynamic-form-ui/relation-lookup-modal/dynamic-lookup-relation-modal.component.html +++ b/src/app/shared/form/builder/ds-dynamic-form-ui/relation-lookup-modal/dynamic-lookup-relation-modal.component.html @@ -19,6 +19,7 @@