claimsByToken: 'token' is not used anymore for claims. Instead it is used 'projectId'.
git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-services-library/trunk/ng-openaire-library/src/app@53230 d315682c-612b-4755-9ff5-7f18f6832af3
This commit is contained in:
parent
c946e668f1
commit
5fe8c67e43
|
@ -12,7 +12,7 @@
|
|||
<div *ngIf="accessStatus=='valid'">
|
||||
<div class="uk-article-title custom-article-title">
|
||||
Claims Administrator
|
||||
<a [queryParams]="routerHelper.createQueryParam('projectId',project['openaireId'])"
|
||||
<a *ngIf="project" [queryParams]="routerHelper.createQueryParam('projectId',project['openaireId'])"
|
||||
routerLinkActive="router-link-active"
|
||||
routerLink="/search/project" >
|
||||
{{project['name']}} ({{project['funderName']}})
|
||||
|
@ -83,7 +83,7 @@
|
|||
<div *ngIf="(selectedWrong_PendingMode.size+selectedRight_PendingMode.size) > 0" class="uk-alert-primary" uk-alert>
|
||||
You have selected <span class="uk-badge">{{(selectedWrong_PendingMode.size+selectedRight_PendingMode.size)}}</span> claim(s) to curate
|
||||
</div>
|
||||
<div class="uk-float-right">
|
||||
<div *ngIf="totalPendingResults.count > 0" class="uk-float-right">
|
||||
<button (click)="clearCheckboxes()" [class]="((selectedWrong_PendingMode.size+selectedRight_PendingMode.size) == 0) ? 'uk-button uk-disabled' : 'uk-button'">Reset</button>
|
||||
|
||||
<span title="Approve or dissaprove at least one claim"
|
||||
|
|
|
@ -34,7 +34,7 @@ import {ClaimsByTokenService} from './claimsByToken.service';
|
|||
|
||||
})
|
||||
export class ClaimsByTokenComponent {
|
||||
public token: string = "";
|
||||
public openaireId: string = "";
|
||||
public sub: any;
|
||||
public project: any;
|
||||
private claims:any = [];
|
||||
|
@ -97,7 +97,7 @@ export class ClaimsByTokenComponent {
|
|||
});
|
||||
this.sub = this.route.queryParams.subscribe(params => {
|
||||
this.mode = "pending";
|
||||
this.token = params['token'];
|
||||
this.openaireId = params['openaireId'];
|
||||
this.selectedRight_PendingMode = new Set<string>();
|
||||
this.selectedWrong_PendingMode = new Set<string>();
|
||||
this.selectedRight_CuratedMode = new Set<string>();
|
||||
|
@ -253,7 +253,7 @@ refreshTable(page:number, whichTable: string) {
|
|||
|
||||
validateJWTandToken() {
|
||||
|
||||
if(this.token) {
|
||||
if(this.openaireId) {
|
||||
this.pending_status = this.errorCodes.LOADING;
|
||||
this.curated_status = this.errorCodes.LOADING;
|
||||
|
||||
|
@ -266,7 +266,7 @@ refreshTable(page:number, whichTable: string) {
|
|||
this.activeCuratedPage.page = 1;
|
||||
this.totalCuratedResults.count = 0;
|
||||
|
||||
this.claimsByTokenService.getClaims(this.token, this.properties.claimsAPIURL).subscribe(
|
||||
this.claimsByTokenService.getClaims(this.openaireId, this.properties.claimsAPIURL).subscribe(
|
||||
data => {
|
||||
//this.closeLoading();
|
||||
this.accessStatus = "valid";
|
||||
|
@ -288,7 +288,9 @@ refreshTable(page:number, whichTable: string) {
|
|||
this.totalPendingResults.count = this.pending_claims.length;
|
||||
this.totalCuratedResults.count = this.curated_claims.length;
|
||||
|
||||
this.updateTitle("Claims For Project Managers - "+this.project.name);
|
||||
if(this.project) {
|
||||
this.updateTitle("Claims For Project Managers - "+this.project.name);
|
||||
}
|
||||
this.showTables = true;
|
||||
|
||||
if(!this.triggered) {
|
||||
|
|
|
@ -11,10 +11,11 @@ export class ClaimsByTokenService {
|
|||
|
||||
constructor(private http: Http ) {}
|
||||
|
||||
getClaims(token: string, apiURL:string):any {
|
||||
getClaims(openaireId: string, apiURL:string):any {
|
||||
console.info("getClaims in service");
|
||||
|
||||
let url = apiURL+"project/claims?projectToken="+token;
|
||||
//let url = apiURL+"project/claims?projectToken="+token;
|
||||
let url = apiURL+"projects/"+openaireId+"/all_claims";
|
||||
|
||||
let key = url;
|
||||
|
||||
|
|
Loading…
Reference in New Issue