Add form component, redux devtools and fix reducers
This commit is contained in:
@@ -1,3 +1,3 @@
|
||||
export * from './reducers';
|
||||
export * from './reducer';
|
||||
export * from './actions';
|
||||
export * from './epics';
|
||||
@@ -12,6 +12,6 @@ export interface State {
|
||||
workloads: WorkloadsState;
|
||||
}
|
||||
|
||||
export const reducers = combineReducers<State, Action>({
|
||||
export const reducer = combineReducers<State, Action>({
|
||||
workloads: workloadReducer,
|
||||
});
|
||||
@@ -2,7 +2,7 @@ import { combineEpics, Epic, ofType } from 'redux-observable';
|
||||
import { map, tap, ignoreElements } from 'rxjs/operators';
|
||||
|
||||
import { Action } from '../actions';
|
||||
import { State } from '../reducers';
|
||||
import { State } from '../reducer';
|
||||
|
||||
|
||||
type AppEpic = Epic<Action, Action, State>;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
export * from './types';
|
||||
export * from './actions';
|
||||
export * from './reducers';
|
||||
export * from './reducer';
|
||||
export * from './epics';
|
||||
export * from './services';
|
||||
|
||||
@@ -19,6 +19,7 @@ export const reducer = (state: State = initialState, action: Action): State => {
|
||||
switch (action.type) {
|
||||
case 'WORKLOAD_CREATED':
|
||||
return {
|
||||
...state,
|
||||
[action.payload.id]: {
|
||||
id: action.payload.id,
|
||||
complexity: action.payload.complexity,
|
||||
@@ -29,6 +30,7 @@ export const reducer = (state: State = initialState, action: Action): State => {
|
||||
|
||||
case 'WORKLOAD_CANCEL':
|
||||
return {
|
||||
...state,
|
||||
[action.payload.id]: {
|
||||
...state[action.payload.id],
|
||||
status: 'CANCELED',
|
||||
@@ -37,6 +39,7 @@ export const reducer = (state: State = initialState, action: Action): State => {
|
||||
|
||||
case 'WORKLOAD_UPDATE_STATUS':
|
||||
return {
|
||||
...state,
|
||||
[action.payload.id]: {
|
||||
...state[action.payload.id],
|
||||
status: action.payload.status,
|
||||
Reference in New Issue
Block a user