Skip to content

Add Booking Facility on Single-Room Page#60

Open
Collie147 wants to merge 25 commits intodanxfisher:masterfrom
Collie147:master
Open

Add Booking Facility on Single-Room Page#60
Collie147 wants to merge 25 commits intodanxfisher:masterfrom
Collie147:master

Conversation

@Collie147
Copy link
Copy Markdown

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
Comment thread 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')){
Copy link
Copy Markdown

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 thread app/ews/roombooking.js Outdated
console.log(err);
});
}
else if ((bookingType == 'Extend') || (bookingType == 'EndNow')){
Copy link
Copy Markdown

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
Copy Markdown
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.

Comment thread 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){
Copy link
Copy Markdown

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")
Copy link
Copy Markdown

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.

2 participants