import {Component, Input} from '@angular/core';
import {Title, Meta} from '@angular/platform-browser';
import {User} from "../../login/utils/helper.class";
import {UserManagementService} from "../../services/user-management.service";
@Component({
selector: 'claims-admin',
template: `
`,
})
export class ClaimsAdminComponent {
@Input() fetchBy:string;
@Input() fetchId:string;
@Input() isConnect:boolean = false;
@Input() externalPortalUrl:string;
@Input() claimsInfoURL:string;
@Input() userInfoURL: string;
public user: User = null;
constructor ( private _meta: Meta, private _title: Title,
private userManagementService: UserManagementService) {
var titleConnect = "OpenAIRE Connect | Manage links ";
var title = "OpenAIRE | Manage links ";
if(this.isConnect) {
this._title.setTitle(titleConnect);
} else {
this._title.setTitle(title);
}
}
ngOnInit() {
this.userManagementService.getUserInfo(this.userInfoURL).subscribe(user => {
this.user = user;
});
}
}