{% extends "dashboard_base.html" %} {% block title %}{{ t("overview-page-title") }} — calrs{% endblock %} {% block dashboard_content %}

{{ t("overview-welcome", name=user_name) }}

{{ user_email }}{% if user_role == "admin" %} · {{ t("admin-badge-admin") }}{% endif %}

{% if username %}

{{ t("overview-public-page") }} /u/{{ username }}

{% endif %}
{% if source_count == 0 or event_type_count == 0 %}

{{ t("overview-getting-started") }}

{{ t("overview-getting-started-help") }}

{% if source_count > 0 %} {{ t("overview-step-connect-calendar") }} {% else %} {{ t("overview-step-connect-calendar") }} {% endif %}
{% if event_type_count > 0 %} {{ t("overview-step-first-event-type") }} {% else %} {% if source_count > 0 %} {{ t("overview-step-first-event-type") }} {% else %} {{ t("overview-step-first-event-type") }} {% endif %} {% endif %}
{{ t("overview-step-share-link") }}
{% endif %} {# --- Pending bookings (most urgent — moved to top) --- #} {% if pending_bookings %}

{{ t("overview-pending-approval") }}

{% for b in pending_bookings %}
{{ t("overview-booking-with", title='' ~ (b.event_title | escape) ~ '', guest=b.guest_name | escape) | safe }} {{ t("overview-badge-pending") }}
{{ b.start_at }}
{% if b.start_at_guest %}
{{ t("overview-guest-booked") }} {{ b.start_at_guest }}
{% endif %}
{% endfor %}
{% endif %} {# --- Stats tiles --- #}
📅
{{ event_type_count }}
{{ t("overview-stat-event-types") }}
📋
{{ upcoming_count }}
{{ t("overview-stat-upcoming") }}
{{ pending_count }}
{{ t("overview-stat-pending") }}
🔗
{{ source_count }}
{{ t("overview-stat-sources") }}
{# --- Quick actions: always visible, greyed out with reasons when not available --- #}

{{ t("overview-quick-actions") }}

🌐
{{ t("overview-action-public-title") }}
{{ t("overview-action-public-desc") }}
{% if source_count == 0 %}
{{ t("overview-action-reason-calendar") }}
{% endif %}
👥
{{ t("overview-action-team-title") }}
{% if team_count > 0 %}{{ t("overview-action-team-desc") }}{% else %}{{ t("overview-action-team-desc-empty") }}{% endif %}
{% if source_count == 0 %}
{{ t("overview-action-reason-calendar") }}
{% elif team_count == 0 and not is_admin %}
{{ t("overview-action-reason-ask-admin") }}
{% endif %}
🔒
{{ t("overview-action-private-title") }}
{{ t("overview-action-private-desc") }}
{% if source_count == 0 %}
{{ t("overview-action-reason-calendar") }}
{% endif %}
🏢
{{ t("overview-action-shared-title") }}
{{ t("overview-action-shared-desc") }}
{% if source_count == 0 %}
{{ t("overview-action-reason-calendar") }}
{% elif team_count == 0 %}
{% if is_admin %}{{ t("overview-action-reason-team-admin") }}{% else %}{{ t("overview-action-reason-team-member") }}{% endif %}
{% endif %}
{% endblock %}