{% extends 'base.html' %} {% load static %} {% block title %}Dashboard - {{ user.get_full_name }}{% endblock %} {% block extra_css %} {% endblock %} {% block content %}

Welcome back, {{ user.first_name }}!

{% now "l, F j, Y" %} • {{ user.get_role_display }} Dashboard

{% if user.role == 'admin' %} Administrator {% elif user.role == 'team_leader' %} 👔Team Leader {% elif user.role == 'loan_officer' %} Loan Officer {% elif user.role == 'secretary' %} Secretary {% elif user.role == 'auditor' %} 🔍Auditor {% endif %}
{% if user.branch %}
🏢{{ user.branch.name }}
{% endif %}

Quick Actions

Actions available based on your role and permissions

{% for action in quick_actions %} {% if action.permission_check %}

{{ action.title }}

{{ action.description }}

{% endif %} {% endfor %}
{% if user.role == 'admin' %}

🖥️ System Overview

{{ system_stats.total_users }}
Total Users
{{ system_stats.user_growth }}%
{{ system_stats.active_sessions }}
Active Sessions
{{ system_stats.session_change }}%

Permission Management

{% for role, stats in permission_stats.items %}
{{ role|title }}
{{ stats.custom_overrides }} overrides Edit
{% endfor %}
{% elif user.role == 'team_leader' %}

👥 Team Performance

{{ team_stats.total_officers }}
Loan Officers
{{ team_stats.avg_performance }}%
Avg Performance
{{ team_stats.performance_change }}%

Portfolio Overview

Total Portfolio Value ${{ portfolio_stats.total_value|floatformat:0 }}
Active Loans {{ portfolio_stats.active_loans }}
Collection Rate {{ portfolio_stats.collection_rate }}%
{% elif user.role == 'loan_officer' %}

👛 My Portfolio

{{ my_portfolio.total_clients }}
My Clients
{{ my_portfolio.client_growth }}%
${{ my_portfolio.portfolio_value|floatformat:0 }}
Portfolio Value
{{ my_portfolio.value_growth }}%

Pending Tasks

{% for task in pending_tasks %}
{{ task.title }}
{{ task.description }}
{{ task.count }}
{% endfor %}
{% elif user.role == 'secretary' %}

📄 Document Management

{{ document_stats.pending_review }}
Pending Review
{{ document_stats.processed_today }}
Processed Today

💬 Client Communication

Unread Messages {{ communication_stats.unread_messages }}
Scheduled Calls {{ communication_stats.scheduled_calls }}
Follow-ups Due {{ communication_stats.followups_due }}
{% elif user.role == 'auditor' %}

🔍 Audit Overview

{{ audit_stats.pending_audits }}
Pending Audits
{{ audit_stats.compliance_issues }}
Compliance Issues

Compliance Reports

{% for report in compliance_reports %}
📄 {{ report.name }}
{{ report.last_updated }} View
{% endfor %}
{% endif %} {% if user.has_page_permission.dashboard.view_activity %}

Recent Activity

{% for activity in recent_activities %}

{{ activity.description }}

{{ activity.timestamp|timesince }} ago

{% endfor %}
{% endif %} {% if user.has_page_permission.dashboard.view_notifications %}

🔔 Notifications

{% if unread_notifications_count > 0 %} {{ unread_notifications_count }} {% endif %}
{% if notifications %}
{% for notification in notifications %}

{{ notification.message }}

{{ notification.created_at|timesince }} ago

{% endfor %}
{% else %}

No notifications

{% endif %}
{% endif %}

Need Help?

{% for help_item in contextual_help %}
{{ help_item.title }}: {{ help_item.description }}
{% endfor %}
{% endblock %}