Browse Source
Merge pull request #3156 from abpframework/feat/account/multi-tenancy-control-for-tenant-box
feat(account): add multi tenancy enabled control to tenant box
pull/3158/head
Yasin Aydın
7 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with
10 additions and
4 deletions
-
npm/ng-packs/packages/account/src/lib/components/auth-wrapper/auth-wrapper.component.html
-
npm/ng-packs/packages/account/src/lib/components/auth-wrapper/auth-wrapper.component.ts
|
|
|
@ -1,8 +1,10 @@ |
|
|
|
<div class="row"> |
|
|
|
<div class="mx-auto col col-md-5"> |
|
|
|
<abp-tenant-box |
|
|
|
*abpReplaceableTemplate="{ componentKey: 'Account.TenantBoxComponent' }" |
|
|
|
></abp-tenant-box> |
|
|
|
<ng-container *ngIf="isMultiTenancyEnabled$ | async"> |
|
|
|
<abp-tenant-box |
|
|
|
*abpReplaceableTemplate="{ componentKey: 'Account.TenantBoxComponent' }" |
|
|
|
></abp-tenant-box> |
|
|
|
</ng-container> |
|
|
|
|
|
|
|
<div class="abp-account-container"> |
|
|
|
<div |
|
|
|
|
|
|
|
@ -1,6 +1,7 @@ |
|
|
|
import { ConfigState, takeUntilDestroy } from '@abp/ng.core'; |
|
|
|
import { Component, Input, OnDestroy, OnInit, TemplateRef } from '@angular/core'; |
|
|
|
import { Store } from '@ngxs/store'; |
|
|
|
import { Select, Store } from '@ngxs/store'; |
|
|
|
import { Observable } from 'rxjs'; |
|
|
|
import { Account } from '../../models/account'; |
|
|
|
|
|
|
|
@Component({ |
|
|
|
@ -20,6 +21,9 @@ export class AuthWrapperComponent |
|
|
|
@Input() |
|
|
|
readonly cancelContentRef: TemplateRef<any>; |
|
|
|
|
|
|
|
@Select(ConfigState.getDeep('multiTenancy.isEnabled')) |
|
|
|
isMultiTenancyEnabled$: Observable<boolean>; |
|
|
|
|
|
|
|
enableLocalLogin = true; |
|
|
|
|
|
|
|
constructor(private store: Store) {} |
|
|
|
|