diff options
Diffstat (limited to 'vid-webpack-master/src/app/shared/storeUtil/utils/global/global.reducers.ts')
-rw-r--r-- | vid-webpack-master/src/app/shared/storeUtil/utils/global/global.reducers.ts | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/vid-webpack-master/src/app/shared/storeUtil/utils/global/global.reducers.ts b/vid-webpack-master/src/app/shared/storeUtil/utils/global/global.reducers.ts index aedcce24b..49df2088a 100644 --- a/vid-webpack-master/src/app/shared/storeUtil/utils/global/global.reducers.ts +++ b/vid-webpack-master/src/app/shared/storeUtil/utils/global/global.reducers.ts @@ -8,7 +8,7 @@ import { UpdateGenericModalHelper, DeleteGenericModalHelper, DeleteGenericModalTabelDataHelper, - UpdateGenericModalTableDataHelper + UpdateGenericModalTableDataHelper, UpdateCurrentModalModeAction } from "./global.actions"; import * as _ from "lodash"; @@ -18,6 +18,7 @@ export interface GlobalState { drawingBoardStatus : string; genericModalCriteria : { [key: string]: any }; genericModalHelper : { [key: string]: any }; + isUpdateModalMode?: boolean; } @@ -28,7 +29,8 @@ const initialState: GlobalState = { genericModalCriteria : { roles : [] }, - genericModalHelper : {} + genericModalHelper : {}, + isUpdateModalMode : null }; export const globalReducer = @@ -81,6 +83,15 @@ export const globalReducer = newState.genericModalHelper[(<UpdateGenericModalTableDataHelper>action).field] = (<UpdateGenericModalTableDataHelper>action).values ; return newState; } + case GlobalActions.UPDATE_CURRENT_MODAL_MODE : { + let newState = {...state}; + if ((<UpdateCurrentModalModeAction>action).isUpdateModalMode === null){ + delete newState.isUpdateModalMode; + } else { + newState.isUpdateModalMode = (<UpdateCurrentModalModeAction>action).isUpdateModalMode; + } + return newState; + } default: return state; } |