{% extends 'layouts/members.twig' %}

{% set load_vue2_resources = true %}

{% block members_content %}

    {% include 'includes/elements/intro_block.twig' with {
        intro_title: 'Patients',
        intro_content: false,
        class: 'membersIntro',
        use_h1: true
    }%}

    <div class="membersContentWrap">

        <div class="orderList">

            <ul>
                {% for patient in member.referred_members %}
                    <li>

                        <div class="orderBox nhsOrderBox">

                            <div class="orderHeader">


                                <div class="innerOrderHeader">

                                    <div class="orderDate headerCol">
                                        <span class="headerLabel">Member</span>
                                        <span class="headerData">{{ patient.nhs_member.get_member_ref() }} </span>
                                    </div><!-- .orderDate -->

                                    <div class="orderDate headerCol">
                                        <span class="headerLabel">NHS Number</span>
                                        <span class="headerData">{{ patient.nhs_member.nhs_number | default("-") }}</span>
                                    </div><!-- .orderDate -->

                                    <div class="orderDate headerCol">
                                        <span class="headerLabel">Date created</span>
                                        <span class="headerData">{{ patient.nhs_member.created_at }}</span>
                                    </div><!-- .orderDate -->

                                </div><!-- .innerOrderHeader -->

                            </div><!-- .orderHeader -->


                            <div class="orderBody">
                                <div class="orderBodyWrap">
                                    <div class="orderBodyRight">
                                        <div class="orderContent prescriptionContent">

                                            <h4 class="orderTitle">
                                                <a href="{{ route('members-log-in-as-member', [ patient.id ]) }}">
                                                    {{ patient.nhs_member.get_full_name() }}
                                                </a>
                                            </h4>

                                        </div><!-- .orderContent -->
                                    </div><!-- .orderBodyRight -->
                                </div><!-- .orderBodyWrap -->
                            </div><!-- .orderBody -->

                        </div><!-- .orderBox -->

                    </li>

                {% endfor %}
            </ul>

        </div>

    </div> <!-- .membersContentGrid -->

{% endblock %}

