{% extends 'base.html' %} {% load format_tags %} {% block title %}{{ team.name }} | Teams | FoxFitt{% endblock %} {% block content %}

{{ team.name }} {% if team.active %}Active {% else %}Inactive{% endif %}

Supervised by {{ team.supervisor.username|default:'— no supervisor —' }}

Name
{{ team.name }}
Supervisor
{{ team.supervisor.username|default:'—' }}
Pay Frequency
{{ team.get_pay_frequency_display|default:'— not set —' }}
Pay Start Date
{{ team.pay_start_date|date:"d M Y"|default:'—' }}
Active
{% if team.active %}Yes{% else %}No{% endif %}
{% if pay_periods %}

Current + upcoming pay periods (based on the team's pay frequency and start date).

{% for p in pay_periods %} {% endfor %}
#Period StartPeriod End
{% if forloop.first %}Current{% else %}+{{ forloop.counter0 }}{% endif %} {{ p.0|date:"d M Y" }} {{ p.1|date:"d M Y" }}
{% else %}

No pay schedule set — assign a pay frequency and start date to see upcoming periods.

{% endif %}
{% if workers %} {% for w in workers %} {% endfor %}
NameIDSalaryActive
{{ w.name }} {{ w.id_number }} R {{ w.monthly_salary|money }} {% if w.active %} {% else %}{% endif %}
{% else %}

No workers in this team. Add some.

{% endif %}
Work Summary
Total Days Worked
{{ days_worked }}
Total Labour Cost
R {{ total_labour_cost|money }}
Projects Worked On
{{ projects_worked.count }}
Projects
{% if projects_worked %} {% for p in projects_worked %} {{ p.name }} {% endfor %} {% else %}

No projects yet.

{% endif %}
Labour Cost Breakdown by Project
{% if cost_breakdown %} {% for c in cost_breakdown %} {% endfor %}
ProjectWorker-DaysTotal Cost
{{ c.project }} {{ c.worker_days }} R {{ c.total|money }}
{% else %}

No work logs yet.

{% endif %}
Recent Work Logs (last 10)
{% if recent_logs %} {% for log in recent_logs %} {% endfor %}
DateProjectWorkers
{{ log.date|date:"d M Y" }} {{ log.project.name }} {{ log.workers.count }}
{% else %}

No work logs yet.

{% endif %}
{% endblock %}