{% extends "base.html" %} {% block content %}

{{ task.title }}

Task #{{ task.id }} | Created: {{ task.created_at.strftime('%d %b %Y %H:%M') }}

Edit {% if current_user.role in ["Admin", "Director"] %} {% endif %} Back
Status

{{ task.status_display }}

Priority

{{ task.priority }}

Assigned To

{{ task.assigned_to or "Unassigned" }}

Due Date

{% if task.due_date %} {{ task.due_date.strftime('%d %b %Y') }} {% if task.is_overdue %} Overdue! {% endif %} {% else %} Not set {% endif %}

Description
{% if task.description %}

{{ task.description }}

{% else %}

No description provided.

{% endif %}
Task Details
Task Type {{ task.task_type or "General" }}
Department {{ task.department or "Unassigned" }}
Work Order # {{ task.work_order_number or "N/A" }}
Client {{ task.client_name or "N/A" }}
Estimated Hours {{ task.estimated_hours or 0 }} hrs
Actual Hours {{ task.actual_hours or 0 }} hrs
Start Date {{ task.start_date.strftime('%d %b %Y') if task.start_date else "Not set" }}
Linked Enquiry {% if task.enquiry_id %} {{ task.enquiry.enquiry_number }} {% else %} None {% endif %}
Checklist {{ task.completion_percentage|round(0) }}% Complete
    {% for item in task.checklist_items %}
  • {% if item.completed %} {{ item.text }} {% else %} {{ item.text }} {% endif %}
  • {% else %}
  • No checklist items yet.
  • {% endfor %}
Tags
{% if task.tag_list %}
{% for tag in task.tag_list %} {{ tag }} {% endfor %}
{% else %}

No tags assigned.

{% endif %}
Update Status
Quick Stats
Created {{ task.created_at.strftime('%d %b %Y %H:%M') }}
Last Updated {{ task.updated_at.strftime('%d %b %Y %H:%M') }}
Created By {{ task.created_by or "System" }}
Comments {{ task.comment_count }}
Subtasks {{ task.subtask_count }}
Comments & Discussion {{ task.comment_count }}
{% if task.comments %}
{% for comment in task.comments %}
{{ comment.user[:1].upper() }}
{{ comment.user }} {{ comment.timestamp[:16].replace('T', ' ') if comment.timestamp else "" }}

{{ comment.details }}

{% if comment.attachments %} Attachments: {{ comment.attachments|length }} {% endif %}
{% endfor %}
{% else %}

No comments yet. Start the discussion!

{% endif %}
{% endblock %}