2026-06-03 10:43:17 +01:00
|
|
|
{% extends "base.html" %}
|
|
|
|
|
|
|
|
|
|
{% block content %}
|
|
|
|
|
<div class="section">
|
|
|
|
|
<h2>Loan History</h2>
|
|
|
|
|
{% if loans %}
|
2026-06-20 01:20:39 +01:00
|
|
|
<div class="table-container">
|
|
|
|
|
<table>
|
|
|
|
|
<thead>
|
2026-06-03 10:43:17 +01:00
|
|
|
<tr>
|
2026-06-20 01:20:39 +01:00
|
|
|
<th>Tablet</th>
|
|
|
|
|
<th>Serial Number</th>
|
|
|
|
|
<th>Borrower</th>
|
|
|
|
|
<th>Loan Date</th>
|
|
|
|
|
<th>Return Date</th>
|
|
|
|
|
<th>Status</th>
|
2026-06-03 10:43:17 +01:00
|
|
|
</tr>
|
2026-06-20 01:20:39 +01:00
|
|
|
</thead>
|
|
|
|
|
<tbody>
|
|
|
|
|
{% for loan in loans %}
|
|
|
|
|
<tr>
|
|
|
|
|
<td>{{ loan.brand }} {{ loan.model }}</td>
|
|
|
|
|
<td>{{ loan.serial_number }}</td>
|
|
|
|
|
<td>{{ loan.name }}</td>
|
|
|
|
|
<td>{{ loan.loan_date }}</td>
|
|
|
|
|
<td>{{ loan.return_date or '-' }}</td>
|
|
|
|
|
<td>{{ loan.status }}</td>
|
|
|
|
|
</tr>
|
|
|
|
|
{% endfor %}
|
|
|
|
|
</tbody>
|
|
|
|
|
</table>
|
|
|
|
|
</div>
|
2026-06-03 10:43:17 +01:00
|
|
|
{% else %}
|
|
|
|
|
<p>No loan history available.</p>
|
|
|
|
|
{% endif %}
|
|
|
|
|
</div>
|
|
|
|
|
{% endblock %}
|