feature/IO-3026-Enhanced-Notifications - final revisions

Signed-off-by: Dave Richer <dave@imexsystems.ca>
This commit is contained in:
Dave Richer
2024-11-12 14:20:49 -08:00
parent 1440a60228
commit 6f454dd4cb
6 changed files with 99 additions and 32 deletions

View File

@@ -92,19 +92,11 @@ const applicationReducer = (state = INITIAL_STATE, action) => {
case ApplicationActionTypes.SET_WSS_STATUS: {
return { ...state, wssStatus: action.payload };
}
case ApplicationActionTypes.SET_ALERTS: {
const alertsMap = {};
action.payload.forEach((alert) => {
alertsMap[alert.id] = alert;
});
return {
...state,
alerts: alertsMap
};
}
case ApplicationActionTypes.ADD_ALERTS: {
const newAlertsMap = { ...state.alerts };
action.payload.forEach((alert) => {
action.payload.alerts.forEach((alert) => {
newAlertsMap[alert.id] = alert;
});
return {