mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-20 23:00:34 +00:00
Merge branch 'feature/manual-journals' of https://github.com/abouolia/Ratteb
This commit is contained in:
10
client/src/store/manualJournals/manualJournals.selectors.js
Normal file
10
client/src/store/manualJournals/manualJournals.selectors.js
Normal file
@@ -0,0 +1,10 @@
|
||||
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) || []
|
||||
: [];
|
||||
};
|
||||
Reference in New Issue
Block a user