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 62af521421..8ea5b09729 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 @@ -310,13 +310,13 @@ export class EditRelationshipListComponent implements OnInit, OnDestroy { modalComp.discardEv = () => { - modalComp.toAdd.forEach((searchResult)=>{ + modalComp.toAdd.forEach( (searchResult) => { this.selectableListService.deselectSingle(this.listId,searchResult); - }) + }); - modalComp.toRemove.forEach((searchResult)=>{ + modalComp.toRemove.forEach( (searchResult) => { this.selectableListService.selectSingle(this.listId,searchResult); - }) + }); modalComp.toAdd = []; modalComp.toRemove = []; diff --git a/src/app/shared/form/builder/ds-dynamic-form-ui/relation-lookup-modal/dynamic-lookup-relation-modal.component.ts b/src/app/shared/form/builder/ds-dynamic-form-ui/relation-lookup-modal/dynamic-lookup-relation-modal.component.ts index 29e403ee55..55cd43fc3c 100644 --- a/src/app/shared/form/builder/ds-dynamic-form-ui/relation-lookup-modal/dynamic-lookup-relation-modal.component.ts +++ b/src/app/shared/form/builder/ds-dynamic-form-ui/relation-lookup-modal/dynamic-lookup-relation-modal.component.ts @@ -168,7 +168,6 @@ export class DsDynamicLookupRelationModalComponent implements OnInit, OnDestroy } ngOnInit(): void { - console.log(this.toRemove); if (!!this.currentItemIsLeftItem$) { this.currentItemIsLeftItem$.subscribe((isLeft) => { this.isLeft = isLeft; diff --git a/src/app/shared/form/builder/ds-dynamic-form-ui/relation-lookup-modal/search-tab/dynamic-lookup-relation-search-tab.component.ts b/src/app/shared/form/builder/ds-dynamic-form-ui/relation-lookup-modal/search-tab/dynamic-lookup-relation-search-tab.component.ts index 46e8d2b7e8..96af591540 100644 --- a/src/app/shared/form/builder/ds-dynamic-form-ui/relation-lookup-modal/search-tab/dynamic-lookup-relation-search-tab.component.ts +++ b/src/app/shared/form/builder/ds-dynamic-form-ui/relation-lookup-modal/search-tab/dynamic-lookup-relation-search-tab.component.ts @@ -270,9 +270,9 @@ export class DsDynamicLookupRelationSearchTabComponent implements OnInit, OnDest return this.getRelatedItem(uuid,resultListOfItems); }); - selectableObject = selectableObject.filter((selObject)=>{ + selectableObject = selectableObject.filter( (selObject) => { return !this.getIfInRemove(selObject.indexableObject.uuid); - }) + }); if ( selectableObject.length > 0 ) { this.selectableListService.select(this.listId, selectableObject); @@ -298,7 +298,7 @@ export class DsDynamicLookupRelationSearchTabComponent implements OnInit, OnDest } getIfInRemove(uuid: string) { - return !!this.toRemove.find((searchResult)=> searchResult.indexableObject.uuid == uuid); + return !!this.toRemove.find( (searchResult) => searchResult.indexableObject.uuid === uuid); } ngOnDestroy(): void {