add loading while adding fees to ORD
This commit is contained in:
@@ -20,9 +20,11 @@ class IncidentsReport extends Component {
|
||||
};
|
||||
|
||||
render () {
|
||||
const { pendingIncidents, incidents } = this.props;
|
||||
const { pendingIncidents, incidents, pendingAddFeesStatus } = this.props;
|
||||
const { dateRange } = this.state;
|
||||
|
||||
const loading = pendingIncidents || pendingAddFeesStatus;
|
||||
|
||||
const membersMap = {};
|
||||
if (incidents && Array.isArray(incidents)) {
|
||||
incidents.forEach((incident) => {
|
||||
@@ -40,13 +42,13 @@ class IncidentsReport extends Component {
|
||||
<br/>
|
||||
<GenerateFeesInORDButton
|
||||
memberIds={memberIds}
|
||||
disabled={pendingIncidents}
|
||||
disabled={loading}
|
||||
dateRange={dateRange}
|
||||
/>
|
||||
<br/><br/>
|
||||
<hr/>
|
||||
<br/>
|
||||
<MemberIncidentsTables pendingIncidents={pendingIncidents} incidents={incidents} />
|
||||
<MemberIncidentsTables pendingIncidents={loading} incidents={incidents} />
|
||||
</Container>
|
||||
);
|
||||
}
|
||||
@@ -55,6 +57,7 @@ class IncidentsReport extends Component {
|
||||
const mapStateToProps = (state) => ({
|
||||
pendingIncidents: state.incidentsReport.pending,
|
||||
incidents: state.incidentsReport.result,
|
||||
pendingAddFeesStatus: state.addFeesStatus.pending,
|
||||
});
|
||||
|
||||
const mapDispatchToProps = (dispatch) => ({
|
||||
|
||||
Reference in New Issue
Block a user