colorgrade and more weeks

This commit is contained in:
Torsten
2023-06-04 12:30:43 +03:00
parent 6c2e11f8a6
commit 9dcc422f75
3 changed files with 32 additions and 28 deletions

View File

@ -1,20 +1,23 @@
= paginate @members
.flex.flex-col.mx-10
.flex
.w-60 Weekly
- (0..12).each do |week|
%div{class: bg_for(week) , style: "width: #{7*day_pixels}px;"}
- (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: #{7*day_pixels}px;"}= 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.bg-yellow-100{style: "width: #{day_pixels*stay_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