mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-19 22:30:31 +00:00
feature : Puschases & Sales / fix : tasks
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
import { connect } from 'react-redux';
|
||||
import { getResourceViews } from 'store/customViews/customViews.selectors';
|
||||
import {
|
||||
getPaymentReceiveCurrentPageFactory,
|
||||
getPaymentReceivePaginationMetaFactory,
|
||||
getPaymentReceiveTableQuery,
|
||||
} from 'store/PaymentReceive/paymentReceive.selector';
|
||||
|
||||
|
||||
export default (mapState) => {
|
||||
const getPyamentReceivesItems = getPaymentReceiveCurrentPageFactory();
|
||||
const getPyamentReceivesPaginationMeta = getPaymentReceivePaginationMetaFactory();
|
||||
const mapStateToProps = (state, props) => {
|
||||
const query = getPaymentReceiveTableQuery(state, props);
|
||||
const mapped = {
|
||||
PaymentReceivesCurrentPage: getPyamentReceivesItems(state, props, query),
|
||||
paymentReceivesViews: getResourceViews(state, props, 'payment_receives'),
|
||||
paymentReceivesItems: state.paymentReceives.items,
|
||||
paymentReceivesTableQuery: query,
|
||||
paymentReceivesPageination: getPyamentReceivesPaginationMeta(state, props, query),
|
||||
paymentReceivesLoading: state.paymentReceives.loading,
|
||||
};
|
||||
return mapState ? mapState(mapped, state, props) : mapped;
|
||||
};
|
||||
return connect(mapStateToProps);
|
||||
};
|
||||
Reference in New Issue
Block a user