WIP feature/Customers

This commit is contained in:
elforjani3
2020-06-17 15:56:46 +02:00
parent e20c912a3d
commit f35b4716a9
17 changed files with 1358 additions and 71 deletions

View File

@@ -36,10 +36,14 @@ const customersReducer = createReducer(initialState, {
delete state.items[action.id];
}
},
[t.CUSTOMERS_TABLE_LOADING]: (state, action) => {
const { loading } = action.payload;
state.loading = !!loading;
},
});
export default createTableQueryReducers('customers', customersReducer);
export const getCustomerById = (state, id) => {
return state.customers[id];
return state.customers.items[id];
};