Skip to content
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

Open
wants to merge 25 commits into
base: master
Choose a base branch
from

Conversation

Collie147
Copy link

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.

"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
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')){

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(err);
});
}
else if ((bookingType == 'Extend') || (bookingType == 'EndNow')){

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 ===

Copy link
Author

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.

console.log(start);
var apptStartewsDT = new ews.DateTime(new Date(parseInt(start, 10)));
var apptStartTime = moment(start).toISOString();
if (apptStartTime == startTime){

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 ===

Comment on lines 26 to 29
//console.log("Window.location.reload");
//console.log(this.state.currentError);
// if (this.state.currentError == TypeError){
// console.log("TYPE ERROR")

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 ===
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants