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