mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-17 21:30:31 +00:00
feature : Puschases & Sales / fix : tasks
This commit is contained in:
@@ -3,21 +3,28 @@ import { getResourceViews } from 'store/customViews/customViews.selectors';
|
||||
import {
|
||||
getInvoiceCurrentPageFactory,
|
||||
getInvoicePaginationMetaFactory,
|
||||
getInvoiceTableQueryFactory,
|
||||
getInvoiceTableQuery,
|
||||
getdueInvoices,
|
||||
} from 'store/Invoice/invoices.selector';
|
||||
|
||||
export default (mapState) => {
|
||||
const getInvoicesItems = getInvoiceCurrentPageFactory();
|
||||
|
||||
const getInvoicesPaginationMeta = getInvoicePaginationMetaFactory();
|
||||
const getInvoiceTableQuery = getInvoiceTableQueryFactory();
|
||||
|
||||
const mapStateToProps = (state, props) => {
|
||||
const query = getInvoiceTableQuery(state, props);
|
||||
|
||||
const mapped = {
|
||||
invoicesCurrentPage: getInvoicesItems(state, props, query),
|
||||
invoicesViews: getResourceViews(state, props, 'sales_invoices'),
|
||||
invoicesItems: state.sales_invoices.items,
|
||||
invoicesItems: state.salesInvoices.items,
|
||||
invoicesTableQuery: query,
|
||||
invoicesPageination: getInvoicesPaginationMeta(state, props, query),
|
||||
invoicesLoading: state.sales_invoices.loading,
|
||||
invoicesLoading: state.salesInvoices.loading,
|
||||
dueInvoices: getdueInvoices(state, props),
|
||||
};
|
||||
return mapState ? mapState(mapped, state, props) : mapped;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user