send empty array if sending fees to the ORD for all members
This commit is contained in:
@@ -7,7 +7,7 @@ import MonthSelector from '../../components/MonthSelector';
|
|||||||
import MemberIncidentsTables from '../../components/MemberIncidentsTables';
|
import MemberIncidentsTables from '../../components/MemberIncidentsTables';
|
||||||
import GenerateFeesInORDButton from '../../components/GenerateFeesInORDButton';
|
import GenerateFeesInORDButton from '../../components/GenerateFeesInORDButton';
|
||||||
|
|
||||||
import { fetchIncidents, addFeesToOrd } from '../../store/actions';
|
import { fetchIncidents } from '../../store/actions';
|
||||||
|
|
||||||
class IncidentsReport extends Component {
|
class IncidentsReport extends Component {
|
||||||
state = {dateRange: null};
|
state = {dateRange: null};
|
||||||
@@ -31,7 +31,6 @@ class IncidentsReport extends Component {
|
|||||||
membersMap[incident.memberId] = true;
|
membersMap[incident.memberId] = true;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
const memberIds = Object.keys(membersMap) || [];
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Container>
|
<Container>
|
||||||
@@ -41,7 +40,6 @@ class IncidentsReport extends Component {
|
|||||||
<MonthSelector buttonLabel="Show report" onDatesUpdate={this.onDatesUpdate} inlineButton />
|
<MonthSelector buttonLabel="Show report" onDatesUpdate={this.onDatesUpdate} inlineButton />
|
||||||
<br/>
|
<br/>
|
||||||
<GenerateFeesInORDButton
|
<GenerateFeesInORDButton
|
||||||
memberIds={memberIds}
|
|
||||||
disabled={loading}
|
disabled={loading}
|
||||||
dateRange={dateRange}
|
dateRange={dateRange}
|
||||||
/>
|
/>
|
||||||
@@ -61,8 +59,7 @@ const mapStateToProps = (state) => ({
|
|||||||
});
|
});
|
||||||
|
|
||||||
const mapDispatchToProps = (dispatch) => ({
|
const mapDispatchToProps = (dispatch) => ({
|
||||||
fetchIncidents: (dateRange) => fetchIncidents(dispatch, dateRange),
|
fetchIncidents: (dateRange) => fetchIncidents(dispatch, dateRange)
|
||||||
addFeesToOrd: (dateRange, memberIds) => addFeesToOrd(dispatch, dateRange, memberIds),
|
|
||||||
});
|
});
|
||||||
|
|
||||||
export default connect(mapStateToProps, mapDispatchToProps)(IncidentsReport);
|
export default connect(mapStateToProps, mapDispatchToProps)(IncidentsReport);
|
||||||
|
|||||||
Reference in New Issue
Block a user