|
|
@ -1,8 +1,9 @@ |
|
|
import { ConfigStateService, MultiTenancyService, SubscriptionService } from '@abp/ng.core'; |
|
|
import { ConfigStateService, MultiTenancyService, SubscriptionService } from '@abp/ng.core'; |
|
|
import { Component } from '@angular/core'; |
|
|
import { Component, Injector } from '@angular/core'; |
|
|
import { Observable } from 'rxjs'; |
|
|
import { Observable } from 'rxjs'; |
|
|
import { map } from 'rxjs/operators'; |
|
|
import { map } from 'rxjs/operators'; |
|
|
import { eAccountComponents } from '../../enums/components'; |
|
|
import { eAccountComponents } from '../../enums/components'; |
|
|
|
|
|
import { ActivatedRoute } from '@angular/router'; |
|
|
|
|
|
|
|
|
@Component({ |
|
|
@Component({ |
|
|
selector: 'abp-auth-wrapper', |
|
|
selector: 'abp-auth-wrapper', |
|
|
@ -20,9 +21,24 @@ export class AuthWrapperComponent { |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
tenantBoxKey = eAccountComponents.TenantBox; |
|
|
tenantBoxKey = eAccountComponents.TenantBox; |
|
|
|
|
|
route: ActivatedRoute; |
|
|
|
|
|
|
|
|
|
|
|
private _tenantBoxVisible = true; |
|
|
|
|
|
|
|
|
|
|
|
private setTenantBoxVisibility = () => { |
|
|
|
|
|
this._tenantBoxVisible = this.route.snapshot.firstChild.data.tenantBoxVisible ?? true; |
|
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
get isTenantBoxVisible() { |
|
|
|
|
|
return this._tenantBoxVisible && this.multiTenancy.isTenantBoxVisible; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
constructor( |
|
|
constructor( |
|
|
public readonly multiTenancy: MultiTenancyService, |
|
|
public readonly multiTenancy: MultiTenancyService, |
|
|
private configState: ConfigStateService, |
|
|
private configState: ConfigStateService, |
|
|
) {} |
|
|
injector: Injector, |
|
|
|
|
|
) { |
|
|
|
|
|
this.route = injector.get(ActivatedRoute); |
|
|
|
|
|
this.setTenantBoxVisibility(); |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
|