Browse Source

refactor(account): change imports from ng.core

pull/1612/head
TheDiaval 7 years ago
parent
commit
e8a7d3dbaa
  1. 4
      npm/ng-packs/packages/account/src/lib/components/login/login.component.ts
  2. 6
      npm/ng-packs/packages/account/src/lib/components/tenant-box/tenant-box.component.ts

4
npm/ng-packs/packages/account/src/lib/components/login/login.component.ts

@ -1,4 +1,4 @@
import { ConfigGetAppConfiguration, ConfigState } from '@abp/ng.core';
import { GetAppConfiguration, ConfigState } from '@abp/ng.core';
import { Component, Inject, Optional } from '@angular/core';
import { FormBuilder, FormGroup, Validators } from '@angular/forms';
import { Navigate } from '@ngxs/router-plugin';
@ -47,7 +47,7 @@ export class LoginComponent {
this.oauthService.fetchTokenUsingPasswordFlow(this.form.get('username').value, this.form.get('password').value),
)
.pipe(
switchMap(() => this.store.dispatch(new ConfigGetAppConfiguration())),
switchMap(() => this.store.dispatch(new GetAppConfiguration())),
tap(() => {
const redirectUrl = snq(() => window.history.state).redirectUrl || (this.options || {}).redirectUrl || '/';
this.store.dispatch(new Navigate([redirectUrl]));

6
npm/ng-packs/packages/account/src/lib/components/tenant-box/tenant-box.component.ts

@ -1,4 +1,4 @@
import { ABP, SessionSetTenant, SessionState } from '@abp/ng.core';
import { ABP, SetTenant, SessionState } from '@abp/ng.core';
import { ToasterService } from '@abp/ng.theme.shared';
import { Component, OnInit } from '@angular/core';
import { Store } from '@ngxs/store';
@ -57,10 +57,10 @@ export class TenantBoxComponent implements OnInit {
});
this.tenant = {} as ABP.BasicItem;
}
this.store.dispatch(new SessionSetTenant(success ? this.tenant : null));
this.store.dispatch(new SetTenant(success ? this.tenant : null));
});
} else {
this.store.dispatch(new SessionSetTenant(null));
this.store.dispatch(new SetTenant(null));
this.tenantName = null;
this.isModalVisible = false;
}

Loading…
Cancel
Save