AW-1431 Add InitUserSettingsRoot
All checks were successful
FarmMaps.Develop/FarmMapsLib/pipeline/head This commit looks good
All checks were successful
FarmMaps.Develop/FarmMapsLib/pipeline/head This commit looks good
This commit is contained in:
@@ -7,6 +7,7 @@ import * as appCommonActions from '../actions/app-common.actions';
|
||||
import { createSelector, createFeatureSelector, ActionReducerMap } from '@ngrx/store';
|
||||
|
||||
import { MODULE_NAME } from '../module-name';
|
||||
import { IItem } from '../models/item';
|
||||
|
||||
export interface State {
|
||||
openedModalName: string,
|
||||
@@ -18,6 +19,7 @@ export interface State {
|
||||
routeLoading:boolean,
|
||||
menuVisible: boolean,
|
||||
userPackages: IPackages,
|
||||
userSettingsRoot: IItem,
|
||||
accountMenuVisible: boolean,
|
||||
isOnline: boolean
|
||||
}
|
||||
@@ -32,6 +34,7 @@ export const initialState: State = {
|
||||
routeLoading: false,
|
||||
menuVisible: false,
|
||||
userPackages: {},
|
||||
userSettingsRoot: null,
|
||||
accountMenuVisible: false,
|
||||
isOnline: true
|
||||
}
|
||||
@@ -111,6 +114,10 @@ export function reducer(state = initialState, action: appCommonActions.Actions )
|
||||
|
||||
return tassign(state,{userPackages:packages});
|
||||
}
|
||||
case appCommonActions.INITUSERSETTINGSROOTSUCCESS:{
|
||||
let a = action as appCommonActions.InitUserSettingsRootSuccess;
|
||||
return tassign(state, { userSettingsRoot : a.item });
|
||||
}
|
||||
case appCommonActions.LOGOUT:{
|
||||
return tassign(state,{user:null,initialized:false});
|
||||
}
|
||||
|
Reference in New Issue
Block a user