{% extends "views/platform-admin/_base_template.html" %}

{% block per_page_title %}
Inbound SMS
{% endblock %}

{% set table_headings = {
  'field_headings': [
    'Number', 'Status', 'Service', 'Created on'
  ],
  'field_headings_visible': True,
  'caption_visible': True
} %}


.inbound {
  font-style:normal;
  font-weight:normal;
}

{% block platform_admin_content %}

  <h1 class="font-body-2xl">
    Inbound SMS
  </h1>

  <table class="usa-table usa-table--borderless inbound">
          <thread>
              <tr>
                <th>{{table_headings.field_headings[0]}}</th>
                <th>{{table_headings.field_headings[1]}}</th>
                <th>{{table_headings.field_headings[2]}}</th>
              </tr>
          </thread>
          <tbody>

          {% for value in inbound_num_list.data: %}
          <tr>
              <td>{{value.number}}</td>
              <td>

              {% if value.active %}
                Active
              {% elif not value.service.name  %}
                  Not used
              {% else %}
                Inactive
              {% endif %}
              </td>
              <td>
                  <a href="{{ url_for('main.service_dashboard', service_id=value.service.id) }}" class="usa-link bold">{{ value.service.name }}</a>
              </td>
          </tr>
          {% endfor %}
          </tbody>
  </table>

{% endblock %}
