-
Notifications
You must be signed in to change notification settings - Fork 58
[1498] Replace availability calendar with FullCalendar [v5.5] #1505
Conversation
the days in the past should be greyed out |
Suggestion: color the box yellow when only one item is available for that day |
@@ -184,4 +191,43 @@ def fix_content_type(filedata) | |||
def type_from_file_command(file) | |||
Paperclip::FileCommandContentTypeDetector.new(file).detect | |||
end | |||
|
|||
def calculate_availability # rubocop:disable all |
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.
can we use existing model methods for this? seems pretty similar
disregard my inline comments! |
|
Ok, I cleaned up a bit and made sure that past days would be colored grey. In terms of yellow coloring when there's only one, I implemented it but I'm not sure it makes sense given that if there's only one item to begin with then it's not really "low", just normal (it colors the cell yellow if there are less than 1/4 of the items available, which isn't great but is something). See what you think and I'll consider ways to make the coloring better. |
Never mind, made the colors better 😄, you'll have to check it out on equipment with 3 or more items to see the range. |
Resolves #1498 - install FullCalendar v2.3.1 (blocked on Rails 4.1) - generate event hash in controller - generate event array in JS for speed - remove old JS calendar
e8713d9
to
4a369bb
Compare
okay, this looks good! |
Also reviewed by @AlanLiu96, merging! |
[1498] Replace availability calendar with FullCalendar
Resolves #1498 on release-v5.5
This is a bit hack-y and probably could be better, looking forward to some good code review 😛. I'll work on a much cleaner version of this for
master
once we've merged in #1360.