{% extends '@RxConnexion/Admin/content.html.twig' %}
{% block content %}
    <div id="flash-messages-container">
    </div>
    <div class="row max-width-initial">
        <div class="small-12 columns">
            <nav aria-label="You are here:" role="navigation">
                <ul class="breadcrumbs">
                    <li><a href="{{ path('referring_health_facility') }}">Referring Affiliate List</a></li>
                    <li>
                        <span class="show-for-sr">Current: </span> Referring Affiliate Details
                    </li>
                </ul>
            </nav>
            {% include '@RxConnexion/ReferringHealthFacility/overview.html.twig' with {referringHealthFacility: referringHealthFacility} %}
            <br/>
            <div class="content-container has-loading">
                <div class="content-container-content hide">
                    <ul class="tabs custom-tabs" data-tabs id="referring-health-facility-tabs">
                        {% if userData.type == 'Super Admin' or 'Admin Referring Health Facility Detail Referring Health Facility' in userData.accesses %}
                            <li class="tabs-title {{ tab is null or tab is empty or tab == 'm' ? 'is-active' : '' }}"><a href="#panel-referring-medical-facilities" aria-selected="true">Referring Affiliate</a></li>
                        {% endif %}
                        {% if userData.type == 'Super Admin' or 'Admin Sales Agent Detail Referring Health Facility' in userData.accesses %}
                            {#<li class="tabs-title"><a href="#panel-sales-agent" aria-selected="true">Agent</a></li>#}
                        {% endif %}
                    </ul>
                    <div class="tabs-content custom-tabs-content" data-tabs-content="referring-health-facility-tabs">
                        <div class="tabs-panel {{ tab is null or tab is empty or tab == 'm' ? 'is-active' : '' }}" id="panel-referring-medical-facilities">
                            <div class="text-right">
                                {% if userData.type == 'Super Admin' or 'Admin Referring Health Facility Provider New' in userData.accesses %}
                                    <a href="javascript:void(0)" class="href-referring-provider-form href-new-action" data-action="n" data-id="0">Add Referring Physician</a>
                                {% endif %}
                            </div>
                            <table class="display responsive" id="referringProviders-datalist" width="100%">
                                <thead>
                                <tr>
                                    <th>Full Name</th>
                                    <th>Address</th>
                                    <th>Phone No(s).</th>
                                    <th>Mobile No(s).</th>
                                    <th>Email(s)</th>
                                    <th>Start Date</th>
                                    <th>End Date</th>
                                    <th>Action</th>
                                </tr>
                                </thead>
                                <tbody></tbody>
                            </table>
                        </div>
                    </div>
                    {#<div class="tabs-content custom-tabs-content" data-tabs-content="referring-health-facility-tabs">
                        <div class="tabs-panel" id="panel-sales-agent">
                            <div class="text-right">
                                {% if userData.type == 'Super Admin' or 'Admin Referring Health Facility Sales Agent New' in userData.accesses %}
                                    <a href="javascript:void(0)" class="href-referring-sales_agent-form href-new-action" data-action="n" data-id="0">Add Agent</a>
                                {% endif %}
                            </div>
                            <table class="display responsive" id="referringSalesAgent-datalist" width="100%">
                                <thead>
                                <tr>
                                    <th>Full Name</th>
                                    <th>Start Date</th>
                                    <th>End Date</th>
                                    <th>Action</th>
                                </tr>
                                </thead>
                                <tbody></tbody>
                            </table>
                        </div>
                    </div>#}
                </div>
            </div>
        </div>
    </div>
    <div class="reveal small" id="modal" data-reveal>
        <div id="modal-content"></div>
        <button class="close-button" data-close aria-label="Close modal" type="button">
            <span aria-hidden="true">&times;</span>
        </button>
    </div>
    {% include '@RxConnexion/Admin/js.html.twig' %}
    <script language="javascript">
        //<![CDATA[
        referringHealthFacility_detail.settings.referringHealthFacility_id = '{{ referringHealthFacility_id }}';
        referringHealthFacility_detail.settings.referringMedicalFacilities_ajaxUrl = '{{ path('referring_health_facility_provider_ajax_list') }}';
        referringHealthFacility_detail.settings.referringMedicalFacilities_formUrl = '{{ path('referring_health_facility_provider_form', {referringHealthFacility_id:referringHealthFacility_id}) }}';
        referringHealthFacility_detail.settings.referringMedicalFacilities_formActionUrl = '{{ path('referring_health_facility_provider_save') }}';

        referringHealthFacility_detail.settings.referringSalesAgent_ajaxUrl = '{{ path('referring_health_facility_sales_agent_ajax_list') }}';
        referringHealthFacility_detail.settings.referringSalesAgent_formUrl = '{{ path('referring_health_facility_sales_agent_form', {referringHealthFacility_id:referringHealthFacility_id}) }}';
        referringHealthFacility_detail.settings.referringSalesAgent_formActionUrl = '{{ path('referring_health_facility_sales_agent_save') }}';
        jQ(document).ready(referringHealthFacility_detail.init);
        //]]>
    </script>
{% endblock %}