
<div class="row">
    <strong>Consultations Found:</strong>
    {{ consultationsFound }}
</div>
<div class="row">
    <table class="manage-items">
        <tr>
            <th>ID</th>
            <th>Type</th>
            <th>Date &amp; Time</th>
            <th>Status</th>
            <th>Patient</th>
            <th>Assigned To</th>
            <th>Duration</th>
            <th>Cost</th>
            <th>Medium</th>
            <th>Documents</th>
            <th class="center">View</th>
            <th class="center">Video</th>
        </tr>
        <tbody class="tabular">
        {% for consultation in consultations %}
            <tr>
                <td>
                    <a href="{{ consultation.viewURL }}"
                       target="_blank"
                    >
                        {{ consultation.wisebee_id }}
                    </a>
                </td>
                <td>
                    {{ consultation.rate }}
                </td>
                <td>
                    {{ consultation.dateTime }}
                </td>
                <td>
                    {{ consultation.status }}
                </td>
                <td>
                    {% if consultation.member_id is not empty %}
                        <a href="{{ route('admin-patients-profile', {
                            id: consultation.member_id
                        }) }}">
                            {{ consultation.patient.firstname }} {{ consultation.patient.lastname }}
                        </a>
                    {% else %}
                        {{ consultation.patient.firstname }} {{ consultation.patient.lastname }}
                    {% endif %}
                </td>
                <td>
                    {{ consultation.specialist ?
                    consultation.specialist.firstname ~ ' ' ~ consultation.specialist.lastname :
                    '-'
                    }}
                </td>
                <td>
                    {{ consultation.length }} min
                </td>
                <td>
                    {{ (consultation.cost > 0 ? '&pound;' ~ consultation.cost : '-')|raw }}
                </td>
                <td>
                    {{ mediums[consultation.medium] }}
                </td>
                <td>
                    {% include 'wisebee/admin/documents.twig' with {
                        documents: consultation.documents
                    } %}
                </td>
                <td class="center">
                    <a href="{{ consultation.viewURL }}"
                       target="_blank"
                    >
                        <i class="fa fa-eye"></i>
                    </a>
                </td>
                <td class="center">
                    {% if consultation.videoURL is not empty %}
                        <a href="{{ consultation.videoURL }}"
                           target="_blank"
                        >
                            <i class="fa fa-video-camera"></i>
                        </a>
                    {% endif %}
                </td>
            </tr>
        {% endfor %}
        </tbody>
    </table>
</div>