Merge branch 'fix-undetected-booking-changes' into 'master'
Fix undetected booking changes See merge request saburly/psihologija!30
This commit was merged in pull request #30.
This commit is contained in:
@@ -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){
|
||||
|
||||
@@ -203,7 +203,7 @@ const createFeeFromBooking = (booking, resourceMappings) => {
|
||||
const formattedStartTime = startMoment.format('HH:mm a');
|
||||
const formattedEndTime = endMoment.format('HH:mm a');
|
||||
|
||||
const formattedName = `[BOOKING FEES] ${officeName}, ${resourceName}, $${totalCost}, ${reservationLength.toFixed(2)} x $${hourlyRate.toFixed(2)}, ${formattedDate} [${formattedStartTime} - ${formattedEndTime}]`;
|
||||
const formattedName = `${officeName}, ${resourceName}, $${totalCost}, ${formattedDate} [${formattedStartTime} - ${formattedEndTime}]`;
|
||||
|
||||
return {
|
||||
name: formattedName,
|
||||
|
||||
Reference in New Issue
Block a user