{% extends "base.html" %}
{% block header %}
{% endblock header %}
{% block content %}
  <header>
    <div class="jumbotron jumbotron-fluid">
      <div class="container">
        <h1 class="display-4">Appointments ({{ appt_id }})</h1>
        <p class="lead">Showing details about appointmenmt {{ appt_id }}. To modify, hit the "Modify appointment" button.</p>
      </div>
    </div>
    <hr class="my-4">
  </header>
  <body>
    <div class="row">
      <div class="col">
        <div class="btn-group" role="group" aria-label="Basic example">
          <a href="{{ url_for('appointment_modify', appt_id = appt_id, ppt_id = ppt_id) }}">
            <button type="button" class="btn btn-warning">
              <i class="fa fa-pen"></i>&nbsp;&nbsp;Modify
              appointment
            </button>
          </a>
          <a href="{{ url_for('questionnaire_new', ppt_id = ppt_id) }}">
            <button type="button" class="btn btn-primary">
              <i class="fa-regular fa-clipboard"></i>&nbsp;&nbsp;Add language
              questionnaire
            </button>
          </a>
        </div>
      </div>
    </div>
    <div class="card card-info">
      <div class="card-header">Appointment information</div>
      <div class="card-body">
        <table class="table table-hover table-borderless table-responsive">
          <tbody>
            <tr>
              <th>
                Participant ID&nbsp;&nbsp;&nbsp;&nbsp;<i class="fa fa-person"></i>
              </th>
              <td user-select-all>{{ ppt_id }}</td>
            </tr>
            <tr>
              <th>
                Appointment ID&nbsp;&nbsp;&nbsp;&nbsp;<i class="fa fa-calendar"></i>
              </th>
              <td>{{ appt_id }}</td>
            </tr>
            <tr>
              <th>
                Appointment status&nbsp;&nbsp;&nbsp;&nbsp;<i class="fa fa-check"></i>
              </th>
              <td>{{ data["status"] }}</td>
            </tr>
            <tr>
              <th>
                Study&nbsp;&nbsp;&nbsp;&nbsp;<i class="fa fa-flask"></i>
              </th>
              <td>{{ data["date"] }}</td>
            </tr>
            <tr>
              <th>
                Made on the&nbsp;&nbsp;&nbsp;&nbsp;<i class="fa fa-calendar"></i>
              </th>
              <td>{{ data["date_created"] }}</td>
            </tr>
            <tr>
              <th>
                Last updated&nbsp;&nbsp;&nbsp;&nbsp;<i class="fa fa-pen"></i>
              </th>
              <td>{{ data["date_updated"] }}</td>
            </tr>
            <tr>
              <th>
                Taxi address&nbsp;&nbsp;&nbsp;&nbsp;<i class="fa fa-car"></i>
              </th>
              <td>{{ data["taxi_address"] }}</td>
            </tr>
            <tr>
              <th>
                Is taxi booked?&nbsp;&nbsp;&nbsp;&nbsp;<i class="fa fa-check"></i>
              </th>
              <td>{{ data["taxi_isbooked"] }}</td>
            </tr>
            <tr>
              <th>
                Comments?&nbsp;&nbsp;&nbsp;&nbsp;<i class="fa fa-comment"></i>
              </th>
              <td>{{ data["comments"] }}</td>
            </tr>
          </tbody>
        </table>
      </div>
    </div>
    <div class="card card-info">
      <div class="card-header">Participant information</div>
      <div class="card-body">
        <table class="table table-hover table-borderless table-responsive">
          <tbody>
            <tr>
              <th>
                Name&nbsp;&nbsp;&nbsp;&nbsp;<i class="fa fa-person"></i>
              </th>
              <td user-select-all>{{ participant["name"] }}</td>
            </tr>
            <tr>
              <th>
                Added on&nbsp;&nbsp;&nbsp;&nbsp;<i class="fa fa-calendar"></i>
              </th>
              <td>{{ participant["date_added"] }}</td>
            </tr>
            <tr>
              <th>
                Age&nbsp;&nbsp;&nbsp;&nbsp;<i class="fa fa-hourglass-start"></i>
              </th>
              <td>{{ participant["age_now_months"] + ":" + participant["age_now_days"] }}</td>
            </tr>
            <tr>
              <th>
                Sex&nbsp;&nbsp;&nbsp;&nbsp;<i class="fa fa-venus-mars"></i>
              </th>
              <td>{{ data["sex"] }}</td>
            </tr>
            <tr>
              <th>
                Comments&nbsp;&nbsp;&nbsp;&nbsp;<i class="fa fa-comment"></i>
              </th>
              <td>{{ participant["comments"] }}</td>
            </tr>
          </tbody>
        </table>
      </div>
    </div>
    <div class="card card-info">
      <div class="card-header">Contact details</div>
      <div class="card-body">
        <table class="table table-hover table-borderless table-responsive">
          <tbody>
            <tr>
              <th>
                Phone&nbsp;&nbsp;&nbsp;&nbsp;<i class="fa fa-phone"></i>
              </th>
              <td user-select-all>{{ participant["phone1"] }}</td>
            </tr>
            <tr>
              <th>
                E-mail&nbsp;&nbsp;&nbsp;&nbsp;<i class="fa fa-envelope"></i>
              </th>
              <td>{{ participant["email1"] }}</td>
            </tr>
            <tr>
              <th>
                Phone 2&nbsp;&nbsp;&nbsp;&nbsp;<i class="fa fa-phone"></i>
              </th>
              <td user-select-all>{{ participant["phone2"] }}</td>
            </tr>
            <tr>
              <th>
                E-mail 2&nbsp;&nbsp;&nbsp;&nbsp;<i class="fa fa-envelope"></i>
              </th>
              <td>{{ participant["email2"] }}</td>
            </tr>
            <tr>
              <th>
                Taxi address&nbsp;&nbsp;&nbsp;&nbsp;<i class="fa fa-house"></i>
              </th>
              <td>{{ participant["house"] }}</td>
            </tr>
            <tr>
              <th>
                Postcode&nbsp;&nbsp;&nbsp;&nbsp;<i class="fa fa-city"></i>
              </th>
              <td>{{ data["postcode"] }}</td>
            </tr>
            <tr>
              <th>
                City&nbsp;&nbsp;&nbsp;&nbsp;<i class="fa fa-city"></i>
              </th>
              <td>{{ participant["city"] }}</td>
            </tr>
          </tbody>
        </table>
      </div>
    </div>
  </body>
{% endblock content %}
