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 meeting by clicking on the calendar matrix #168
Conversation
This endpoint allows viewing the add_meeting logic as part of a page or a pop-up
form.meeting_time_start.data = mtg_time | ||
hours, minutes = mtg_time.split(':')[:2] | ||
try: | ||
hours = int(hours) + 1 |
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.
Why the + 1
here?
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.
So that the end time of the meeting is 1 hour after the start time by default
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.
Hm, what if a user calls this with a meeting time that they really did intend. Then you bump their meeting time up by an hour.
Perhaps this default suggestion should be set in the javascript code that calls this endpoint.
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.
So the user click on the agenda matrix, the time is retrieved by JS, given to the URL called, we parse it here to do a small data checking, then it is put in the form.
In the add_meeting template we extract the value from the form (if there is one) and insert it into the timespinner().
This way, if you click on a meeting at 18:00, the default time you get are 18:00 start - 19:00 end, but this does not prevent you in anyway from adjusting the times as you would currently.
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.
For the template logic: https://github.com/fedora-infra/fedocal/pull/168/files#diff-38faee44bdff0a8e66fb3ddb82715945R91
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.
OK, I see now. :)
👍 |
Thanks @ralphbean ! |
Add meeting by clicking on the calendar matrix
No description provided.