!!! 5
%html
%head
%title Service Log Summary
= wicked_pdf_stylesheet_link_tag 'pdf'
%body
%h2.headline Service Logs
%div.body-2= date
%table.table.mt-3
%thead
%tr
%th.border-top-0.subtitle-2
%strong Student
%th.border-top-0.subtitle-2.text-right
%strong Pending Hours
%th.border-top-0.subtitle-2.text-right
%strong Approved Hours
%th.border-top-0.subtitle-2.text-right
%strong Progress
%tbody
- students.each do |student|
- hours = student.service_hours
- pending = hours[:pending]
- approved = hours[:approved]
%tr
%td.caption= student.full_name(:reverse)
%td.caption.text-right= number_with_precision(pending, precision: 1)
%td.caption.text-right= number_with_precision(approved, precision: 1)
%td.caption.text-right
= "#{ (approved / requirement * 100).round(1) }%" unless requirement.to_i.zero?