mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-19 14:20:31 +00:00
fix: View.
This commit is contained in:
@@ -1,27 +1,30 @@
|
||||
import { connect } from 'react-redux';
|
||||
import {
|
||||
getAccountsItems, getAccountsListFactory,
|
||||
getAccountsItems,
|
||||
getAccountsListFactory,
|
||||
getAccountsTableQuery,
|
||||
} from 'store/accounts/accounts.selectors';
|
||||
import {
|
||||
getResourceViews,
|
||||
} from 'store/customViews/customViews.selectors';
|
||||
import { getResourceViews } from 'store/customViews/customViews.selectors';
|
||||
|
||||
export default (mapState) => {
|
||||
const getAccountsList = getAccountsListFactory();
|
||||
|
||||
const mapStateToProps = (state, props) => {
|
||||
const query = getAccountsTableQuery(state, props);
|
||||
|
||||
const mapped = {
|
||||
accountsViews: getResourceViews(state, props, 'accounts'),
|
||||
accountsTable: getAccountsItems(state, props),
|
||||
accountsList: getAccountsList(state, props),
|
||||
accountsTypes: state.accounts.accountsTypes,
|
||||
|
||||
|
||||
// accountsTableQuery: query,
|
||||
accountsTableQuery: state.accounts.tableQuery,
|
||||
accountsLoading: state.accounts.loading,
|
||||
accountErrors: state.accounts.errors,
|
||||
};
|
||||
return mapState ? mapState(mapped, state, props) : mapped;
|
||||
};
|
||||
|
||||
|
||||
return connect(mapStateToProps);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user