add communityId in claims url when it is provided

git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-services-library/trunk/ng-openaire-library/src/app@51304 d315682c-612b-4755-9ff5-7f18f6832af3
This commit is contained in:
argiro.kokogiannaki 2018-03-16 12:28:19 +00:00
parent 4f90bffe50
commit 15ace3ca00
3 changed files with 11 additions and 4 deletions

View File

@ -37,7 +37,6 @@ export class DisplayClaimsComponent {
this.fetchBy = (this.types.indexOf(this.fetchBy) != -1)? this.fetchBy:'All';
this.fetchId =(this.fetchId)?this.fetchId: params['fetchId'];
this.fetchId = this.fetchId?this.fetchId:'';
}
let page = (params['page']=== undefined)?1:+params['page'];
@ -102,7 +101,7 @@ export class DisplayClaimsComponent {
@ViewChild(AlertModal) alert;
claimsDeleted:number = 0;
@Input() communityId:string = null;
getClaims () {
if(!Session.isValidAndRemove()){
this.userValidMessage = "User session has expired. Please login again.";
@ -222,6 +221,10 @@ handleErrors(err){
}
params+=(this. getSortby()=='datedesc'?"":(params.length>0?'&':'')+"sort="+this. getSortby());
params+=(this.keyword==''?"":(params.length>0?'&':'')+"keyword="+this.keyword);
console.log("AAAA"+this.communityId)
if(this.communityId !=null){
params+="&communityId="+this.communityId;
}
return params;
}
changeSize(size: number ){

View File

@ -19,7 +19,8 @@ import { Meta} from '../../sharedComponents/metaService';
</div>
<div>
<div class="uk-text-right"><a routerLink="/participate/claim">Add more Links?</a></div>
<displayClaims [enableDelete]=true [myClaims]=false [isAdmin]=true [fetchBy]= fetchBy [fetchId]=fetchId></displayClaims>
<displayClaims [enableDelete]=true [myClaims]=false [isAdmin]=true [fetchBy]= fetchBy [fetchId]=fetchId
[communityId]="(fetchBy && fetchBy == 'Context')?fetchId:null"></displayClaims>
</div>
</div>
</div>
@ -32,8 +33,12 @@ import { Meta} from '../../sharedComponents/metaService';
export class ClaimsAdminComponent {
@Input() fetchBy:string;
@Input() fetchId:string;
constructor ( private _meta: Meta ) {
this._meta.setTitle("OpenAIRE | Claims Administrator");
if(this.fetchBy && this.fetchBy == "Context"){
}
}
ngOnInit() {
}

View File

@ -10,7 +10,6 @@ export class EnvironmentSpecificResolver implements Resolve<EnvProperties> {
constructor(private envSpecificSvc: EnvironmentSpecificService, private router: Router) {}
resolve(route: ActivatedRouteSnapshot, state: RouterStateSnapshot): Promise<EnvProperties> {
console.log("Here!!!!!!!");
return this.envSpecificSvc.loadEnvironment()
.then(es => {
this.envSpecificSvc.setEnvProperties(es);