2020-11-11 15:44:21 +01:00
|
|
|
import {Component} from '@angular/core';
|
2018-11-14 15:16:19 +01:00
|
|
|
import {ActivatedRoute} from '@angular/router';
|
|
|
|
import {EnvProperties} from '../../openaireLibrary/utils/properties/env-properties';
|
2020-11-11 15:44:21 +01:00
|
|
|
import {Subscriber} from "rxjs";
|
2018-01-23 11:07:39 +01:00
|
|
|
|
|
|
|
@Component({
|
|
|
|
selector: 'openaire-claims-admin',
|
|
|
|
template: `
|
2019-09-13 09:46:57 +02:00
|
|
|
<claims-admin *ngIf="claimsInfoURL && userInfoURL" [claimsInfoURL]=claimsInfoURL [userInfoURL]="userInfoURL">
|
2018-01-23 11:07:39 +01:00
|
|
|
</claims-admin>
|
|
|
|
|
|
|
|
`,
|
|
|
|
|
|
|
|
})
|
|
|
|
export class OpenaireClaimsAdminComponent {
|
|
|
|
|
2018-11-14 15:16:19 +01:00
|
|
|
claimsInfoURL:string;
|
2019-09-13 09:46:57 +02:00
|
|
|
userInfoURL: string;
|
2020-11-11 15:44:21 +01:00
|
|
|
sub;
|
2018-11-14 15:16:19 +01:00
|
|
|
constructor (private route: ActivatedRoute) {
|
|
|
|
}
|
2020-11-11 15:44:21 +01:00
|
|
|
ngOnDestroy() {
|
|
|
|
if (this.sub instanceof Subscriber) {
|
|
|
|
this.sub.unsubscribe();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2018-11-14 15:16:19 +01:00
|
|
|
public ngOnInit() {
|
2020-11-11 15:44:21 +01:00
|
|
|
this.sub = this.route.data
|
2018-11-14 15:16:19 +01:00
|
|
|
.subscribe((data: { envSpecific: EnvProperties }) => {
|
|
|
|
this.claimsInfoURL = data.envSpecific.claimsInformationLink;
|
2019-09-13 09:46:57 +02:00
|
|
|
this.userInfoURL = data.envSpecific.userInfoUrl;
|
2018-11-14 15:16:19 +01:00
|
|
|
});
|
|
|
|
}
|
2018-01-23 11:07:39 +01:00
|
|
|
}
|