mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-18 07:23:03 +00:00
Several fixes after merge with main
This commit is contained in:
@@ -2,9 +2,8 @@ import { Component, OnDestroy, OnInit } from '@angular/core';
|
||||
import { FormBuilder } from '@angular/forms';
|
||||
import { Router } from '@angular/router';
|
||||
import { TranslateService } from '@ngx-translate/core';
|
||||
import { BehaviorSubject, combineLatest as observableCombineLatest, Subscription, Observable, of as observableOf } from 'rxjs';
|
||||
import { filter } from 'rxjs/internal/operators/filter';
|
||||
import { ObservedValueOf } from 'rxjs/internal/types';
|
||||
import { BehaviorSubject, combineLatest as observableCombineLatest, Subscription, Observable, ObservedValueOf, of as observableOf } from 'rxjs';
|
||||
import { filter } from 'rxjs/operators';
|
||||
import { catchError, map, switchMap, take } from 'rxjs/operators';
|
||||
import { DSpaceObjectDataService } from '../../../core/data/dspace-object-data.service';
|
||||
import { AuthorizationDataService } from '../../../core/data/feature-authorization/authorization-data.service';
|
||||
@@ -134,10 +133,10 @@ export class GroupsRegistryComponent implements OnInit, OnDestroy {
|
||||
groupDtoModel.group = group;
|
||||
return groupDtoModel;
|
||||
}
|
||||
)
|
||||
);
|
||||
})).pipe(map((dtos: GroupDtoModel[]) => {
|
||||
return new PaginatedList(groups.pageInfo, dtos);
|
||||
}))
|
||||
}));
|
||||
})).subscribe((value: PaginatedList<GroupDtoModel>) => {
|
||||
this.groupsDto$.next(value);
|
||||
this.pageInfoState$.next(value.pageInfo);
|
||||
@@ -199,13 +198,7 @@ export class GroupsRegistryComponent implements OnInit, OnDestroy {
|
||||
*/
|
||||
hasLinkedDSO(group: Group): Observable<boolean> {
|
||||
return this.dSpaceObjectDataService.findByHref(group._links.object.href).pipe(
|
||||
map((rd: RemoteData<DSpaceObject>) => {
|
||||
if (hasValue(rd) && hasValue(rd.payload)) {
|
||||
return true;
|
||||
} else {
|
||||
return false
|
||||
}
|
||||
}),
|
||||
map((rd: RemoteData<DSpaceObject>) => hasValue(rd) && hasValue(rd.payload)),
|
||||
catchError(() => observableOf(false)),
|
||||
);
|
||||
}
|
||||
|
Reference in New Issue
Block a user