make difference between pre-reservation and post-reservation unscheduled use
This commit is contained in:
@@ -400,7 +400,7 @@ const getIncidentData = (reservation) => {
|
||||
// 1. Check if member entered before reservation start time
|
||||
if (unlockEntry && chargeBefore && !previousReservationIsBackToBack) {
|
||||
incidents.push({
|
||||
incidentType: incidentType.UNSCHEDULED_INCIDENT_RELATED_WITH_RESERVATION,
|
||||
incidentType: incidentType.UNSCHEDULED_INCIDENT_BEFORE_RESERVATION,
|
||||
reservation,
|
||||
unlockTimestamp: unlockEntry.timestamp,
|
||||
lockTimestamp: null,
|
||||
@@ -415,7 +415,7 @@ const getIncidentData = (reservation) => {
|
||||
// 2. Check if member left after reservation end time
|
||||
if (lockEntry && chargeAfter && !nextReservationIsBackToBack) {
|
||||
incidents.push({
|
||||
incidentType: incidentType.UNSCHEDULED_INCIDENT_RELATED_WITH_RESERVATION,
|
||||
incidentType: incidentType.UNSCHEDULED_INCIDENT_AFTER_RESERVATION,
|
||||
reservation,
|
||||
unlockTimestamp: null,
|
||||
lockTimestamp: lockEntry.timestamp,
|
||||
@@ -508,7 +508,8 @@ const calculateDoorLockCharges = () => {
|
||||
case incidentType.UNLOCKED_INCIDENT_STANDALONE:
|
||||
unlockedIncidents.push(incident);
|
||||
break;
|
||||
case incidentType.UNSCHEDULED_INCIDENT_RELATED_WITH_RESERVATION:
|
||||
case incidentType.UNSCHEDULED_INCIDENT_BEFORE_RESERVATION:
|
||||
case incidentType.UNSCHEDULED_INCIDENT_AFTER_RESERVATION:
|
||||
case incidentType.UNSCHEDULED_INCIDENT_STANDALONE:
|
||||
unscheduledIncidents.push(incident);
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user