openaire-library/claims/myClaims/myClaims.component.ts

50 lines
1.5 KiB
TypeScript

import {Component, Input} from '@angular/core';
import {Meta, Title} from '@angular/platform-browser';
import {User} from "../../login/utils/helper.class";
import {UserManagementService} from "../../services/user-management.service";
@Component({
selector: 'my-claims',
template: `
<div id="tm-main" class=" uk-section uk-padding-remove-top uk-margin-small-top tm-middle">
<div class="uk-grid" >
<div class="tm-main uk-width-1-1@s uk-width-1-1@m uk-width-1-1@l uk-row-first ">
<div class="uk-container">
<div class="uk-article-title custom-article-title">
My links
</div>
<div class=" ">
Manage your links in OpenAIRE
</div>
<div>
<displayClaims *ngIf="user" [user]="user" [enableDelete]=true [myClaims]=true [isAdmin]=false [showUserEmail]=false
[claimsInfoURL]=claimsInfoURL [communityId]=communityId
[piwikSiteId]="piwikSiteId" title="My links">
</displayClaims>
</div>
</div>
</div>
</div>
</div>
`
})
export class MyClaimsComponent {
@Input() claimsInfoURL: string;
@Input() communityId:string;
@Input() piwikSiteId = null;
@Input() userInfoURL: string;
public user: User = null;
constructor(private userManagementService: UserManagementService) {}
ngOnInit() {
this.userManagementService.getUserInfo(this.userInfoURL).subscribe(user => {
this.user = user;
});
}
}