This commit is contained in:
Torsten 2023-07-14 13:35:53 +03:00
parent 3075559675
commit b057815e2e

View File

@ -37,15 +37,15 @@ module TimelineHelper
amount = -1 amount = -1
start_week = month_start + week.weeks start_week = month_start + week.weeks
end_week = start_week + 7.days end_week = start_week + 7.days
puts "WEEK #{week} #{start_week} -- #{end_week}" #puts "WEEK #{week} #{start_week} -- #{end_week}"
@members.each do |mem| @members.each do |mem|
puts "volunteer #{mem.name}" #puts "volunteer #{mem.name}"
next unless mem.arriving next unless mem.arriving
next unless mem.leaving next unless mem.leaving
next if mem.leaving <= start_week next if mem.leaving <= start_week
puts "volunteer #{mem.name} leaving #{mem.leaving}" #puts "volunteer #{mem.name} leaving #{mem.leaving}"
next if mem.arriving >= end_week next if mem.arriving >= end_week
puts "volunteer #{mem.name} arriving #{mem.arriving}" #puts "volunteer #{mem.name} arriving #{mem.arriving}"
amount += 1 amount += 1
end end
amount amount