mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-17 05:10:31 +00:00
feature : Puschases & Sales / fix : tasks
This commit is contained in:
@@ -2,23 +2,25 @@ import { connect } from 'react-redux';
|
||||
import { getResourceViews } from 'store/customViews/customViews.selectors';
|
||||
import {
|
||||
getReceiptCurrentPageFactory,
|
||||
getReceiptsTableQuery,
|
||||
getReceiptsTableQueryFactory,
|
||||
getReceiptsPaginationMetaFactory,
|
||||
} from 'store/receipt/receipt.selector';
|
||||
|
||||
export default (mapState) => {
|
||||
const getReceiptsItems = getReceiptCurrentPageFactory();
|
||||
const getReceiptPaginationMeta = getReceiptsPaginationMetaFactory();
|
||||
const getReceiptsTableQuery = getReceiptsTableQueryFactory();
|
||||
|
||||
const mapStateToProps = (state, props) => {
|
||||
const query = getReceiptsTableQuery(state, props);
|
||||
const tableQuery = getReceiptsTableQuery(state, props);
|
||||
|
||||
const mapped = {
|
||||
receiptsCurrentPage: getReceiptsItems(state, props, query),
|
||||
receiptsCurrentPage: getReceiptsItems(state, props, tableQuery),
|
||||
receiptview:getResourceViews(state, props, 'sales_receipts'),
|
||||
receiptItems: state.sales_receipts.items,
|
||||
receiptTableQuery: query,
|
||||
receiptsPagination: getReceiptPaginationMeta(state, props, query),
|
||||
receiptsLoading: state.sales_receipts.loading,
|
||||
receiptItems: state.salesReceipts.items,
|
||||
receiptTableQuery: tableQuery,
|
||||
receiptsPagination: getReceiptPaginationMeta(state, props, tableQuery),
|
||||
receiptsLoading: state.salesReceipts.loading,
|
||||
};
|
||||
|
||||
return mapState ? mapState(mapped, state, props) : mapped;
|
||||
|
||||
Reference in New Issue
Block a user