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