mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-19 06:10:31 +00:00
WIP feature/Customers
This commit is contained in:
@@ -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];
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user