diff options
author | Aijana Schumann <aijana.schumann@highstreet-technologies.com> | 2020-03-13 10:39:11 +0100 |
---|---|---|
committer | Aijana S <aijana.schumann@highstreet-technologies.com> | 2020-03-13 10:14:15 +0000 |
commit | ce78a6683ab8648ed90e944cd23ed7c01205fce6 (patch) | |
tree | 42bac21bac743bdf889639c732aa70b2f747eb29 /sdnr/wt/odlux/apps/faultApp/src/handlers | |
parent | f3bd99fbe11c443966fff14c6990367b36bdedc4 (diff) |
Fix odlux bugs
Fix help and about app not scrollable
Fix filter hiding and showing without user interaction and default sort in all tables
Issue-ID: SDNC-1117
Signed-off-by: Aijana Schumann <aijana.schumann@highstreet-technologies.com>
Change-Id: I5c6ff86c73a3b222a8d9022125454788496f6399
Diffstat (limited to 'sdnr/wt/odlux/apps/faultApp/src/handlers')
-rw-r--r-- | sdnr/wt/odlux/apps/faultApp/src/handlers/faultAppRootHandler.ts | 24 |
1 files changed, 15 insertions, 9 deletions
diff --git a/sdnr/wt/odlux/apps/faultApp/src/handlers/faultAppRootHandler.ts b/sdnr/wt/odlux/apps/faultApp/src/handlers/faultAppRootHandler.ts index a5cf928fc..e03d2b560 100644 --- a/sdnr/wt/odlux/apps/faultApp/src/handlers/faultAppRootHandler.ts +++ b/sdnr/wt/odlux/apps/faultApp/src/handlers/faultAppRootHandler.ts @@ -26,26 +26,31 @@ import { IActionHandler } from '../../../../framework/src/flux/action'; import { IFaultNotifications, faultNotificationsHandler } from './notificationsHandler'; import { ICurrentProblemsState, currentProblemsActionHandler } from './currentProblemsHandler'; import { IAlarmLogEntriesState, alarmLogEntriesActionHandler } from './alarmLogEntriesHandler'; -import { SetPanelAction, RememberCurrentPanelAction } from '../actions/panelChangeActions'; +import { SetPanelAction } from '../actions/panelChangeActions'; import { IFaultStatus, faultStatusHandler } from './faultStatusHandler'; import { stuckAlarmHandler } from './clearStuckAlarmsHandler'; import { PanelId } from 'models/panelId'; +import { SetPartialUpdatesAction } from '../actions/partialUpdatesAction'; export interface IFaultAppStoreState { currentProblems: ICurrentProblemsState; faultNotifications: IFaultNotifications; alarmLogEntries: IAlarmLogEntriesState; - currentOpenPanel: ICurrentOpenPanelState; + currentOpenPanel: PanelId | null; faultStatus: IFaultStatus; + listenForPartialUpdates: boolean; } -type ICurrentOpenPanelState = { openPanel: string | null, savedPanel: PanelId | null }; -const panelInitState = { openPanel: null, savedPanel: null }; -const currentOpenPanelHandler: IActionHandler<ICurrentOpenPanelState> = (state = panelInitState, action) => { +const currentOpenPanelHandler: IActionHandler<PanelId | null> = (state = null, action) => { if (action instanceof SetPanelAction) { - state = { ...state, openPanel: action.panelId }; - } else if (action instanceof RememberCurrentPanelAction) { - state = { ...state, savedPanel: action.panelId }; + state = action.panelId; + } + return state; +} + +const arePartialUpdatesActiveHandler: IActionHandler<boolean> = (state = false, action) => { + if (action instanceof SetPartialUpdatesAction) { + state = action.isActive; } return state; } @@ -62,7 +67,8 @@ const actionHandlers = { alarmLogEntries: alarmLogEntriesActionHandler, currentOpenPanel: currentOpenPanelHandler, faultStatus: faultStatusHandler, - stuckAlarms: stuckAlarmHandler + stuckAlarms: stuckAlarmHandler, + listenForPartialUpdates: arePartialUpdatesActiveHandler }; export const faultAppRootHandler = combineActionHandler<IFaultAppStoreState>(actionHandlers); |