diff --git a/npm/ng-packs/packages/theme-basic/src/lib/actions/layout.actions.ts b/npm/ng-packs/packages/theme-basic/src/lib/actions/layout.actions.ts index ddc901fc6e..3786ea82b7 100644 --- a/npm/ng-packs/packages/theme-basic/src/lib/actions/layout.actions.ts +++ b/npm/ng-packs/packages/theme-basic/src/lib/actions/layout.actions.ts @@ -1,11 +1,11 @@ import { Layout } from '../models/layout'; -export class LayoutAddNavigationElement { +export class AddNavigationElement { static readonly type = '[Layout] Add Navigation Element'; constructor(public payload: Layout.NavigationElement | Layout.NavigationElement[]) {} } -export class LayoutRemoveNavigationElementByName { +export class RemoveNavigationElementByName { static readonly type = '[Layout] Remove Navigation ElementByName'; constructor(public name: string) {} } diff --git a/npm/ng-packs/packages/theme-basic/src/lib/components/application-layout/application-layout.component.ts b/npm/ng-packs/packages/theme-basic/src/lib/components/application-layout/application-layout.component.ts index 0295c61d24..7bdbdf58ed 100644 --- a/npm/ng-packs/packages/theme-basic/src/lib/components/application-layout/application-layout.component.ts +++ b/npm/ng-packs/packages/theme-basic/src/lib/components/application-layout/application-layout.component.ts @@ -1,10 +1,10 @@ import { ABP, ApplicationConfiguration, - ConfigGetAppConfiguration, + GetAppConfiguration, ConfigState, eLayoutType, - SessionSetLanguage, + SetLanguage, SessionState, takeUntilDestroy, } from '@abp/ng.core'; @@ -26,7 +26,7 @@ import compare from 'just-compare'; import { fromEvent, Observable } from 'rxjs'; import { debounceTime, filter, map } from 'rxjs/operators'; import snq from 'snq'; -import { LayoutAddNavigationElement } from '../../actions'; +import { AddNavigationElement } from '../../actions'; import { Layout } from '../../models/layout'; import { LayoutState } from '../../states'; @@ -114,7 +114,7 @@ export class ApplicationLayoutComponent implements AfterViewInit, OnDestroy { if (navigations.indexOf('LanguageRef') < 0) { this.store.dispatch( - new LayoutAddNavigationElement([ + new AddNavigationElement([ { element: this.languageRef, order: 4, name: 'LanguageRef' }, { element: this.currentUserRef, order: 5, name: 'CurrentUserRef' }, ]), @@ -146,8 +146,8 @@ export class ApplicationLayoutComponent implements AfterViewInit, OnDestroy { ngOnDestroy() {} onChangeLang(cultureName: string) { - this.store.dispatch(new SessionSetLanguage(cultureName)); - this.store.dispatch(new ConfigGetAppConfiguration()); + this.store.dispatch(new SetLanguage(cultureName)); + this.store.dispatch(new GetAppConfiguration()); } logout() { @@ -157,7 +157,7 @@ export class ApplicationLayoutComponent implements AfterViewInit, OnDestroy { state: { redirectUrl: this.store.selectSnapshot(RouterState).state.url }, }), ); - this.store.dispatch(new ConfigGetAppConfiguration()); + this.store.dispatch(new GetAppConfiguration()); } } diff --git a/npm/ng-packs/packages/theme-basic/src/lib/components/change-password/change-password.component.ts b/npm/ng-packs/packages/theme-basic/src/lib/components/change-password/change-password.component.ts index d26d81ef65..fe3d8da60d 100644 --- a/npm/ng-packs/packages/theme-basic/src/lib/components/change-password/change-password.component.ts +++ b/npm/ng-packs/packages/theme-basic/src/lib/components/change-password/change-password.component.ts @@ -1,4 +1,4 @@ -import { ProfileChangePassword } from '@abp/ng.core'; +import { ChangePassword } from '@abp/ng.core'; import { ToasterService } from '@abp/ng.theme.shared'; import { Component, @@ -63,7 +63,7 @@ export class ChangePasswordComponent implements OnInit, OnChanges { this.store .dispatch( - new ProfileChangePassword({ + new ChangePassword({ currentPassword: this.form.get('password').value, newPassword: this.form.get('newPassword').value, }), diff --git a/npm/ng-packs/packages/theme-basic/src/lib/components/profile/profile.component.ts b/npm/ng-packs/packages/theme-basic/src/lib/components/profile/profile.component.ts index 030e239994..6836ca8c28 100644 --- a/npm/ng-packs/packages/theme-basic/src/lib/components/profile/profile.component.ts +++ b/npm/ng-packs/packages/theme-basic/src/lib/components/profile/profile.component.ts @@ -1,4 +1,4 @@ -import { Profile, ProfileGet, ProfileState, ProfileUpdate } from '@abp/ng.core'; +import { Profile, GetProfile, ProfileState, UpdateProfile } from '@abp/ng.core'; import { Component, EventEmitter, Input, OnChanges, Output, SimpleChanges } from '@angular/core'; import { FormBuilder, FormGroup, Validators } from '@angular/forms'; import { Select, Store } from '@ngxs/store'; @@ -36,7 +36,7 @@ export class ProfileComponent implements OnChanges { buildForm() { this.store - .dispatch(new ProfileGet()) + .dispatch(new GetProfile()) .pipe( withLatestFrom(this.profile$), take(1), @@ -55,7 +55,7 @@ export class ProfileComponent implements OnChanges { onSubmit() { if (this.form.invalid) return; - this.store.dispatch(new ProfileUpdate(this.form.value)).subscribe(() => { + this.store.dispatch(new UpdateProfile(this.form.value)).subscribe(() => { this.visible = false; this.form.reset(); }); diff --git a/npm/ng-packs/packages/theme-basic/src/lib/states/layout.state.ts b/npm/ng-packs/packages/theme-basic/src/lib/states/layout.state.ts index 97a0825481..7fac67a036 100644 --- a/npm/ng-packs/packages/theme-basic/src/lib/states/layout.state.ts +++ b/npm/ng-packs/packages/theme-basic/src/lib/states/layout.state.ts @@ -1,5 +1,5 @@ import { State, Action, StateContext, Selector } from '@ngxs/store'; -import { LayoutAddNavigationElement, LayoutRemoveNavigationElementByName } from '../actions/layout.actions'; +import { AddNavigationElement, RemoveNavigationElementByName } from '../actions/layout.actions'; import { Layout } from '../models/layout'; import { TemplateRef } from '@angular/core'; import snq from 'snq'; @@ -14,8 +14,8 @@ export class LayoutState { return navigationElements; } - @Action(LayoutAddNavigationElement) - layoutAddAction({ getState, patchState }: StateContext, { payload = [] }: LayoutAddNavigationElement) { + @Action(AddNavigationElement) + layoutAddAction({ getState, patchState }: StateContext, { payload = [] }: AddNavigationElement) { let { navigationElements } = getState(); if (!Array.isArray(payload)) { @@ -43,11 +43,8 @@ export class LayoutState { }); } - @Action(LayoutRemoveNavigationElementByName) - layoutRemoveAction( - { getState, patchState }: StateContext, - { name }: LayoutRemoveNavigationElementByName, - ) { + @Action(RemoveNavigationElementByName) + layoutRemoveAction({ getState, patchState }: StateContext, { name }: RemoveNavigationElementByName) { let { navigationElements } = getState(); const index = navigationElements.findIndex(element => element.name === name);