fix: remove tenant-box from reset-password page

pull/9337/head
bnymncoskuner 4 years ago
parent 8749abdb7f
commit b36ebd8e45

@ -69,6 +69,7 @@ const routes: Routes = [
component: ReplaceableRouteContainerComponent,
canActivate: [AuthenticationFlowGuard],
data: {
tenantBoxVisible: false,
replaceableComponent: {
key: eAccountComponents.ResetPassword,
defaultComponent: ResetPasswordComponent,

@ -1,6 +1,6 @@
<div class="row">
<div class="mx-auto col col-md-5">
<ng-container *ngIf="(isMultiTenancyEnabled$ | async) && multiTenancy.isTenantBoxVisible">
<ng-container *ngIf="(isMultiTenancyEnabled$ | async) && isTenantBoxVisible">
<abp-tenant-box *abpReplaceableTemplate="{ componentKey: tenantBoxKey }"></abp-tenant-box>
</ng-container>

@ -1,8 +1,9 @@
import { ConfigStateService, MultiTenancyService, SubscriptionService } from '@abp/ng.core';
import { Component } from '@angular/core';
import { Component, Injector } from '@angular/core';
import { Observable } from 'rxjs';
import { map } from 'rxjs/operators';
import { eAccountComponents } from '../../enums/components';
import { ActivatedRoute } from '@angular/router';
@Component({
selector: 'abp-auth-wrapper',
@ -20,9 +21,24 @@ export class AuthWrapperComponent {
}
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(
public readonly multiTenancy: MultiTenancyService,
private configState: ConfigStateService,
) {}
injector: Injector,
) {
this.route = injector.get(ActivatedRoute);
this.setTenantBoxVisibility();
}
}

Loading…
Cancel
Save