Fix undetected booking changes #30

Merged
bilal.catic merged 2 commits from fix-undetected-booking-changes into master 2019-07-31 10:07:12 +02:00
Showing only changes of commit 3ccb80ad75 - Show all commits

View File

@@ -23,10 +23,17 @@ const bulkWriteChanges = ((changes) => {
};
if (!oldReservation.start && !oldReservation.end && !oldReservation.resourceId){
// new reservation
logEntry.oldResourceId = null;
logEntry.oldStart = null;
logEntry.oldEnd = null;
if (newReservation.canceled){
//new reservation created and canceled immediately
logEntry.oldResourceId = resourceId;
logEntry.oldStart = start;
logEntry.newEnd = end;
}else{
// new reservation
logEntry.oldResourceId = null;
logEntry.oldStart = null;
logEntry.oldEnd = null;
}
}
if (newReservation.canceled){