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

🏢 {{ company.name }}

Company Details - System Administrator View

📋 Company Information

{{ company.name }}
{{ company.slug }}
{% if company.is_personal %} Personal/Freelancer {% else %} Business Company {% endif %}
{% if company.is_active %} Active {% else %} Inactive {% endif %}
{{ company.created_at.strftime('%Y-%m-%d %H:%M') }}
{{ company.max_users or 'Unlimited' }}
{% if company.description %}
{{ company.description }}
{% endif %}

📊 Company Statistics

{{ users|length }}

Total Users

{{ teams|length }}

Teams

{{ projects|length }}

Projects

{{ recent_time_entries }}

Recent Time Entries

(Last 7 days)
{% if role_counts %}

👥 Role Distribution

{% for role, count in role_counts.items() %}
{{ count }} {{ role }}
{% endfor %}
{% endif %}

👤 Users ({{ users|length }})

{% if users %}
{% for user in users[:10] %}
{{ user.username }} {{ user.email }}
{{ user.role.value }} {% if user.is_blocked %} Blocked {% elif not user.is_verified %} Unverified {% endif %}
{% endfor %} {% if users|length > 10 %} {% endif %}
{% else %}

No users in this company.

{% endif %}

🏭 Teams ({{ teams|length }})

{% if teams %}
{% for team in teams %}
{{ team.name }} {% if team.description %} {{ team.description }} {% endif %}
{{ team.created_at.strftime('%Y-%m-%d') }}
{% endfor %}
{% else %}

No teams in this company.

{% endif %}

📝 Projects ({{ projects|length }})

{% if projects %}
{% for project in projects[:10] %}
{{ project.name }} {{ project.code }} {% if project.description %} {{ project.description[:50] }}{% if project.description|length > 50 %}...{% endif %} {% endif %}
{% if project.is_active %} Active {% else %} Inactive {% endif %}
{% endfor %} {% if projects|length > 10 %}

And {{ projects|length - 10 }} more projects...

{% endif %}
{% else %}

No projects in this company.

{% endif %}

🛠️ Management Actions

{% endblock %}