Implement toggleaccountmenu action
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:
@@ -18,6 +18,7 @@ export interface State {
|
||||
routeLoading:boolean,
|
||||
menuVisible: boolean,
|
||||
userPackages: IPackages,
|
||||
accountMenuVisible: boolean
|
||||
}
|
||||
|
||||
export const initialState: State = {
|
||||
@@ -29,7 +30,8 @@ export const initialState: State = {
|
||||
fullScreen: true,
|
||||
routeLoading: false,
|
||||
menuVisible: false,
|
||||
userPackages: {}
|
||||
userPackages: {},
|
||||
accountMenuVisible: false
|
||||
}
|
||||
|
||||
export function reducer(state = initialState, action: appCommonActions.Actions ): State {
|
||||
@@ -85,8 +87,11 @@ export function reducer(state = initialState, action: appCommonActions.Actions )
|
||||
case appCommonActions.TOGGLEMENU: {
|
||||
return tassign(state, { menuVisible: !state.menuVisible });
|
||||
}
|
||||
case appCommonActions.TOGGLEACCOUNTMENU: {
|
||||
return tassign(state, { accountMenuVisible: !state.accountMenuVisible });
|
||||
}
|
||||
case appCommonActions.ESCAPE: {
|
||||
return tassign(state, { menuVisible: false });
|
||||
return tassign(state, { menuVisible: false,accountMenuVisible:false });
|
||||
}
|
||||
case appCommonActions.SETMENUVISIBLE: {
|
||||
let a = action as appCommonActions.SetMenuVisible;
|
||||
@@ -116,6 +121,7 @@ export const getRouteLoading = (state: State) => state.routeLoading;
|
||||
export const getMenuVisible = (state: State) => state.menuVisible;
|
||||
export const getUser = (state: State) => state.user;
|
||||
export const getUserPackages = (state: State) => state.userPackages;
|
||||
export const getAccountMenuVisible = (state: State) => state.accountMenuVisible;
|
||||
|
||||
export const selectAppCommonState = createFeatureSelector<State>(MODULE_NAME);
|
||||
|
||||
@@ -128,4 +134,5 @@ export const selectGetRouteLoading = createSelector(selectAppCommonState, getRou
|
||||
export const SelectGetMenuVisible = createSelector(selectAppCommonState,getMenuVisible);
|
||||
export const SelectGetUser = createSelector(selectAppCommonState,getUser);
|
||||
export const SelectGetUserPackages = createSelector(selectAppCommonState,getUserPackages);
|
||||
export const SelectGetAccountMenuVisible = createSelector(selectAppCommonState,getAccountMenuVisible);
|
||||
|
||||
|
Reference in New Issue
Block a user