|
|
@ -15,7 +15,7 @@ |
|
|
///
|
|
|
///
|
|
|
|
|
|
|
|
|
import { Action } from '@ngrx/store'; |
|
|
import { Action } from '@ngrx/store'; |
|
|
import { User } from '@shared/models/user.model'; |
|
|
import { AuthUser, User } from '@shared/models/user.model'; |
|
|
import { AuthPayload } from '@core/auth/auth.models'; |
|
|
import { AuthPayload } from '@core/auth/auth.models'; |
|
|
import { UserSettings } from '@shared/models/user-settings.models'; |
|
|
import { UserSettings } from '@shared/models/user-settings.models'; |
|
|
|
|
|
|
|
|
@ -24,6 +24,7 @@ export enum AuthActionTypes { |
|
|
UNAUTHENTICATED = '[Auth] Unauthenticated', |
|
|
UNAUTHENTICATED = '[Auth] Unauthenticated', |
|
|
LOAD_USER = '[Auth] Load User', |
|
|
LOAD_USER = '[Auth] Load User', |
|
|
UPDATE_USER_DETAILS = '[Auth] Update User Details', |
|
|
UPDATE_USER_DETAILS = '[Auth] Update User Details', |
|
|
|
|
|
UPDATE_AUTH_USER = '[Auth] Update Auth User', |
|
|
UPDATE_LAST_PUBLIC_DASHBOARD_ID = '[Auth] Update Last Public Dashboard Id', |
|
|
UPDATE_LAST_PUBLIC_DASHBOARD_ID = '[Auth] Update Last Public Dashboard Id', |
|
|
UPDATE_HAS_REPOSITORY = '[Auth] Change Has Repository', |
|
|
UPDATE_HAS_REPOSITORY = '[Auth] Change Has Repository', |
|
|
UPDATE_OPENED_MENU_SECTION = '[Preferences] Update Opened Menu Section', |
|
|
UPDATE_OPENED_MENU_SECTION = '[Preferences] Update Opened Menu Section', |
|
|
@ -53,6 +54,12 @@ export class ActionAuthUpdateUserDetails implements Action { |
|
|
constructor(readonly payload: { userDetails: User }) {} |
|
|
constructor(readonly payload: { userDetails: User }) {} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
export class ActionAuthUpdateAuthUser implements Action { |
|
|
|
|
|
readonly type = AuthActionTypes.UPDATE_AUTH_USER; |
|
|
|
|
|
|
|
|
|
|
|
constructor(readonly payload: Partial<AuthUser>) {} |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
export class ActionAuthUpdateLastPublicDashboardId implements Action { |
|
|
export class ActionAuthUpdateLastPublicDashboardId implements Action { |
|
|
readonly type = AuthActionTypes.UPDATE_LAST_PUBLIC_DASHBOARD_ID; |
|
|
readonly type = AuthActionTypes.UPDATE_LAST_PUBLIC_DASHBOARD_ID; |
|
|
|
|
|
|
|
|
@ -85,4 +92,5 @@ export class ActionPreferencesDeleteUserSettings implements Action { |
|
|
|
|
|
|
|
|
export type AuthActions = ActionAuthAuthenticated | ActionAuthUnauthenticated | |
|
|
export type AuthActions = ActionAuthAuthenticated | ActionAuthUnauthenticated | |
|
|
ActionAuthLoadUser | ActionAuthUpdateUserDetails | ActionAuthUpdateLastPublicDashboardId | ActionAuthUpdateHasRepository | |
|
|
ActionAuthLoadUser | ActionAuthUpdateUserDetails | ActionAuthUpdateLastPublicDashboardId | ActionAuthUpdateHasRepository | |
|
|
ActionPreferencesUpdateOpenedMenuSection | ActionPreferencesPutUserSettings | ActionPreferencesDeleteUserSettings; |
|
|
ActionPreferencesUpdateOpenedMenuSection | ActionPreferencesPutUserSettings | ActionPreferencesDeleteUserSettings | |
|
|
|
|
|
ActionAuthUpdateAuthUser; |
|
|
|