{% extends '@RxConnexion/Admin/content.html.twig' %}
{% block content %}
    <div class="row max-width-initial">
        <div class="small-12 columns">
            <div class="content-container has-loading">
                <div class="content-container-content hide">
                    <div class="row max-width-initial">
                        {#<div class="large-5 columns">#}
                            {#<div class="input-group">#}
                                {#<label class="input-group-label">Approval</label>#}
                                {#<select class="input-group-field" id="status-filter">#}
                                    {#<option value='All' selected>All</option>#}
                                    {#<option value='Pending Approval'>Pending Approval</option>#}
                                    {#<option value='Approved'>Approved</option>#}
                                    {#<option value='Rejected'>Rejected</option>#}
                                {#</select>#}
                            {#</div>#}
                        {#</div>#}
                        <div class="large-12 columns">
                            <div class="text-right">
                                {% if userData.type == 'Super Admin' or 'Admin Supplier New' in userData.accesses %}
                                    <a class="href-new-action" href="{{ path('supplier_form') }}">New Supplier</a>
                                {% endif %}
                            </div>
                        </div>
                    </div>

                    <table class="display responsive" id="supplier-datalist" width="100%">
                        <thead>
                        <tr>
                            <th>Code</th>
                            <th>Description</th>
                            {#<th>Status</th>#}
                            <th>Mobile No.</th>
                            <th>Phone No.</th>
                            <th>Email</th>
                            <th>Fax.</th>
                            <th>Tin #</th>
                            <th>Address</th>
                            <th>Action</th>
                        </tr>
                        </thead>
                        <tbody></tbody>
                    </table>
                </div>
            </div>
        </div>
    </div>
    <div class="reveal large" id="modal" data-reveal></div>
    {% include '@RxConnexion/Admin/js.html.twig' %}
    <script language="javascript">
        //<![CDATA[
        jQ(document).ready(function(){
            supplier.settings.ajaxUrl = '{{ path('supplier_ajax_list') }}';
            supplier.settings.status = '{{ status }}';
            supplier.settings.approvalFormUrl = '{{ path('supplier_approval_form') }}';
            {#supplier.settings.approvalSaveUrl = '{{ path('supplier_approval_save') }}';#}
            supplier.init();
        });
        //]]>
    </script>
{% endblock %}