import { Component , OnInit , Injector , ViewChild } from '@angular/core' ; import { AccountServiceProxy } from '@shared/service-proxies/service-proxies' ; import { TenantChangeModalComponent } from './tenant-change-modal.component' ; import { AppComponentBase } from '@shared/component-base' ; import { Abp } from '@abp' ; @ Component ( { selector : 'tenant-change' , templateUrl : './tenant-change.component.html' } ) export class TenantChangeComponent extends AppComponentBase implements OnInit { @ ViewChild ( 'tenantChangeModal' ) tenantChangeModal : TenantChangeModalComponent ; tenancyName : string ; name : string ; constructor ( injector , private _accountService ) { super ( injector ) ; } ngOnInit ( ) { if ( this . appSession . tenant ) { this . tenancyName = this . appSession . tenant . tenancyName ; this . name = this . appSession . tenant . name ; } } get isMultiTenancyEnabled ( ) : boolean { return Abp . multiTenancy . isEnabled ; } showChangeModal ( ) { this . tenantChangeModal . show ( this . tenancyName ) ; } }