mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-19 14:20:31 +00:00
11 lines
347 B
JavaScript
11 lines
347 B
JavaScript
import { pickItemsFromIds } from 'store/selectors';
|
|
|
|
export const getManualJournalsItems = (state, viewId) => {
|
|
const accountsView = state.manualJournals.views[viewId || -1];
|
|
const accountsItems = state.manualJournals.items;
|
|
|
|
return typeof accountsView === 'object'
|
|
? pickItemsFromIds(accountsItems, accountsView.ids) || []
|
|
: [];
|
|
};
|