{% extends 'base.html' %} {% load static %} {% block title %}Staff Dashboard — Rapha-Bethel BNPS{% endblock %} {% block extra_css %} {% endblock %} {% block content %}

{% if dashboard_type == 'proprietor' %}Welcome, Proprietor{% elif dashboard_type == 'head' %}Good day, Head Teacher{% elif dashboard_type == 'teacher' %}Good day, Teacher{% else %}Welcome Back{% endif %} {% if request.user.staff_profile %} — {{ request.user.get_full_name|default:request.user.username }}{% endif %}

{% if dashboard_type == 'teacher' %}Your classes & today's tasks are below. {% elif dashboard_type == 'head' %}{{ department_name }} section overview. {% elif dashboard_type == 'proprietor' %}Full school overview. {% else %}Rapha-Bethel BNPS Staff Portal.{% endif %}

--:--
{{ current_date|date:"d M Y" }}
Total Staff
{{ total_staff|default:"—" }}
{{ active_staff|default:0 }} active
Teachers
{{ teachers_count|default:"—" }}
{{ class_teachers|default:0 }} class teachers
Pending Leave
{{ pending_leaves|default:"0" }}
{{ approved_leaves|default:0 }} approved
Staff Present Today
{{ present_percent|default:"0" }}%
{{ today_attendance|default:0 }} checked in
{% if dashboard_type == 'proprietor' %}
School Overview
{% with items="Students|user-graduate|blue,Classes|chalkboard|green,Monthly Revenue XAF|coins|gold,Pending Invoices|file-invoice|red" %} {% endwith %}
{{ total_students|default:0 }}
Total Students
{{ total_classes|default:0 }}
Total Classes
{{ monthly_revenue|default:0|floatformat:0 }}
Monthly Revenue (XAF)
{{ pending_invoices|default:0 }}
Pending Invoices
Admin Actions
{% elif dashboard_type == 'head' %}
{{ department_name }} — Recent Staff Leave Requests
{% with leaves=recent_leave_requests %} {% if leaves %} {% for leave in leaves %}
{{ leave.staff.user.first_name|first }}{{ leave.staff.user.last_name|first }}
{{ leave.staff.user.get_full_name }}
{{ leave.get_leave_type_display }} · {{ leave.start_date|date:"d M" }} – {{ leave.end_date|date:"d M" }}
{% if leave.status == 'pending' %}Pending {% elif leave.status == 'approved' %}Approved {% else %}{{ leave.status|title }}{% endif %}
{% endfor %} {% else %}

No recent leave requests

{% endif %} {% endwith %}
Head's Quick Actions
{% elif dashboard_type == 'teacher' %}
My Assigned Classes All classes
{% if my_classes %} {% for cls in my_classes %}
{{ cls.name|slice:":2"|upper }}
{{ cls.name }}
{{ cls.student_count|default:0 }} students
View
{% endfor %} {% else %}

No classes assigned yet

{% endif %}
Today's Tasks
{% else %}
My Profile
{% if request.user.staff_profile %} {% with s=request.user.staff_profile %}
Employee ID{{ s.employee_id }}
Role{{ s.get_role_display }}
Department{{ s.get_department_display }}
Phone{{ s.phone_number|default:"—" }}
Email{{ request.user.email|default:"—" }}
Hire Date{{ s.hire_date|date:"d M Y"|default:"—" }}
{% endwith %} {% endif %}
Quick Links
{% if request.user.staff_profile %} Edit Profile {% endif %} Request Leave My Leave Main Dashboard
{% endif %} {% endblock %} {% block extra_js %} {% endblock %}