{% extends "base.html" %} {% import "macros/user_cell.html" as user_cell %} {% block content %} {% set tz = settings.timezone %} {% set dt_fmt = '%d %b %Y, %H:%M' %}
{% if computed_state == "valid" or computed_state == "visit_complete" %}
{% elif computed_state == "checked_in" or computed_state == "acknowledged" %}
{% elif computed_state == "checked_out" or computed_state == "completed" %}
{% elif computed_state == "expired" or computed_state == "too_early" or computed_state == "outside_schedule" %}
{% else %}
{% endif %}
{% if computed_state == "valid" %}

Valid for check-in

{% if pass.pass_kind == "servant" %}Staff may enter now within the authorized dates and hours.{% else %}This guest is approved for initial entry.{% endif %}

{% elif computed_state == "visit_complete" %}

Previous visit complete

{% if pass.pass_kind == "servant" %}The previous exit is recorded. Staff may check in again during permitted hours.{% else %}This pass is ready for a new visit.{% endif %}

{% elif computed_state == "checked_in" %}

{% if pass.pass_kind == "servant" %}Staff on premises{% else %}Guest inside{% endif %}

{% if pass.pass_kind == "servant" %}Checked in. Security can record the staff member’s exit below.{% else %}Entry is recorded. Host confirmation is pending.{% endif %}

{% elif computed_state == "acknowledged" %}

Guest inside · confirmed

The host confirmed the guest’s arrival.

{% elif computed_state == "checked_out" %}

Valid for exit · checked out

The host completed checkout. Security can confirm the guest’s exit.

{% elif computed_state == "completed" %}

Exit confirmed

The guest has left the premises.

{% elif computed_state == "expired" %}

Pass expired

The validity or exit grace period has ended.

{% elif computed_state == "too_early" %}

Scheduled pass

This pass is not active yet. Check the appointment time below.

{% elif computed_state == "outside_schedule" %}

Outside permitted hours

This is outside the authorization schedule for this pass.

{% elif computed_state == "violation" %}

Host acknowledgment overdue

The host has not confirmed receipt within the allowed time.

{% else %}

Pass revoked or cancelled

The host cancelled this gate pass.

{% endif %}

Pass information

{% if pass.pass_kind == "servant" %}Staff member{% else %}Primary guest{% endif %}
{{ pass.guest_name }}
{% if pass.pass_kind != "servant" %}
Additional guests
+{{ pass.additional_guests }}
{% endif %}
Vehicle or access
{{ pass.vehicle_number }}
{% if pass.pass_kind == "servant" %}Valid period{% else %}Appointment time{% endif %}
{% if pass.pass_kind == "servant" %}{{ pass.valid_from | date_in_tz(timezone=tz, format=dt_fmt) }} – {{ pass.valid_to | date_in_tz(timezone=tz, format=dt_fmt) }}{% else %}{{ pass.appointment_time | date_in_tz(timezone=tz, format=dt_fmt) }}{% endif %}
Intended host
{{ user_cell::render(name=pass.owner_name, email=pass.owner_email, avatar=pass.owner_avatar) }}
Issued by
{{ pass.issuer_role }} ({{ pass.issuer_name }})

Pass lifecycle

  1. Pass created

    {{ pass.created_at | date_in_tz(timezone=tz, format=dt_fmt) }}

  2. Gate check-in

    {% if pass.check_in_time %}{{ pass.check_in_time | date_in_tz(timezone=tz, format=dt_fmt) }}{% else %}Pending entry{% endif %}

  3. {% if pass.pass_kind != "servant" %}
  4. Host acknowledgment

    {% if pass.acknowledged_at %}{{ pass.acknowledged_at | date_in_tz(timezone=settings.timezone) }}{% else %}Awaiting host receipt confirmation{% endif %} {% if computed_state == "violation" %}(Violation flagged){% endif %}

  5. Host checkout

    {% if pass.checkout_time %}{{ pass.checkout_time | date_in_tz(timezone=tz, format=dt_fmt) }}{% else %}Pending host checkout{% endif %}

  6. {% endif %}
  7. Gate exit

    {% if pass.pass_kind == "servant" %}{% if pass.checkout_time %}{{ pass.checkout_time | date_in_tz(timezone=tz, format=dt_fmt) }}{% else %}Awaiting exit{% endif %}{% elif pass.status == 'completed' %}Exit confirmed{% else %}Awaiting exit{% endif %}

{% if not is_security %} {% else %}
{% if computed_state == "valid" or computed_state == "visit_complete" %} {% elif computed_state == "checked_in" or computed_state == "checked_out" or computed_state == "acknowledged" %} {% endif %} {% if computed_state == "violation" %} {% endif %}
{% endif %} {% if is_owner and pass.pass_kind != "servant" %} {% if computed_state == "checked_in" or computed_state == "violation" or computed_state == "acknowledged" %}

Host receipt and checkout

{% if computed_state == "checked_in" or computed_state == "violation" %} {% elif computed_state == "acknowledged" %} {% endif %}
{% endif %} {% endif %}
{% endblock %} {% block scripts %} {% endblock %}