Track tasks, subtasks, deadlines and work hours from one place.
Showing
{{ rows|length }} assignment(s)
Total
{{ summary.total }}
Open
{{ summary.open }}
In Progress
{{ summary.in_progress }}
Overdue
{{ summary.overdue }}
Completed
{{ summary.completed }}
{% for a in rows %}
{% set subtasks = a.subtasks.order_by(SoftwareSubtask.id.asc()).all() %}
{% set done_count = subtasks|selectattr('status','equalto','DONE')|list|length %}
{% set blocked_count = subtasks|selectattr('status','equalto','BLOCKED')|list|length %}
{% set progress = ((done_count * 100 / subtasks|length)|round|int) if subtasks else (100 if a.status=='COMPLETED' else 0) %}
{% set jc = a.jobcard_service.jobcard %}
{% set client_name = jc.client.company_name if jc and jc.client else 'Client' %}
{% set logs = a.time_entries.order_by(SoftwareTimeEntry.work_date.desc(), SoftwareTimeEntry.id.desc()).all() %}
{% set total_hours = namespace(v=0) %}{% for t in logs %}{% set total_hours.v = total_hours.v + (t.hours or 0) %}{% endfor %}