diff --git a/src/app/core/profile/model/researcher-profile.model.ts b/src/app/core/profile/model/researcher-profile.model.ts index 1a9e75cbf6..e5098496d3 100644 --- a/src/app/core/profile/model/researcher-profile.model.ts +++ b/src/app/core/profile/model/researcher-profile.model.ts @@ -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. diff --git a/src/app/core/profile/researcher-profile.service.ts b/src/app/core/profile/researcher-profile.service.ts index c61c5ca9f9..3b4144b77c 100644 --- a/src/app/core/profile/researcher-profile.service.ts +++ b/src/app/core/profile/researcher-profile.service.ts @@ -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 */ diff --git a/src/app/profile-page/profile-claim/profile-claim.service.ts b/src/app/profile-page/profile-claim/profile-claim.service.ts index f1841ac0b5..1c86ba29f1 100644 --- a/src/app/profile-page/profile-claim/profile-claim.service.ts +++ b/src/app/profile-page/profile-claim/profile-claim.service.ts @@ -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>>) => of(rd.payload.totalElements > 0)) - ); - } - }) + return this.lookup(query).pipe( + mergeMap((rd: RemoteData>>) => of(rd.payload.totalElements > 0)) ); + } search(eperson: EPerson): Observable>>> { @@ -73,4 +65,6 @@ export class ProfileClaimService { if (!hasValue(value)) {return;} query.push(metadata + ':' + value); } + + }