2023-06-04 12:30:43 +03:00

24 lines
946 B
Plaintext

.flex.flex-col.mx-10
.flex
- (5..25).each do |week|
.mx-2.mb-2{class: week == @weeks ? "bg-orange-100" : "bg-white"}
=link_to week.to_s , timeline_path( weeks: week)
.flex
.w-60 Weeks
- (0...@weeks).each do |week|
%div{class: bg_for(week) , style: "width: #{week_pixels}px;"}
= (Date.today.at_beginning_of_month + week.weeks).day.to_s + "."
= (Date.today.at_beginning_of_month + week.weeks).month
.flex
.w-60 Weekly
- weekly.each do |week , amount|
%div{class: bg_for(week) , style: "width: #{week_pixels}px;"}= amount
- @members.each_with_index do |member , index|
.flex
.w-60= member.name
.bg-white{style: "width: #{day_pixels*started_days(member)}px;"}
.flex.inline.justify-between{class: bg_for(index) ,style: "width: #{day_pixels*stay_days(member)}px;"}
%div= small_date(member.arriving)
%div= small_date(member.leaving)
.name