Verified Commit 36151962 authored by Kaspar Vollenweider's avatar Kaspar Vollenweider
Browse files

chores(linter): fix patch to pass develops linter

parent 237b063e
......@@ -104,14 +104,14 @@ class BillingExpensesController < ApplicationController
def selected_billing_semester
@selected_billing_semester = if params[:q].blank?
set_default_filter(semester: default_billing_semester)
default_billing_semester
elsif !@billing_semester_filters.pluck(:value).include? params[:q][:semester]
params.permit![:q][:semester] = default_billing_semester
default_billing_semester
else
params[:q][:semester]
end
set_default_filter(semester: default_billing_semester)
default_billing_semester
elsif !@billing_semester_filters.pluck(:value).include? params[:q][:semester]
params.permit![:q][:semester] = default_billing_semester
default_billing_semester
else
params[:q][:semester]
end
end
def pdf_file_name(record)
......
......@@ -318,14 +318,14 @@ class Volunteer < ApplicationRecord
date = billable_semester_date(date)
semester_range = billable_semester_range(date)
Hour.joins(volunteer: :contact)
.volunteer_not_waive
.billable
.meeting_date_between(semester_range)
.volunteer_not_billed_in_semester(date)
.order_volunteer_iban_name
.group_by(&:volunteer).map do |volunteer, hours|
[volunteer, hours, hours.sum(&:hours)]
end
.volunteer_not_waive
.billable
.meeting_date_between(semester_range)
.volunteer_not_billed_in_semester(date)
.order_volunteer_iban_name
.group_by(&:volunteer).map do |volunteer, hours|
[volunteer, hours, hours.sum(&:hours)]
end
end
scope :assignable_to_department, -> { undecided.where(department_id: [nil, '']) }
......
......@@ -191,6 +191,6 @@ class VolunteerWithBillableHoursTest < ActiveSupport::TestCase
end
def find_volunteer_in_collection(result, searched_volunteer)
result.find { |volunteer, hours, total_hours| volunteer == searched_volunteer }
result.find { |volunteer, _hours, _total_hours| volunteer == searched_volunteer }
end
end
......@@ -75,8 +75,8 @@ class ActiveSupport::TestCase
end
end
def time_z(year, month = nil, day = nil, hour = 0, minute = 0, second = 0)
def time_z(year, month = nil, day = nil, hour = 0, minute = 0)
year, month, day = year.split('-').map(&:to_i) if month.blank?
Time.zone.local(year, month, day, hour, minute, second)
Time.zone.local(year, month, day, hour, minute)
end
end
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment