Add door lock charges screen #17

Merged
bilal.catic merged 3 commits from add-door-lock-charges-screen into master 2019-06-25 12:57:30 +02:00
Showing only changes of commit e03f634aff - Show all commits

View File

@@ -41,7 +41,7 @@ const getAllFinishedBookings = () => {
const filters = { const filters = {
canceled: false, canceled: false,
end: { end: {
[Op.lt]: moment.tz('UTC') [Op.lt]: moment.utc().toISOString()
} }
}; };
@@ -56,8 +56,8 @@ const getAllFinishedBookings = () => {
const getFirstNextBooking = (reservation) => { const getFirstNextBooking = (reservation) => {
return new Promise ((resolve, reject) => { return new Promise ((resolve, reject) => {
const {resourceId, start, timezone} = reservation; const { resourceId, start } = reservation;
const endOfTheDay = moment.tz(start, timezone).endOf('Day').toISOString(); const endOfTheDay = moment.utc(start).endOf('Day').toISOString();
const attributes = ['reservationId', 'memberId', 'resourceId', 'start', 'end', 'timezone']; const attributes = ['reservationId', 'memberId', 'resourceId', 'start', 'end', 'timezone'];
const filters = { const filters = {
@@ -90,8 +90,8 @@ const getFirstNextBooking = (reservation) => {
const getFirstPreviousBooking = (reservation) => { const getFirstPreviousBooking = (reservation) => {
return new Promise ((resolve, reject) => { return new Promise ((resolve, reject) => {
const {resourceId, start, timezone} = reservation; const { resourceId, start } = reservation;
const startOfTheDay = moment.tz(start, timezone).startOf('Day').toISOString(); const startOfTheDay = moment.utc(start).startOf('Day').toISOString();
const attributes = ['reservationId', 'memberId', 'resourceId', 'start', 'end', 'timezone']; const attributes = ['reservationId', 'memberId', 'resourceId', 'start', 'end', 'timezone'];
const filters = { const filters = {