-
Notifications
You must be signed in to change notification settings - Fork 3
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
#2 legend for rules and colors #86
base: master
Are you sure you want to change the base?
#2 legend for rules and colors #86
Conversation
* 1-Select_different_colors_for_rules
elsif event.start_period.hour == Event::HALF_DAY && | ||
event.end_period.hour == Event::END_DAY && | ||
(event.end_period..event.start_period).include?(day) | ||
working_month[day] = { state: 'second_half_of_day', title: event.rule.name } | ||
working_month[day] = { state: 'second_half_of_day', rule: event.rule } |
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/LineLength: Line is too long. [82/80]
@@ -50,11 +50,11 @@ def half_event(day, working_month) | |||
events.each do |_employee, employee_events| | |||
employee_events.each do |event| | |||
if event.end_period.to_date.eql?(day) && event.end_period.hour == Event::HALF_DAY | |||
working_month[day] = { state: 'first_half_of_day', title: event.rule.name } | |||
working_month[day] = { state: 'first_half_of_day', rule: event.rule } |
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/LineLength: Line is too long. [81/80]
@@ -37,7 +37,7 @@ def days_status(employee) | |||
days.each_with_object({}) do |day, working_month| | |||
working_month[day] = working_days.include?(day.strftime('%w').to_i) ? { state: 'work' } : { state: 'holiday' } | |||
working_month[day] = { state: 'state_holiday' } if holidays.include?(day) | |||
working_month[day] = { state: 'fullday_event', title: define_rule_name(employee, day) } if | |||
working_month[day] = { state: 'fullday_event', rule: define_rule(employee, day) } if |
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/LineLength: Line is too long. [92/80]
@@ -1 +1 @@ | |||
@import '~bulma/bulma'; | |||
@import 'bulma'; |
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.
Prefer double-quoted strings
@@ -65,7 +65,8 @@ def companies | |||
|
|||
# Never trust parameters from the scary internet, only allow the white list through. | |||
def rule_params | |||
params.require(:rule).permit(:name, :allowance_days, :period, :is_enabled, :is_holiday, :auto_confirm, :is_enabled) | |||
params.require(:rule).permit(:name, :allowance_days, :period, :is_enabled, :is_holiday, |
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/LineLength: Line is too long. [91/80]
@@ -60,6 +57,7 @@ group :development, :test do | |||
gem 'pry-byebug', platforms: %i[mri mingw x64_mingw] | |||
gem 'rspec-rails', '~> 3.8' | |||
gem 'factory_bot_rails' | |||
gem 'dotenv-rails' |
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.
Bundler/OrderedGems: Gems should be sorted in an alphabetical order within their section of the Gemfile. Gem dotenv-rails should appear before factory_bot_rails.
6eb8062
to
c9a5490
Compare
No description provided.