Spaces:
No application file
No application file
File size: 1,730 Bytes
58668c3 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 |
{% extends "base.html" %}
{% block content %}
<h2>📊 Dashboard</h2>
<div class="stats">
<div class="stat-card">
<h3>Total Books</h3>
<p>{{ stats.total_books }}</p>
</div>
<div class="stat-card">
<h3>Total Copies</h3>
<p>{{ stats.total_copies }}</p>
</div>
<div class="stat-card">
<h3>Available Copies</h3>
<p>{{ stats.available_copies }}</p>
</div>
<div class="stat-card">
<h3>Total Students</h3>
<p>{{ stats.total_students }}</p>
</div>
<div class="stat-card">
<h3>Books Issued</h3>
<p>{{ stats.books_issued }}</p>
</div>
<div class="stat-card">
<h3>Overdue Books</h3>
<p style="color: #e74c3c;">{{ stats.overdue_books }}</p>
</div>
<div class="stat-card">
<h3>Total Fines</h3>
<p>{{ stats.total_fines }} BDT</p>
</div>
<div class="stat-card">
<h3>Collected Fines</h3>
<p style="color: #27ae60;">{{ stats.collected_fines }} BDT</p>
</div>
</div>
{% if overdue %}
<div class="card">
<h3 style="color: #e74c3c;">⚠️ Overdue Books ({{ overdue|length }})</h3>
<table>
<tr>
<th>Student ID</th>
<th>Book ID</th>
<th>Due Date</th>
<th>Days Overdue</th>
<th>Fine</th>
</tr>
{% for issue in overdue %}
<tr>
<td>{{ issue.student_id }}</td>
<td>{{ issue.book_id }}</td>
<td>{{ issue.due_date.strftime('%Y-%m-%d') }}</td>
<td>{{ issue.days_overdue() }}</td>
<td>{{ issue.calculate_fine() }} BDT</td>
</tr>
{% endfor %}
</table>
</div>
{% endif %}
{% endblock %}
|