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