Browse Source

refactor(core): change state service dispatcher parameters

pull/2431/head
TheDiaval 7 years ago
parent
commit
d30f5a7af6
  1. 8
      npm/ng-packs/packages/core/src/lib/services/config-state.service.ts
  2. 8
      npm/ng-packs/packages/core/src/lib/services/profile-state.service.ts
  3. 8
      npm/ng-packs/packages/core/src/lib/services/session-state.service.ts

8
npm/ng-packs/packages/core/src/lib/services/config-state.service.ts

@ -54,11 +54,11 @@ export class ConfigStateService {
return this.store.dispatch(new GetAppConfiguration()); return this.store.dispatch(new GetAppConfiguration());
} }
dispatchPatchRouteByName(name: string, newValue: Partial<ABP.Route>) { dispatchPatchRouteByName(...args: ConstructorParameters<typeof PatchRouteByName>) {
return this.store.dispatch(new PatchRouteByName(name, newValue)); return this.store.dispatch(new PatchRouteByName(...args));
} }
dispatchAddRoute(payload: Omit<ABP.Route, 'children'>) { dispatchAddRoute(...args: ConstructorParameters<typeof AddRoute>) {
return this.store.dispatch(new AddRoute(payload)); return this.store.dispatch(new AddRoute(...args));
} }
} }

8
npm/ng-packs/packages/core/src/lib/services/profile-state.service.ts

@ -18,11 +18,11 @@ export class ProfileStateService {
return this.store.dispatch(new GetProfile()); return this.store.dispatch(new GetProfile());
} }
dispatchUpdateProfile(payload: Profile.Response) { dispatchUpdateProfile(...args: ConstructorParameters<typeof UpdateProfile>) {
return this.store.dispatch(new UpdateProfile(payload)); return this.store.dispatch(new UpdateProfile(...args));
} }
dispatchChangePassword(payload: Profile.ChangePasswordRequest) { dispatchChangePassword(...args: ConstructorParameters<typeof ChangePassword>) {
return this.store.dispatch(new ChangePassword(payload)); return this.store.dispatch(new ChangePassword(...args));
} }
} }

8
npm/ng-packs/packages/core/src/lib/services/session-state.service.ts

@ -18,11 +18,11 @@ export class SessionStateService {
return this.store.selectSnapshot(SessionState.getTenant); return this.store.selectSnapshot(SessionState.getTenant);
} }
dispatchSetLanguage(payload: string) { dispatchSetLanguage(...args: ConstructorParameters<typeof SetLanguage>) {
return this.store.dispatch(new SetLanguage(payload)); return this.store.dispatch(new SetLanguage(...args));
} }
dispatchSetTenant(payload: ABP.BasicItem) { dispatchSetTenant(...args: ConstructorParameters<typeof SetTenant>) {
return this.store.dispatch(new SetTenant(payload)); return this.store.dispatch(new SetTenant(...args));
} }
} }

Loading…
Cancel
Save