{# ============================================================================== Formeleon - Multi-tenant Form Generator Author: Björn Runden Template: admin/dashboard.html Description: Admin dashboard overview page with statistics and quick access. ============================================================================== #} {% extends "base.html" %} {% block title %}Dashboard - Formeleon{% endblock %} {% block content %}

Dashboard

Welcome, {{ user.name }}! | Role: {{ user.role.value }}

{# Statistics Cards #}

{{ tenant_count }}

Tenants

{{ form_count }}

Forms

{{ submission_count }}

Submissions

100%

Uptime

{# Recent Submissions #}
Recent Submissions
{% if recent_submissions %}
{% for submission in recent_submissions %} {% endfor %}
ID Form Date Status Actions
{{ submission.id[:12] }}... {{ submission.form_config.name if submission.form_config else 'N/A' }} {{ submission.created_at.strftime('%Y-%m-%d %H:%M') if submission.created_at else 'N/A' }} {{ submission.status.value }}
{% else %}

No recent submissions

{% endif %}
{# Recent Forms #}
Recent Forms
{% if recent_forms %}
{% for form in recent_forms %} {% endfor %}
Name Tenant Status Created Actions
{{ form.name }} {{ form.tenant.name if form.tenant else 'N/A' }} {{ 'Active' if form.is_active else 'Inactive' }} {{ form.created_at.strftime('%Y-%m-%d') if form.created_at else 'N/A' }}
{% else %}

No recent forms

{% endif %}
{% if user.is_admin() %} {# Tenants Overview #}
Tenants Overview
{% if tenants %}
{% for tenant in tenants %} {% endfor %}
Name ID Status Forms Actions
{{ tenant.name }} {{ tenant.id }} {{ tenant.status.value }} {{ tenant.forms|length }}
{% else %}

No tenants yet

{% endif %}
{% endif %}
{% endblock %} {% block extra_css %} {% endblock %}