<%= "#{@employee['FIO']}: #{Helpers.months[@month]} #{@year}" %> | |||||||
---|---|---|---|---|---|---|---|
Пн | Вт | Ср | Чт | Пт | Сб | Вс | За неделю |
' : ' | ' %> | <% end %> <% tpw = 0 %> <% tpm = 0 %> <% (1..@days_in_month).each do |d| %> <% today = Time.mktime(@year, @month, d) %> <%= (today.wd > 5) ? '' : ' | ' %>
<% tpw += @each_day[d][:tpd] unless @each_day[d][:broken] %>
<% if @each_day[d][:mpd].count > 0 %>
<%= d %>
<% else %>
<%= d %>
<% end %>
<%= Helpers.seconds_to_hours(@each_day[d][:tpd]) %>
<% @each_day[d][:mpd].each_with_index do |m, i| %>
<%= '' if (@each_day[d][:first_not_buggy] == i or @each_day[d][:last_not_buggy] == i) %>
<%= '' if m['buggy'] %>
<%= (m['eventDescriptionID'] == EPIKUR_EVENT_COME_IN ? '→' : '←') + ' ' + m['EventDate'].strftime('%H:%M') + ':' + m['EventDate'].strftime('%S') + '' %>
<%= 'f' if m['first'] %>
<%= 'l' if m['last'] %>
<%= '' if m['buggy'] %>
<%= '' if (@each_day[d][:first_not_buggy] == i or @each_day[d][:last_not_buggy] == i) %>
<% end %>
|
<% if today.wd == 7 %>
<%= Helpers.seconds_to_hours(tpw) %>
|
<% if d < @days_in_month %>
<% tpm += tpw ; tpw = 0 %>
|||
' : ' | ' %> | <% end %>
<%= Helpers.seconds_to_hours(tpw) %>
|
<% tpm += tpw %>
<% end %>
|||||
Общее время: <%= Helpers.seconds_to_hours(tpm) %> |