mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-07 10:04:11 +00:00
[CST-5307] Fixed compilation
This commit is contained in:
@@ -1,10 +1,10 @@
|
||||
import { autoserialize, deserialize, deserializeAs } from 'cerialize';
|
||||
import { typedObject } from '../../cache/builders/build-decorators';
|
||||
import { CacheableObject } from '../../cache/object-cache.reducer';
|
||||
import { HALLink } from '../../shared/hal-link.model';
|
||||
import { ResourceType } from '../../shared/resource-type';
|
||||
import { excludeFromEquals } from '../../utilities/equals.decorators';
|
||||
import { RESEARCHER_PROFILE } from './researcher-profile.resource-type';
|
||||
import {CacheableObject} from "../../cache/cacheable-object.model";
|
||||
|
||||
/**
|
||||
* Class the represents a Researcher Profile.
|
||||
|
@@ -10,7 +10,6 @@ import { NotificationsService } from '../../shared/notifications/notifications.s
|
||||
import { dataService } from '../cache/builders/build-decorators';
|
||||
import { RemoteDataBuildService } from '../cache/builders/remote-data-build.service';
|
||||
import { ObjectCacheService } from '../cache/object-cache.service';
|
||||
import { CoreState } from '../core.reducers';
|
||||
import { ConfigurationDataService } from '../data/configuration-data.service';
|
||||
import { DataService } from '../data/data.service';
|
||||
import { DefaultChangeAnalyzer } from '../data/default-change-analyzer.service';
|
||||
@@ -31,6 +30,7 @@ import { RESEARCHER_PROFILE } from './model/researcher-profile.resource-type';
|
||||
import { HttpOptions } from '../dspace-rest/dspace-rest.service';
|
||||
import { PostRequest } from '../data/request.models';
|
||||
import { hasValue } from '../../shared/empty.util';
|
||||
import {CoreState} from "../core-state.model";
|
||||
|
||||
/* tslint:disable:max-classes-per-file */
|
||||
|
||||
|
@@ -10,7 +10,7 @@ import { SearchService } from '../../core/shared/search/search.service';
|
||||
import { hasValue } from '../../shared/empty.util';
|
||||
import { PaginatedSearchOptions } from '../../shared/search/models/paginated-search-options.model';
|
||||
import { SearchResult } from '../../shared/search/models/search-result.model';
|
||||
import { getFirstSucceededRemoteData, getFirstSucceededRemoteDataPayload } from './../../core/shared/operators';
|
||||
import { getFirstSucceededRemoteData } from './../../core/shared/operators';
|
||||
|
||||
@Injectable()
|
||||
export class ProfileClaimService {
|
||||
@@ -27,18 +27,10 @@ export class ProfileClaimService {
|
||||
return of(false);
|
||||
}
|
||||
|
||||
return this.configurationService.findByPropertyName('claimable.entityType').pipe(
|
||||
getFirstSucceededRemoteDataPayload(),
|
||||
switchMap((claimableTypes) => {
|
||||
if (!claimableTypes.values || claimableTypes.values.length === 0) {
|
||||
return of(false);
|
||||
} else {
|
||||
return this.lookup(query).pipe(
|
||||
mergeMap((rd: RemoteData<PaginatedList<SearchResult<DSpaceObject>>>) => of(rd.payload.totalElements > 0))
|
||||
);
|
||||
}
|
||||
})
|
||||
);
|
||||
|
||||
}
|
||||
|
||||
search(eperson: EPerson): Observable<RemoteData<PaginatedList<SearchResult<DSpaceObject>>>> {
|
||||
@@ -73,4 +65,6 @@ export class ProfileClaimService {
|
||||
if (!hasValue(value)) {return;}
|
||||
query.push(metadata + ':' + value);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user