mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-19 14:20:31 +00:00
Fix: specific item api & customer api
This commit is contained in:
@@ -11,7 +11,7 @@ const initialState = {
|
||||
};
|
||||
|
||||
const customersReducer = createReducer(initialState, {
|
||||
[t.CUSTOMER_SET]: (state, action) => {
|
||||
[t.CUSTOMERS_ITEMS_SET]: (state, action) => {
|
||||
const _customers = {};
|
||||
|
||||
action.customers.forEach((customer) => {
|
||||
@@ -51,6 +51,10 @@ const customersReducer = createReducer(initialState, {
|
||||
});
|
||||
state.items = items;
|
||||
},
|
||||
[t.CUSTOMER_SET]: (state, action) => {
|
||||
const { id, customer } = action.payload;
|
||||
state.items[id] = { ...customer };
|
||||
},
|
||||
});
|
||||
|
||||
export default createTableQueryReducers('customers', customersReducer);
|
||||
|
||||
Reference in New Issue
Block a user