1
0
mirror of https://github.com/aclindsa/moneygo.git synced 2024-10-30 23:50:04 -04:00
moneygo/js/containers/ReportsTabContainer.js

28 lines
951 B
JavaScript
Raw Normal View History

2017-02-11 20:39:38 -05:00
var connect = require('react-redux').connect;
var ReportActions = require('../actions/ReportActions');
var ReportsTab = require('../components/ReportsTab');
function mapStateToProps(state) {
return {
reports: state.reports
2017-02-11 20:39:38 -05:00
}
}
function mapDispatchToProps(dispatch) {
return {
onFetchAllReports: function() {dispatch(ReportActions.fetchAll())},
onCreateReport: function(report) {dispatch(ReportActions.create(report))},
onUpdateReport: function(report) {dispatch(ReportActions.update(report))},
onDeleteReport: function(report) {dispatch(ReportActions.remove(report))},
onSelectReport: function(report) {dispatch(ReportActions.select(report))},
onTabulateReport: function(report) {dispatch(ReportActions.tabulate(report))},
onSelectSeries: function(tabulation, seriesTraversal) {dispatch(ReportActions.selectSeries(tabulation, seriesTraversal))}
2017-02-11 20:39:38 -05:00
}
}
module.exports = connect(
mapStateToProps,
mapDispatchToProps
)(ReportsTab)