{% extends "ui/base_ui.html" %} {% block title %}Invites — ATP Platform{% endblock %} {% block content %}

Invite Management

{% if error %}
Error: {{ error }}
{% endif %} {% if new_code %}
Invite created — share this code
{{ new_code }}
Send it to the person you're inviting. They'll use it at /ui/register. Single-use; expires per your setting.
{% endif %} New Invite
{% if invites %}
{% for inv in invites %} {% set is_used = inv.use_count >= inv.max_uses %} {% set is_expired = inv.expires_at and inv.expires_at < now %} {% endfor %}
Code Created By Used By Expires Status Created Actions
{{ inv.code }} {{ inv.created_by_name or inv.created_by_id }} {{ inv.used_by_name or '—' }} {{ inv.expires_at.strftime('%Y-%m-%d') if inv.expires_at else 'never' }} {% if is_used %}used {% elif is_expired %}expired {% else %}active{% endif %} {{ inv.created_at.strftime('%Y-%m-%d %H:%M') }} {% if not is_used and not is_expired %}
{% else %} — {% endif %}
{% else %}

No invites yet.

{% endif %} {% endblock %}