make difference between door lock charges related to reservations and standalone incidents

This commit is contained in:
Bilal Catic
2019-07-07 00:28:39 +02:00
parent 72bb874d85
commit 5d3653cd65
8 changed files with 162 additions and 84 deletions

View File

@@ -188,8 +188,6 @@ const getUnlockEntryForReservation = (reservation, previousReservation) => {
return new Promise((resolve, reject) => {
const { memberId, resourceId } = reservation;
const attributes = ['memberName', 'event', 'timestamp', 'resourceId'];
const previousReservationEndMoment = previousReservation && previousReservation.end ?
moment.utc(previousReservation.end) : null;
const reservationStartMoment = moment.utc(reservation.start);
@@ -214,7 +212,6 @@ const getUnlockEntryForReservation = (reservation, previousReservation) => {
const order = [['timestamp', 'DESC']];
db.doorLockEvent.findAll({
attributes,
where: filters,
order,
})