mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-07 10:04:11 +00:00
113901: Store the retrieved Relationships in the store
This needs to be done here too, since tilted relationships won't be returned by the api/core/items/{uuid}/relationships endpoint
This commit is contained in:
@@ -160,7 +160,10 @@ describe('EditRelationshipListComponent', () => {
|
||||
getFieldUpdates: observableOf({
|
||||
[relationships[0].uuid]: fieldUpdate1,
|
||||
[relationships[1].uuid]: fieldUpdate2
|
||||
})
|
||||
}),
|
||||
// eslint-disable-next-line @typescript-eslint/no-empty-function
|
||||
initialize: () => {
|
||||
},
|
||||
}
|
||||
);
|
||||
|
||||
|
@@ -512,10 +512,15 @@ export class EditRelationshipListComponent implements OnInit, OnDestroy {
|
||||
false,
|
||||
true,
|
||||
...linksToFollow
|
||||
)),
|
||||
).subscribe((rd: RemoteData<PaginatedList<Relationship>>) => {
|
||||
),
|
||||
),
|
||||
tap((rd: RemoteData<PaginatedList<Relationship>>) => {
|
||||
this.relationshipsRd$.next(rd);
|
||||
})
|
||||
}),
|
||||
getFirstSucceededRemoteDataPayload(),
|
||||
).subscribe((relationshipPaginatedList: PaginatedList<Relationship>) => {
|
||||
this.objectUpdatesService.initialize(this.url, relationshipPaginatedList.page, new Date());
|
||||
}),
|
||||
);
|
||||
|
||||
// keep isLastPage$ up to date based on relationshipsRd$
|
||||
|
@@ -84,7 +84,7 @@
|
||||
<button class="btn btn-primary submit"
|
||||
[disabled]="(toAdd.length == 0 && toRemove.length == 0) || isPending"
|
||||
(click)="submitEv()">
|
||||
<span *ngIf="isPending" class="spinner-border spinner-border-sm" role="status"
|
||||
<span *ngIf="isPending" class="spinner-border spinner-border-sm mr-1" role="status"
|
||||
aria-hidden="true"></span>
|
||||
<i class="fas fa-save"></i>
|
||||
<span class="d-none d-sm-inline"> {{"item.edit.metadata.save-button" | translate}}</span>
|
||||
|
Reference in New Issue
Block a user