-
Notifications
You must be signed in to change notification settings - Fork 0
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
Prevent non mc from dutying more than 6 hours consecutively #481
base: master
Are you sure you want to change the base?
Prevent non mc from dutying more than 6 hours consecutively #481
Conversation
…vely' of https://github.com/nussucommit/takoyaki into prevent-non-mc-from-dutying-more-than-6-hours-consecutively
…vely' of https://github.com/nussucommit/takoyaki into prevent-non-mc-from-dutying-more-than-6-hours-consecutively
…vely' of https://github.com/nussucommit/takoyaki into prevent-non-mc-from-dutying-more-than-6-hours-consecutively
…urs-consecutively
…vely' of https://github.com/nussucommit/takoyaki into prevent-non-mc-from-dutying-more-than-6-hours-consecutively
…vely' of https://github.com/nussucommit/takoyaki into prevent-non-mc-from-dutying-more-than-6-hours-consecutively
…vely' of https://github.com/nussucommit/takoyaki into prevent-non-mc-from-dutying-more-than-6-hours-consecutively
…vely' of https://github.com/nussucommit/takoyaki into prevent-non-mc-from-dutying-more-than-6-hours-consecutively
…vely' of https://github.com/nussucommit/takoyaki into prevent-non-mc-from-dutying-more-than-6-hours-consecutively
…vely' of https://github.com/nussucommit/takoyaki into prevent-non-mc-from-dutying-more-than-6-hours-consecutively
…vely' of https://github.com/nussucommit/takoyaki into prevent-non-mc-from-dutying-more-than-6-hours-consecutively
…urs-consecutively
MAILGUN_API_KEY=key-0123456789abcdef0123456789abcdef | ||
MAILGUN_DOMAIN=sandbox0123456789abcdef0123456789abcdef.mailgun.org | ||
MAILER_HOST=nussucommit.org |
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.
Don't include this file in the branch. (Btw, the filename is supposed to be .env
, you're missing a dot)
all_time_ranges.sort! { |r1, r2| r1.start_time <=> r2.start_time } | ||
end | ||
|
||
def non_mc_exceed_hrs?(num_hrs, duty_ids) |
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.
Metrics/AbcSize: Assignment Branch Condition size for non_mc_exceed_hrs? is too high. [26.42/18]
app/views/duties/index.html.erb
Outdated
@@ -1,6 +1,7 @@ | |||
<div id="duty-start-time" data-start-time=<%= TimeRange.order(:start_time).first.start_time.strftime('%H') %>></div> | |||
<div id="duty-end-time" data-end-time=<%= TimeRange.order(:end_time).last.end_time.strftime('%H')%>></div> | |||
<div id="num-of-places" data-num-of-places=<%= @places.count %>></div> | |||
<div id="current-user" data-current-user=<%= current_user%>> |
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.
Do we need this?
…vely' of https://github.com/nussucommit/takoyaki into prevent-non-mc-from-dutying-more-than-6-hours-consecutively
Created function `non_mc_exceed_hrs?' to check if non mc user duty for more than 6 hours after grabbing duty and implemented three test cases to check correctness
Ryo's edit: Resolves #300