{% extends "base.html" %} {% block title %}{% if user.role == 'staff' %}Employee{% else %}Employees{% endif %}{% endblock %} {% block page_title %}{% if user.role == 'staff' %}Employee{% else %}Employees{% endif %}{% endblock %} {% block topbar_actions %} {% if user.role == 'admin' %} {% endif %} {% endblock %} {% block content %} {% if user.role == 'staff' %} {% if employees %} {% set emp = employees[0] %} {% set stats = emp_stats[emp.id] %} {% set hours = stats[0] %}{% set earnings = stats[1] %}{% set owed = stats[2] %}
Name
{{ emp.name }}
Rate
{% if emp.hourly_rate %}£{{ "%.2f"|format(emp.hourly_rate) }}/hr{% else %}—{% endif %}
Started
{{ emp.date_started | fmt_date }}
Total Hours
{{ "%.1f"|format(hours) }}h
Earnings
£{{ "%.2f"|format(earnings) }}
Amount Owed
£{{ "%.2f"|format(owed) }}
{% else %}

No employee record is linked to your account.

{% endif %} {% else %}
{% for emp in employees %} {% set stats = emp_stats[emp.id] %} {% include "employees/_row.html" with context %} {% else %} {% endfor %}
Name Date Started Date Ended Rate (£/hr) Total Hours Earnings Amount Owed Actions
No employees found.
{% endif %} {% endblock %}