<!-- BEGIN [% template.title %] -->
  [% META title = 'Worklist &raquo; Outreach Future Pack Dispatches' -%]

    [% # PROCESS dumper.tt dump = packs %]
    
  [% # define some data structures:
    headers = [ 'LabNo' 'Name' 'NHS No.' 'Date' 'Location' 'Pack due' 'Days' ];
  %]
  
  [% IF packs.size %]
    <h3 class="header">Outreach pack dispatches due in future</h3>

    <table class="indent">
      <tr>
        <td>&nbsp;</td>
        [% FOREACH item IN headers %]
          <th scope="">[% item | html_line_break %]</th>
        [% END %]
      </tr>
  
      [% FOREACH data IN packs; # PROCESS dumper.tt dump = data.as_tree %]
      <tr>
        <td>[% loop.count %]
       <td>[% INCLUDE site/lab_number.tt want_url = 1 %]</td>
       <td>
           [% data.last_name  | upper %],
           [% data.first_name | ucfirst %]
       </td>
       <td>[% data.nhs_number %]</td>
       <td>[% data.created_at.strftime('%d.%b.%Y') %]</td>
       <td>[% data.location %]</td>
       <td>[% data.pack_due.strftime('%d.%b.%Y') %]</td>
       <td>[% data.delta_days %]</td>
      </tr>
      [% END %]
     </table>
  
  [% ELSE %]
    <p class="info indent">No Outreach pack dispatches due in future</p>
  [% END %]
<!-- END [% template.title %] -->
