updates based on F5 testing

This commit is contained in:
2020-03-06 08:35:12 -05:00
parent 8288595b3f
commit f1ef618dae
18 changed files with 66 additions and 32 deletions
@@ -4,11 +4,12 @@ module Suppliers
@employee_shifts = EmployeeShift.for_supplier(current_supplier, relevant_from: 1.week.ago)
#@employee_shifts.include_relations(:employee, :supplier)
# Only select shifts from currently linked and employees
@employee_shifts.select! do |shift|
return false unless current_supplier.employee_ids.include?(shift.employee.try(:id))
shift.employee.enrich_with_settings current_supplier.settings_for(shift.employee)
true
end
#@employee_shifts.select! do |shift|
# return false unless current_supplier.employee_ids.include?(shift.employee.try(:id))
# shift.employee.enrich_with_settings current_supplier.settings_for(shift.employee)
# true
#end
#@employee_shifts.each { |shift| shift.employee.enrich_with_settings current_supplier.settings_for(shift.employee)
render json: @employee_shifts
end
def create