-
Notifications
You must be signed in to change notification settings - Fork 73
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Booking Facility on Single-Room Page #60
base: master
Are you sure you want to change the base?
Conversation
"TypeError: ews.TimeSpan.FromHours(...).asMilliseconds is not a function"
room.appointments.length my not be loaded in time. Try-Catch typeerror reloads the page if it catches this error.
Added buttons on the room screen to book, extend, cancel and book after current meeting. Added button on the room screen to go back to the flightboard. This is made visible depending on a variable in the .env file Added a logo to the room screen. Added option to hide the drop down on the flight board screen. This is made visible depending on a variable in the .env file Auth.js has been moved to ./config/auth/auth.js - this move creates an option to mount the folder in RAM making the auth.js file temporary. On my own build I've encrypted auth.js and at boot if certain criteria are met, it is unencrypted and copied a ram mounted drive named auth linked to the config folder
app/ews/roombooking.js
Outdated
exch.Credentials = new ews.WebCredentials(auth.exchange.username, auth.exchange.password); | ||
exch.Url = new ews.Uri(auth.exchange.uri); | ||
//ews.EwsLogging.DebugLogEnabled = true; | ||
if ((bookingType == 'BookNow') || (bookingType == 'BookAfter')){ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please use strict equality operator ===
app/ews/roombooking.js
Outdated
console.log(err); | ||
}); | ||
} | ||
else if ((bookingType == 'Extend') || (bookingType == 'EndNow')){ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please use strict equality operator ===
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the heads up! Will change all of these now.
app/ews/roombooking.js
Outdated
console.log(start); | ||
var apptStartewsDT = new ews.DateTime(new Date(parseInt(start, 10))); | ||
var apptStartTime = moment(start).toISOString(); | ||
if (apptStartTime == startTime){ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please use strict equality operator ===
//console.log("Window.location.reload"); | ||
//console.log(this.state.currentError); | ||
// if (this.state.currentError == TypeError){ | ||
// console.log("TYPE ERROR") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Comment code should not be pushed.
replaced equality operator == with strict equality operator ===
I've added a few buttons on the single room page that post back to a script in the EWS folder booking that particular room. Buttons are modular and only display if the room is free for that time. I've added an extend function if the room is currently busy, however it books the room after the current meeting rather than actually extending the meeting, I'll see if it can be updated to extend the meeting rather than book a new one at a later stage.