{% 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('account_user') }}">Account User List</a></li>
                    <li>
                        <span class="show-for-sr">Current: </span> Account User Details
                    </li>
                </ul>
            </nav>
            {% include '@RxConnexion/AccountUser/overview.html.twig' with {accountUser: accountUser} %}
            <br/>
            <div class="content-container has-loading">
                <div class="content-container-content hide">
                    <ul class="tabs custom-tabs" data-tabs id="provider-tabs">
                        {% if userData.type == 'Super Admin' or 'Admin Account User Profile' in userData.accesses %}
                            <li class="tabs-title {{ tab is null or tab is empty or tab == 'm' ? 'is-active' : '' }}"><a href="#panel-profile" aria-selected="true">Profile</a></li>
                        {% endif %}
                        {% if userData.type == 'Super Admin' or 'Admin Account User Company' in userData.accesses %}
                            <li class="tabs-title" {{ tab == 'br' ? 'is-active' : '' }}><a href="#panel-company" aria-selected="true">Company</a></li>
                        {% endif %}
                        {% if userData.type == 'Super Admin' or 'Admin Account User Health Facility' in userData.accesses %}
                            <li class="tabs-title" {{ tab == 'br' ? 'is-active' : '' }}><a href="#panel-medical-facilities" aria-selected="true">Branch</a></li>
                        {% endif %}
                        {#{% if userData.type == 'Super Admin' or 'Admin Account User Group' in userData.accesses %}#}
                            {#<li class="tabs-title" {{ tab == 'aug' ? 'is-active' : '' }}><a href="#panel-group" aria-selected="true">Group</a></li>#}
                        {#{% endif %}#}
                    </ul>
                    <div class="tabs-content custom-tabs-content" data-tabs-content="provider-tabs">
                        <div class="tabs-panel {{ tab is null or tab is empty or tab == 'm' ? 'is-active' : '' }}" id="panel-profile">
                            {% if userData.type == 'Super Admin' or 'Admin Account User Detail Profile' in userData.accesses %}
                                {% include '@RxConnexion/AccountUser/profile.html.twig' with {accountUser: accountUser} %}
                            {% endif %}
                        </div>
                        <div class="tabs-panel" id="panel-company">
                            {#<div class="large-5 columns">#}
                            {#<div class="input-group">#}
                            {#<label class="input-group-label">Status</label>#}
                            {#<select class="input-group-field" id="status">#}
                            {#<option value="" selected>All</option>#}
                            {#<option value="active">Active</option>#}
                            {#<option value="not_active">Inactive</option>#}
                            {#</select>#}
                            {#</div>#}
                            {#</div>#}
                            <div class="text-right">
                                {% if userData.type == 'Super Admin' or 'Admin Account User Company New' in userData.accesses %}
                                    <a href="javascript:void(0)" class="href-company-form href-new-action" data-action="n" data-id="0">Add Company</a>
                                {% endif %}
                            </div>
                            <table class="display responsive" id="company-datalist" width="100%">
                                <thead>
                                <tr>
                                    <th>ID</th>
                                    <th>Company</th>
                                    <th>Start Date</th>
                                    <th>End Date</th>
                                    <th>Action</th>
                                </tr>
                                </thead>
                                <tbody></tbody>
                            </table>
                        </div>
                        <div class="tabs-panel" id="panel-medical-facilities">
                            {#<div class="large-5 columns">#}
                                {#<div class="input-group">#}
                                    {#<label class="input-group-label">Status</label>#}
                                    {#<select class="input-group-field" id="status">#}
                                        {#<option value="" selected>All</option>#}
                                        {#<option value="active">Active</option>#}
                                        {#<option value="not_active">Inactive</option>#}
                                    {#</select>#}
                                {#</div>#}
                            {#</div>#}
                            <div class="text-right">
                                {% if userData.type == 'Super Admin' or 'Admin Provider Health Facility New' in userData.accesses %}
                                    <a href="javascript:void(0)" class="href-health-facility-form href-new-action" data-action="n" data-id="0">Add Branch</a>
                                {% endif %}
                            </div>
                            <table class="display responsive" id="healthFacilities-datalist" width="100%">
                                <thead>
                                <tr>
                                    <th>ID</th>
                                    <th>Company</th>
                                    <th>Branch</th>
                                    <th>Description</th>
                                    <th>Mobile No.</th>
                                    <th>Phone No.</th>
                                    <th>Email</th>
                                    <th>Start Date</th>
                                    <th>End Date</th>
                                    <th>Action</th>
                                </tr>
                                </thead>
                                <tbody></tbody>
                            </table>
                        </div>
                        {#<div class="tabs-panel" id="panel-group">#}
                            {#<div class="text-right">#}
                                {#{% if userData.type == 'Super Admin' or 'Admin Account User Group Ref New' in userData.accesses %}#}
                                    {#<a href="javascript:void(0)" class="href-userGroup-form href-new-action" data-action="n" data-id="0">Add Group</a>#}
                                {#{% endif %}#}
                            {#</div>#}
                            {#<table class="display responsive" id="userGroup-datalist" width="100%">#}
                                {#<thead>#}
                                {#<tr>#}
                                    {#<th>ID</th>#}
                                    {#<th>User Group</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[
        accountUser_detail.settings.account_user_id = '{{ account_user_id }}';
        accountUser_detail.settings.healthFacilities_ajaxUrl = '{{ path('account_user_health_facilities_ajax_list') }}';
        accountUser_detail.settings.healthFacilities_formUrl = '{{ path('account_user_health_facilities_form', {account_user_id:account_user_id}) }}';
        accountUser_detail.settings.healthFacilities_formActionUrl = '{{ path('account_user_health_facilities_save') }}';

        accountUser_detail.settings.company_ajaxUrl = '{{ path('account_user_company_ajax_list') }}';
        accountUser_detail.settings.company_formUrl = '{{ path('account_user_company_form', {account_user_id:account_user_id}) }}';
        accountUser_detail.settings.company_formActionUrl = '{{ path('account_user_company_save') }}';

        {#accountUser_detail.settings.userGroup_ajaxUrl = '{{ path('account_user_user_group_ajax_list') }}';#}
        {#accountUser_detail.settings.userGroup_formUrl = '{{ path('account_user_account_user_group_form', {account_user_id:account_user_id}) }}';#}
        {#accountUser_detail.settings.userGroup_formActionUrl = '{{ path('account_user_user_group_save') }}';#}
        jQ(document).ready(accountUser_detail.init);
        //]]>
    </script>
{% endblock %}