mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-14 21:43:04 +00:00
fixed bug where going to the mydspace page broke
This commit is contained in:
@@ -113,7 +113,6 @@ export class RemoteDataBuildService {
|
||||
href$ = observableOf(href$);
|
||||
}
|
||||
|
||||
href$.subscribe(href => console.log('request url: ', href));
|
||||
const requestEntry$ = href$.pipe(getRequestFromRequestHref(this.requestService));
|
||||
const tDomainList$ = requestEntry$.pipe(
|
||||
getResourceLinksFromResponse(),
|
||||
|
@@ -197,7 +197,7 @@ export abstract class DataService<T extends CacheableObject> {
|
||||
}
|
||||
),
|
||||
switchMap((href) => this.requestService.getByHref(href)),
|
||||
skipWhile((requestEntry) => hasValue(requestEntry)),
|
||||
skipWhile((requestEntry) => hasValue(requestEntry) && requestEntry.completed),
|
||||
switchMap((href) =>
|
||||
this.rdbService.buildList<T>(hrefObs) as Observable<RemoteData<PaginatedList<T>>>
|
||||
)
|
||||
|
@@ -323,9 +323,9 @@ export class RelationshipService extends DataService<Relationship> {
|
||||
const { relation, type } = relationshipAndType;
|
||||
let updatedRelationship;
|
||||
if (relationshipLabel === type.leftwardType) {
|
||||
updatedRelationship = Object.assign(new Relationship(), relation, { rightwardValue: nameVariant });
|
||||
} else {
|
||||
updatedRelationship = Object.assign(new Relationship(), relation, { leftwardValue: nameVariant });
|
||||
} else {
|
||||
updatedRelationship = Object.assign(new Relationship(), relation, { rightwardValue: nameVariant });
|
||||
}
|
||||
return this.update(updatedRelationship);
|
||||
})
|
||||
|
@@ -47,7 +47,6 @@ export const getResponseFromEntry = () =>
|
||||
export const getResourceLinksFromResponse = () =>
|
||||
(source: Observable<RequestEntry>): Observable<string[]> =>
|
||||
source.pipe(
|
||||
tap((t) => console.log(t)),
|
||||
filterSuccessfulResponses(),
|
||||
map((response: DSOSuccessResponse) => response.resourceSelfLinks),
|
||||
);
|
||||
|
@@ -222,7 +222,6 @@ export class DsDynamicFormControlContainerComponent extends DynamicFormControlCo
|
||||
getRemoteDataPayload(),
|
||||
switchMap((submissionObject: SubmissionObject) => (submissionObject.item as Observable<RemoteData<Item>>).pipe(getSucceededRemoteData(), getRemoteDataPayload())),
|
||||
switchMap((item: Item) => this.relationService.getRelatedItemsByLabel(item, this.model.relationship.relationshipType)),
|
||||
tap((t) => console.log(t)),
|
||||
map((items: PaginatedList<Item>) => items.page.map((item) => Object.assign(new SearchResult(), { indexableObject: item }))),
|
||||
).subscribe((relatedItems: SearchResult<Item>[]) => this.selectableListService.select(this.listId, relatedItems));
|
||||
|
||||
|
Reference in New Issue
Block a user