include all incident types in summary
This commit is contained in:
@@ -1,7 +1,11 @@
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
import { Loader, Grid } from 'semantic-ui-react';
|
import { Loader, Grid } from 'semantic-ui-react';
|
||||||
|
|
||||||
import { UNSCHEDULED_INCIDENT_BEFORE_RESERVATION, UNLOCKED_INCIDENT_RELATED_WITH_RESERVATION } from '../../../constants/enums';
|
import {
|
||||||
|
UNSCHEDULED_INCIDENT_BEFORE_RESERVATION,
|
||||||
|
UNLOCKED_INCIDENT_RELATED_WITH_RESERVATION,
|
||||||
|
UNSCHEDULED_INCIDENT_AFTER_RESERVATION, UNSCHEDULED_INCIDENT_STANDALONE, UNLOCKED_INCIDENT_STANDALONE
|
||||||
|
} from '../../../constants/enums';
|
||||||
|
|
||||||
const MemberSummary = props => {
|
const MemberSummary = props => {
|
||||||
const { loading } = props;
|
const { loading } = props;
|
||||||
@@ -13,9 +17,12 @@ const MemberSummary = props => {
|
|||||||
incidents.forEach((incident) => {
|
incidents.forEach((incident) => {
|
||||||
switch (incident.incidentType) {
|
switch (incident.incidentType) {
|
||||||
case UNSCHEDULED_INCIDENT_BEFORE_RESERVATION:
|
case UNSCHEDULED_INCIDENT_BEFORE_RESERVATION:
|
||||||
|
case UNSCHEDULED_INCIDENT_AFTER_RESERVATION:
|
||||||
|
case UNSCHEDULED_INCIDENT_STANDALONE:
|
||||||
totalUnscheduledFees += parseFloat(incident.totalChargeFee);
|
totalUnscheduledFees += parseFloat(incident.totalChargeFee);
|
||||||
break;
|
break;
|
||||||
case UNLOCKED_INCIDENT_RELATED_WITH_RESERVATION:
|
case UNLOCKED_INCIDENT_RELATED_WITH_RESERVATION:
|
||||||
|
case UNLOCKED_INCIDENT_STANDALONE:
|
||||||
totalUnlockedFees += parseFloat(incident.incidentPrice);
|
totalUnlockedFees += parseFloat(incident.incidentPrice);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
|||||||
Reference in New Issue
Block a user