mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-19 14:20:31 +00:00
WIP/customers
This commit is contained in:
10
client/src/store/customers/customers.selectors.js
Normal file
10
client/src/store/customers/customers.selectors.js
Normal file
@@ -0,0 +1,10 @@
|
||||
import { pickItemsFromIds } from 'store/selectors';
|
||||
|
||||
export const getCustomersItems = (state, viewId) => {
|
||||
const customersView = state.customers.views[viewId || -1];
|
||||
const customersItems = state.customers.items;
|
||||
|
||||
return typeof customersView === 'object'
|
||||
? pickItemsFromIds(customersItems, customersView.ids) || []
|
||||
: [];
|
||||
};
|
||||
Reference in New Issue
Block a user