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

⚠️ Confirm Company Deletion

Critical Action Required - Review All Data Before Proceeding

← Back to User Management

Critical Warning!

You are about to delete user {{ user.username }} who is the last administrator/supervisor in company {{ company.name }}.

This action will permanently delete the entire company and ALL associated data.

This action cannot be undone!

The following data will be permanently deleted:

🏢 Company Information

Company Name: {{ company.name }}
Company Slug: {{ company.slug }}
Created: {{ company.created_at.strftime('%Y-%m-%d %H:%M') }}
Description: {{ company.description or 'None' }}
{% if users %}

👥 Users ({{ users|length }})

{% for u in users %} {% endfor %}
Username Email Role Team Joined Status
{{ u.username }} {% if u.id == user.id %}Target User{% endif %} {{ u.email }} {{ u.role.value }} {{ u.team.name if u.team else 'None' }} {{ u.created_at.strftime('%Y-%m-%d') }} {% if u.is_blocked %}Blocked{% else %}Active{% endif %}
{% endif %} {% if teams %}

🏭 Teams ({{ teams|length }})

{% for team in teams %} {% endfor %}
Team Name Description Members Created
{{ team.name }} {{ team.description or 'None' }} {{ team.users|length }} {{ team.created_at.strftime('%Y-%m-%d') }}
{% endif %} {% if projects %}

📝 Projects ({{ projects|length }})

{% for project in projects %} {% endfor %}
Project Code Project Name Team Tasks Time Entries Created By
{{ project.code }} {{ project.name }} {{ project.team.name if project.team else 'None' }} {{ project.tasks|length }} {{ project.time_entries|length }} {{ project.created_by.username }}
{% endif %} {% if tasks %}

✅ Tasks ({{ tasks|length }})

{% for task in tasks %} {% endfor %}
Task Name Project Status Priority Assigned To Subtasks
{{ task.name }} {{ task.project.code }} {{ task.status.value }} {{ task.priority.value }} {{ task.assigned_to.username if task.assigned_to else 'None' }} {{ task.subtasks|length }}
{% endif %} {% if time_entries_count > 0 %}

⏱️ Time Entries ({{ time_entries_count }})

{{ time_entries_count }} time tracking entries will be permanently deleted.

Total Hours Tracked: {{ total_hours_tracked }} hours

{% endif %} {% if categories %}

🏷️ Project Categories ({{ categories|length }})

{% for category in categories %} {% endfor %}
Category Name Projects Created By
{{ category.name }} {{ category.projects|length }} {{ category.created_by.username }}
{% endif %}

Final Confirmation Required

Cancel
{% endblock %}