Hide total line for weeks with no work done
All checks were successful
Build and Publish Docker Container / build (push) Successful in 5m15s

This commit is contained in:
Joshua Coles 2023-10-06 22:40:38 +01:00
parent a0918ce011
commit 2b49e64123

View File

@ -29,9 +29,13 @@
</div>
<div>
<% total_for_week = lectures.sum { |lecture| lecture.total_overall_time }.seconds %>
<%# TODO: Improve this figure, atm it is for lectures in week, not time spent in week (ie
prepping for lecture next week will count in next week not current week) %>
(Total <%= humanise_duration(lectures.sum { |lecture| lecture.total_overall_time }.seconds) %>)
<% if total_for_week > 0 %>
(Total <%= humanise_duration(lectures.sum { |lecture| lecture.total_overall_time }.seconds) %>
)
<% end %>
</div>
</div>
</th>