2019-04-08 16:53:09 +02:00
|
|
|
import { Component, Input} from '@angular/core';
|
2020-06-05 14:56:28 +02:00
|
|
|
import {EnvProperties} from "../properties/env-properties";
|
2021-01-13 17:10:05 +01:00
|
|
|
import {properties} from "../../../../environments/environment";
|
2019-04-08 16:53:09 +02:00
|
|
|
@Component({
|
|
|
|
selector: 'manage',
|
|
|
|
template: `
|
2022-01-20 10:19:44 +01:00
|
|
|
<a [href]="link" class="uk-button uk-button-text uk-text-uppercase" target="_blank">Manage</a>
|
2019-04-08 16:53:09 +02:00
|
|
|
`
|
|
|
|
})
|
|
|
|
|
|
|
|
export class ManageComponent {
|
|
|
|
@Input() communityId:string;
|
2020-06-05 14:56:28 +02:00
|
|
|
@Input() alias: string;
|
2021-01-13 17:10:05 +01:00
|
|
|
properties: EnvProperties = properties;
|
2022-01-20 10:19:44 +01:00
|
|
|
constructor() {
|
|
|
|
}
|
|
|
|
|
|
|
|
get link(): string {
|
|
|
|
if(this.communityId) {
|
|
|
|
return this.properties.adminPortalURL + '/' + this.communityId;
|
|
|
|
} else if(this.alias) {
|
|
|
|
return this.properties.domain + properties.baseLink + '/dashboard/admin/' + this.alias;
|
|
|
|
} else {
|
|
|
|
return null;
|
|
|
|
}
|
|
|
|
}
|
2019-04-08 16:53:09 +02:00
|
|
|
}
|