<%- include('../layout') %>

<div class="d-flex justify-content-between align-items-center mb-3">
  <h1>Zeiterfassung</h1>
  <a href="/time/new" class="btn btn-primary btn-sm">Neu</a>
</div>

<table class="table table-striped">
  <thead>
    <tr>
      <th>Datum</th>
      <th>Stunden</th>
      <th>Beschreibung</th>
      <th>Kommission</th>
    </tr>
  </thead>
  <tbody>
    <% entries.forEach(e => { %>
      <tr>
        <td><%= e.date %></td>
        <td><%= e.hours ? e.hours.toFixed(2) : '' %></td>
        <td><%= e.description %></td>
        <td>
          <% if (e.commission_number) { %>
            <%= e.commission_number %>
          <% } else { %>
            -
          <% } %>
        </td>
      </tr>
    <% }) %>
  </tbody>
</table>

<%- include('../footer') %>


