refactor(core): change state service dispatcher parameters

pull/2431/head
TheDiaval 6 years ago
parent 4459c62029
commit d30f5a7af6

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

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

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

Loading…
Cancel
Save