Bugfix for fees / Oauth 2 implementation

This commit is contained in:
Senad Uka
2019-08-31 06:11:15 +02:00
parent cbf502bc14
commit b3e2de9f57
15 changed files with 245 additions and 23 deletions

View File

@@ -7,7 +7,7 @@ import MonthSelector from '../../components/MonthSelector';
import MemberIncidentsTables from '../../components/MemberIncidentsTables';
import GenerateFeesInORDButton from '../../components/GenerateFeesInORDButton';
import { fetchIncidents, addFeesToOrd } from '../../store/actions';
import { fetchIncidents } from '../../store/actions';
class IncidentsReport extends Component {
state = {dateRange: null};
@@ -31,7 +31,6 @@ class IncidentsReport extends Component {
membersMap[incident.memberId] = true;
});
}
const memberIds = Object.keys(membersMap) || [];
return (
<Container>
@@ -41,7 +40,6 @@ class IncidentsReport extends Component {
<MonthSelector buttonLabel="Show report" onDatesUpdate={this.onDatesUpdate} inlineButton />
<br/>
<GenerateFeesInORDButton
memberIds={memberIds}
disabled={loading}
dateRange={dateRange}
/>
@@ -61,8 +59,7 @@ const mapStateToProps = (state) => ({
});
const mapDispatchToProps = (dispatch) => ({
fetchIncidents: (dateRange) => fetchIncidents(dispatch, dateRange),
addFeesToOrd: (dateRange, memberIds) => addFeesToOrd(dispatch, dateRange, memberIds),
fetchIncidents: (dateRange) => fetchIncidents(dispatch, dateRange)
});
export default connect(mapStateToProps, mapDispatchToProps)(IncidentsReport);