Skip to content
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

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

EvgeniyR2
Copy link
Contributor

No description provided.

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 }
Copy link

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 }
Copy link

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
Copy link

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';
Copy link

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,
Copy link

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'
Copy link

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.

@EvgeniyR2 EvgeniyR2 force-pushed the 2-Legend_for_rules_and_colors branch from 6eb8062 to c9a5490 Compare February 14, 2020 09:50
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.

1 participant