{% extends "base.html" %} {% block title %}Admin Dashboard - National Medlab Cooperative{% endblock %} {% block content %}

Admin Dashboard

Welcome back, {{ current_user.full_name }} ({{ current_user.role }})

Total Members

{{ total_users }}

Active members
Total Contributions

₦{{ "%.2f"|format(total_contributions) }}

This month
Total Loans

₦{{ "%.2f"|format(total_loans) }}

Pending approvals
Pending Loans

{{ pending_loans|length }}

Need attention
Recent Transactions
View All
{% if recent_transactions %}
{% for transaction in recent_transactions %} {% endfor %}
User Type Amount Status Date
{{ transaction.user.full_name }} {{ transaction.type.replace('_', ' ').title() }} ₦{{ "%.2f"|format(transaction.amount) }} {{ transaction.status.title() }} {{ transaction.created_at.strftime('%d/%m/%Y %H:%M') }}
{% else %}

No recent transactions.

{% endif %}
Pending Loans
{% if pending_loans %} {{ pending_loans|length }} {% endif %}
{% if pending_loans %} {% for loan in pending_loans[:5] %}
{{ loan.user.full_name }} Pending
₦{{ "%.2f"|format(loan.amount) }} - {{ loan.created_at.strftime('%d/%m/%Y') }}
{% endfor %} {% if pending_loans|length > 5 %} {% endif %} {% else %}

No pending loans.

{% endif %}
Quick Actions
{% if current_user.role in ['Super Admin', 'Admin'] %} {% endif %} {% if current_user.role in ['Super Admin', 'Admin', 'Treasurer'] %} {% endif %} {% if current_user.role in ['Super Admin', 'Admin', 'Loan Officer'] %} {% endif %}
{% endblock %}