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