add link to member summary report from incidents table

This commit is contained in:
Bilal Catic
2019-06-21 11:36:17 +02:00
parent ac92401960
commit f7c30919e6
6 changed files with 47 additions and 15 deletions

View File

@@ -24,7 +24,7 @@ class IncidentsReport extends Component {
<hr/>
<DateRangePicker buttonLabel="Show report" onDatesUpdate={this.onDatesUpdate.bind(this)} />
<br/>
<MemberIncidentsTable loading={pendingIncidents} incidents={incidents} />
<MemberIncidentsTable loading={pendingIncidents} incidents={incidents} openMemberSummaryOnMemberClick />
</Container>
);
}

View File

@@ -11,7 +11,6 @@ const MemberSummary = props => {
let totalUnlockedFees = 0;
incidents.forEach((incident) => {
console.log(incident);
switch (incident.incidentType) {
case UNSCHEDULED_INCIDENT:
totalUnscheduledFees += parseFloat(incident.totalChargeFee);
@@ -19,6 +18,8 @@ const MemberSummary = props => {
case UNLOCKED_INCIDENT:
totalUnlockedFees += parseFloat(incident.incidentPrice);
break;
default:
break;
}
});
@@ -65,5 +66,4 @@ const MemberSummary = props => {
);
};
export default MemberSummary;

View File

@@ -16,7 +16,7 @@ class PracticeSummaryReport extends Component {
this.state = {
dateRange: null,
memberId: null,
memberId: props.match.params.memberId,
};
}