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