mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-07 10:04:11 +00:00
[CST-4504] Fixed issue for submission, removed tab when editing relationships, removed unused code & improved checking for remote data completed
This commit is contained in:
@@ -276,32 +276,6 @@ export class EditRelationshipListComponent implements OnInit, OnDestroy {
|
||||
});
|
||||
|
||||
this.selectableListService.deselectAll(this.listId);
|
||||
this.updates$.pipe(
|
||||
switchMap((updates) =>
|
||||
Object.values(updates).length > 0 ?
|
||||
observableCombineLatest(
|
||||
Object.values(updates)
|
||||
.filter((update) => update.changeType !== FieldChangeType.REMOVE)
|
||||
.map((update) => {
|
||||
const field = update.field as RelationshipIdentifiable;
|
||||
if (field.relationship) {
|
||||
return this.getRelatedItem(field.relationship);
|
||||
} else {
|
||||
return observableOf(field.relatedItem);
|
||||
}
|
||||
})
|
||||
) : observableOf([])
|
||||
),
|
||||
take(1),
|
||||
map((items) => items.map((item) => {
|
||||
const searchResult = new ItemSearchResult();
|
||||
searchResult.indexableObject = item;
|
||||
searchResult.hitHighlights = {};
|
||||
return searchResult;
|
||||
})),
|
||||
).subscribe((items) => {
|
||||
// this.selectableListService.select(this.listId, items);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
|
@@ -44,7 +44,7 @@
|
||||
</ds-dynamic-lookup-relation-external-source-tab>
|
||||
</ng-template>
|
||||
</ngb-tab>
|
||||
<ngb-tab [disabled]="isEditRelationship" [title]="'submission.sections.describe.relationship-lookup.selection-tab.tab-title' | translate : {count: (selection$ | async)?.length}">
|
||||
<ngb-tab *ngIf="!isEditRelationship" [title]="'submission.sections.describe.relationship-lookup.selection-tab.tab-title' | translate : {count: (selection$ | async)?.length}">
|
||||
<ng-template ngbTabContent>
|
||||
<ds-dynamic-lookup-relation-selection-tab
|
||||
[selection$]="selection$"
|
||||
|
@@ -154,9 +154,11 @@ export class DsDynamicLookupRelationModalComponent implements OnInit, OnDestroy
|
||||
|
||||
ngOnInit(): void {
|
||||
|
||||
this.currentItemIsLeftItem$.subscribe((isLeft) => {
|
||||
this.isLeft = isLeft;
|
||||
});
|
||||
if(!!this.currentItemIsLeftItem$){
|
||||
this.currentItemIsLeftItem$.subscribe((isLeft) => {
|
||||
this.isLeft = isLeft;
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
this.selection$ = this.selectableListService
|
||||
|
@@ -167,7 +167,7 @@ export class DsDynamicLookupRelationSearchTabComponent implements OnInit, OnDest
|
||||
switchMap((options) => this.lookupRelationService.getLocalResults(this.relationship, options).pipe(
|
||||
startWith(undefined),
|
||||
tap( res => {
|
||||
if ( !!res && res.state === 'Success' && this.isEditRelationship ) {
|
||||
if ( !!res && res.hasSucceeded && this.isEditRelationship ) {
|
||||
const idOfItems = res.payload.page.map( itemSearchResult => {
|
||||
return itemSearchResult.indexableObject.uuid;
|
||||
});
|
||||
|
Reference in New Issue
Block a user