From 310a412e51d0db0c699509aa70d94be3480f2244 Mon Sep 17 00:00:00 2001 From: yuliaklochai Date: Thu, 24 Jul 2025 12:46:56 +0300 Subject: [PATCH] UI: fixed Trendz settings after review --- ui-ngx/src/app/core/auth/auth.actions.ts | 2 +- ui-ngx/src/app/core/auth/auth.reducer.ts | 2 +- .../app/modules/home/pages/admin/trendz-settings.component.ts | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ui-ngx/src/app/core/auth/auth.actions.ts b/ui-ngx/src/app/core/auth/auth.actions.ts index f9d63f4182..3e2b22ff63 100644 --- a/ui-ngx/src/app/core/auth/auth.actions.ts +++ b/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 | diff --git a/ui-ngx/src/app/core/auth/auth.reducer.ts b/ui-ngx/src/app/core/auth/auth.reducer.ts index 6752679261..785f40ce3c 100644 --- a/ui-ngx/src/app/core/auth/auth.reducer.ts +++ b/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; diff --git a/ui-ngx/src/app/modules/home/pages/admin/trendz-settings.component.ts b/ui-ngx/src/app/modules/home/pages/admin/trendz-settings.component.ts index 7aec9cd9eb..f477b6fdaf 100644 --- a/ui-ngx/src/app/modules/home/pages/admin/trendz-settings.component.ts +++ b/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)) }) } }