{% extends "base.html" %} {% import "_bank.html" as bank with context %} {% block title %}{{ t('orders.title') }} — painfree{% endblock %} {% block body %}

{{ t('orders.heading') }}

{# `submitted`, `rejected` and `failed` are the contract's own state values and are shown untranslated beside the sentence that explains them: an operator reading a webhook and an operator reading this page have to be looking at one word. #}

{{ t('orders.lede') }}

{% if orders %} {% for row in orders %} {% endfor %}
{{ t('orders.order') }}{{ t('common.connection') }} {{ t('common.state') }}{{ t('orders.scheme') }} {{ t('orders.return_code') }} {{ t('orders.report_text') }}{{ t('orders.accepted') }}
{{ row.order_id }} {{ row.connection_id }} {{ row.state.value }}
{{ t('state.' ~ row.state.value) }}
{{ row.scheme.value }} {% if row.downgraded %}
{{ t('order.downgraded') }}{% endif %}
{% if row.return_code %}{{ row.return_code }}{% else %}—{% endif %} {% if row.report_text %}{{ bank.quiet(row.report_text) }}{% else %}—{% endif %} {{ row.accepted_at | moment }}

{{ t('bank.note') }}

{% else %}

{{ t('orders.empty') }}

{% endif %}
{% endblock %}