Browse Source

UI: fixed Trendz settings after review

pull/13761/head
yuliaklochai 1 year ago
parent
commit
310a412e51
  1. 2
      ui-ngx/src/app/core/auth/auth.actions.ts
  2. 2
      ui-ngx/src/app/core/auth/auth.reducer.ts
  3. 2
      ui-ngx/src/app/modules/home/pages/admin/trendz-settings.component.ts

2
ui-ngx/src/app/core/auth/auth.actions.ts

@ -102,7 +102,7 @@ export class ActionPreferencesDeleteUserSettings implements Action {
export class ActionAuthUpdateTrendzSettings implements Action {
readonly type = AuthActionTypes.UPDATE_TRENDZ_SETTINGS;
constructor(readonly payload: { trendzSettings: TrendzSettings }) {}
constructor(readonly payload: TrendzSettings) {}
}
export type AuthActions = ActionAuthAuthenticated | ActionAuthUnauthenticated |

2
ui-ngx/src/app/core/auth/auth.reducer.ts

@ -100,7 +100,7 @@ export const authReducer = (
return { ...state, ...{ userSettings }};
case AuthActionTypes.UPDATE_TRENDZ_SETTINGS:
return { ...state, ...action.payload };
return { ...state, trendzSettings: action.payload };
default:
return state;

2
ui-ngx/src/app/modules/home/pages/admin/trendz-settings.component.ts

@ -97,7 +97,7 @@ export class TrendzSettingsComponent extends PageComponent implements OnInit, Ha
this.trendzSettingsService.saveTrendzSettings(trendzSettings)
.subscribe(() => {
this.setTrendzSettings(trendzSettings);
this.store.dispatch(new ActionAuthUpdateTrendzSettings({ trendzSettings: trendzSettings}))
this.store.dispatch(new ActionAuthUpdateTrendzSettings(trendzSettings))
})
}
}

Loading…
Cancel
Save