diff --git a/portal-2/src/app/app-routing.module.ts b/portal-2/src/app/app-routing.module.ts index 782e7927..617677d5 100644 --- a/portal-2/src/app/app-routing.module.ts +++ b/portal-2/src/app/app-routing.module.ts @@ -115,6 +115,12 @@ export function getClaimsAdminModule() { return System.import('./claims/claimsAdmin/claimsAdmin.module' + (process.env.AOT ? '.ngfactory' : '')) .then(mod => mod[(process.env.AOT ? 'ClaimsAdminModuleNgFactory' : 'ClaimsAdminModule')]); } + +export function getClaimsByTokenModule() { + return System.import('./claims/claimsByToken/claimsByToken.module' + (process.env.AOT ? '.ngfactory' : '')) + .then(mod => mod[(process.env.AOT ? 'ClaimsByTokenModuleNgFactory' : 'ClaimsByTokenModule')]); +} + export function getLinkingModule() { return System.import('./claims/linking/linkingGeneric.module' + (process.env.AOT ? '.ngfactory' : '')) .then(mod => mod[(process.env.AOT ? 'LinkingGenericModuleNgFactory' : 'LinkingGenericModule')]); @@ -162,6 +168,7 @@ export function getUserModule() { { path: 'claims', loadChildren: getClaimsAdminModule }, { path: 'participate/claim', loadChildren: getLinkingModule }, { path: 'participate/direct-claim', loadChildren: getDirectLinkingModule }, + { path: 'claims-project-manager', loadChildren: getClaimsByTokenModule }, { path: 'user-info', loadChildren: getUserModule }, ]) diff --git a/portal-2/src/app/claims/claimsByToken/claimsByToken-routing.module.ts b/portal-2/src/app/claims/claimsByToken/claimsByToken-routing.module.ts new file mode 100644 index 00000000..9c0f4180 --- /dev/null +++ b/portal-2/src/app/claims/claimsByToken/claimsByToken-routing.module.ts @@ -0,0 +1,14 @@ +import { NgModule } from '@angular/core'; +import { RouterModule } from '@angular/router'; +import { LoginGuard} from'../../login/loginGuard.guard'; +import { ClaimsByTokenComponent } from './claimsByToken.component'; + +@NgModule({ + imports: [ + RouterModule.forChild([ + { path: '', component: ClaimsByTokenComponent, canActivate: [LoginGuard]} + + ]) + ] +}) +export class ClaimsByTokenRoutingModule { } diff --git a/portal-2/src/app/claims/claimsByToken/claimsByToken.component.ts b/portal-2/src/app/claims/claimsByToken/claimsByToken.component.ts new file mode 100644 index 00000000..3e0d3ba9 --- /dev/null +++ b/portal-2/src/app/claims/claimsByToken/claimsByToken.component.ts @@ -0,0 +1,271 @@ +import {Component, ViewChild, Input} from '@angular/core'; +import {Location} from '@angular/common'; +import {Observable} from 'rxjs/Observable'; +import {ActivatedRoute, Router, Params} from '@angular/router'; +import {ClaimsByTokenService} from './claimsByToken.service'; + +import {ModalSelect} from '../../utils/modal/selectModal.component'; +import {ModalLoading} from '../../utils/modal/loading.component'; + +import {Session} from '../../login/utils/helper.class'; + +@Component({ + selector: 'claims-project-manager', + template: ` + + + + + +
Oops! Your email does not give you the authority to view claims for the selected project. Please contact the administrators.
+Research Result | +Link to | +Claimed by | +Claimed Date | +True | +False | +
---|---|---|---|---|---|
{{claim.userMail}} | +{{claim.date}} | ++ | + |
Research Result | +Link to | +Claimed by | +Claimed Date | +Curated by | +Curation Date | +True | +False | ++ |
---|---|---|---|---|---|---|---|---|
{{claim.userMail}} | +{{claim.date}} | +{{claim.curatedBy}} | +{{claim.curationDate}} | ++ | + | + |
diff --git a/portal-2/src/app/services/metrics.service.ts b/portal-2/src/app/services/metrics.service.ts index 57c74316..aa3019af 100644 --- a/portal-2/src/app/services/metrics.service.ts +++ b/portal-2/src/app/services/metrics.service.ts @@ -12,35 +12,41 @@ export class MetricsService { constructor(private http: Http, public _cache: CacheService) {} getMetrics (id: string, entity: string):any { - console.info("getPublicationViews in service"); + console.info("getMetrics in service"); //let url = OpenaireProperties. getSearchAPIURLLast() + 'publications/' +id+"?format=json"; let url = OpenaireProperties.getMetricsAPIURL()+entity+"/"+id+"/clicks"; let key = url; if (this._cache.has(key)) { return Observable.of(this._cache.get(key)); } + return this.http.get(url) .map(res =>