{% extends '@RxConnexion/Admin/content.html.twig' %}
{% block content %}
    <div class="row max-width-initial">
        <div class="small-12 columns">
            <div class="row">
                <div class="columns small-4">
                    <label for="status">Status</label>
                    <select name="status" id="status">
                        <option value="">All</option>
                        <option value="Active" selected>Active</option>
                        <option value="Inactive">Inactive</option>
                    </select>
                </div>
                <div class="columns small-4">
                    <label for="status">Non Inventory</label>
                    <select name="non_inventory" id="non_inventory">
                        <option value="" selected>All</option>
                        <option value="1">Yes</option>
                        <option value="0">No</option>
                    </select>
                </div>
            </div>
            <div class="content-container has-loading">
                <div class="content-container-content hide">
                    <div class="text-right">
                        {% if userData.type == 'Super Admin' or 'Admin Items New' in userData.accesses %}
                            <a class="href-new-action" href="{{ path('item_form') }}">New Item</a>
                        {% endif %}
                        {% if userData.type == 'Super Admin' %}
                            | <a class="href-new-action" href="{{ path('item_export_to_excel') }}">Export to Excel</a>
                        {% endif %}
                    </div>
                    <table class="display responsive" id="item-datalist" width="100%">
                        <thead>
                        <tr>
                            <th>Supplier</th>
                            <th>Category</th>
                            <th>Subcategory</th>
                            <th>Company</th>
                            <th>Code</th>
                            <th>Type</th>
                            <th>Description</th>
                            <th>Start Date</th>
                            <th>End Date</th>
                            <th>Action</th>
                        </tr>
                        </thead>
                        <tbody></tbody>
                    </table>
                </div>
            </div>
        </div>
    </div>
    {% include '@RxConnexion/Admin/js.html.twig' %}
    <script language="javascript">
        //<![CDATA[
        item.settings.ajaxUrl = '{{ path('item_ajax_list') }}';
        jQ(document).ready(function(){
            item.init();
        });
        //]]>
    </script>
{% endblock %}