First functional version
All checks were successful
FarmMaps.Develop/FarmMapsLib/develop This commit looks good
All checks were successful
FarmMaps.Develop/FarmMapsLib/develop This commit looks good
This commit is contained in:
@@ -12,7 +12,9 @@ export interface State {
|
||||
initialized: boolean,
|
||||
rootItems: IListItem[],
|
||||
itemTypes: IItemTypes,
|
||||
user:IUser
|
||||
user:IUser,
|
||||
fullScreen: boolean,
|
||||
routeLoading:boolean
|
||||
}
|
||||
|
||||
export const initialState: State = {
|
||||
@@ -20,7 +22,9 @@ export const initialState: State = {
|
||||
initialized: false,
|
||||
rootItems: [],
|
||||
itemTypes: {},
|
||||
user:null
|
||||
user:null,
|
||||
fullScreen: true,
|
||||
routeLoading: false
|
||||
}
|
||||
|
||||
export function reducer(state = initialState, action: appCommonActions.Actions ): State {
|
||||
@@ -46,6 +50,26 @@ export function reducer(state = initialState, action: appCommonActions.Actions )
|
||||
let a = action as appCommonActions.LoadItemTypesSuccess;
|
||||
return tassign(state, { itemTypes: a.itemTypes });
|
||||
}
|
||||
case appCommonActions.FULLSCREEN: {
|
||||
return tassign(state, {
|
||||
fullScreen:true
|
||||
});
|
||||
}
|
||||
case appCommonActions.SHOWNAVBAR: {
|
||||
return tassign(state, {
|
||||
fullScreen: false
|
||||
});
|
||||
}
|
||||
case appCommonActions.STARTROUTELOADING: {
|
||||
return tassign(state, {
|
||||
routeLoading: true
|
||||
});
|
||||
}
|
||||
case appCommonActions.ENDROUTELOADING: {
|
||||
return tassign(state, {
|
||||
routeLoading: false
|
||||
});
|
||||
}
|
||||
default: {
|
||||
return state;
|
||||
}
|
||||
@@ -56,6 +80,9 @@ export const getOpenedModalName = (state: State) => state.openedModalName;
|
||||
export const getInitialized = (state: State) => state.initialized;
|
||||
export const getItemTypes = (state: State) => state.itemTypes;
|
||||
export const getRootItems = (state: State) => state.rootItems;
|
||||
export const getFullScreen = (state: State) => state.fullScreen;
|
||||
export const getRouteLoading = (state: State) => state.routeLoading;
|
||||
|
||||
|
||||
export const selectAppCommonState = createFeatureSelector<State>(MODULE_NAME);
|
||||
|
||||
@@ -63,3 +90,6 @@ export const selectOpenedModalName = createSelector(selectAppCommonState, getOpe
|
||||
export const selectGetInitialized = createSelector(selectAppCommonState, getInitialized);
|
||||
export const selectGetItemTypes = createSelector(selectAppCommonState, getItemTypes);
|
||||
export const selectGetRootItems = createSelector(selectAppCommonState, getRootItems);
|
||||
export const selectGetFullScreen = createSelector(selectAppCommonState, getFullScreen);
|
||||
export const selectGetRouteLoading = createSelector(selectAppCommonState, getRouteLoading);
|
||||
|
||||
|
Reference in New Issue
Block a user