{% extends "list_requests.html" %}
{% from "macros.html" import clipboard_button %}

{% block table_headers %}
{{ request_header('pilot', 'Pilot', 'paste') }}
{{ request_header('id', 'Request ID (copy)', 'paste') }}
{{ request_header('payout', 'Payout', 'paste') }}
{{ request_header(None, 'Mark Paid', 'paid') }}
{{ request_header('id', 'Request ID (link)') }}
{{ request_header('status', 'Status') }}
{{ request_header('division', 'Division') }}
{% endblock table_headers %}


{% block table_row %}
{{ request_cell('pilot', clipboard_button(request.pilot.name)) }}
{{ request_cell('id', clipboard_button(request.id)) }}
{{ request_cell('payout', clipboard_button(request.payout.currency())) }}
<td>
  <form method="post" action="{{ url_for('requests.get_request_details', request_id=request.id) }}">
    {{ form.id_ }}
    {{ form.type_(value='paid') }}
    {{ form.csrf_token }}
    <button class="btn btn-success btn-sm paid-btn" type="submit">Paid</button>
  </form>
</td>
<td class="col-id"><a href="{{ url_for('requests.get_request_details', request_id=request.id) }}">{{ request.id }}</a></td>
{{ request_cell('status', request.status) }}
{{ request_cell('division', request.division.name) }}
{% endblock table_row %}
