{% extends "dashboard_base.html" %} {% block title %}Invites — {{ event_type_title }} — calrs{% endblock %} {% block dashboard_content %}

{{ t("invites-heading") }}

{% if team_slug %}{{ t("invites-back-teams") }}{% else %}{{ t("invites-back-event-types") }}{% endif %}

{{ t("invites-intro", title='' ~ (event_type_title | escape) ~ '') | safe }} {% if owner_name is defined and owner_name %}({{ owner_name }}){% endif %}

{% if error %}
{{ error }}
{% endif %} {% if bulk_result %} {% if bulk_result.sent_count > 0 %}
{{ t("invites-sent-count", count=bulk_result.sent_count) }}
{% endif %} {% if bulk_result.has_issues %}
{% if bulk_result.over_limit %}
{{ t("invites-capped", max=bulk_result.max_recipients | escape) | safe }}
{% endif %} {% if bulk_result.invalid %}
{{ t("invites-skipped-invalid", count=bulk_result.invalid|length) }} {{ bulk_result.invalid|join(", ") }}
{% endif %} {% if bulk_result.duplicates %}
{{ t("invites-skipped-duplicate", count=bulk_result.duplicates|length) }} {{ bulk_result.duplicates|join(", ") }}
{% endif %} {% if bulk_result.failed %}
{{ t("invites-failed", count=bulk_result.failed|length) }} {{ bulk_result.failed|join(", ") }} {{ t("invites-failed-hint") }}
{% endif %}
{% endif %} {% endif %}
{{ t("invites-quick-link") }}
{{ t("invites-quick-link-help") }}

{{ t("invites-or-email") }}

{% if invites %}

{{ t("invites-sent-heading") }}

{% for inv in invites %}
{{ inv.guest_name }} · {{ inv.guest_email }} {% if inv.is_expired %} {{ t("invites-badge-expired") }} {% elif inv.is_used %} {{ t("invites-badge-used") }} {% else %} {{ t("invites-badge-active") }} {% endif %}
{{ t("invites-sent-by", name=inv.created_by) }} · {{ t("invites-uses", used=inv.used_count, max=inv.max_uses) }} {% if inv.expires_at %} · {{ t("invites-expires-at", date=inv.expires_at) }}{% endif %}
{% if not inv.is_expired and not inv.is_used %} {% endif %} {% if can_delete_invites %}
{% endif %}
{% endfor %}
{% else %}
{{ t("invites-empty") }}
{% endif %}
{% endblock dashboard_content %}