{% 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">Status</label>
                                <select class="input-group-field" id="materialRequisitionFilter-status">
                                    <option value="all">All</option>
                                    <option {{ status is null or status == 'Active' ? 'selected' : '' }} value="Active">Active</option>
                                    <option {{ status == 'Closed' ? 'selected' : '' }} value="Closed">Closed</option>
                                </select>
                            </div>
                        </div>
                        {#<div class="large-7 columns">
                            {%
                            include 'RxConnexionBundle:MaterialRequisition:buttons.html.twig'
                            with {
                            'preview_url': 'admin/material_requisition/preview',
                            'export_to_pdf_url': '',
                            'export_to_excel_url': '',
                            'paramsIds': 'materialRequisitionFilter-status'
                            }
                            %}
                        </div>#}
                    </div>
                    <div class="row max-width-initial">
                        <div class="large-12 columns">
                            <div class="float-right">
                                {% if userData.type == 'Super Admin' or 'Admin Material Requisition New' in userData.accesses %}
                                    <label class="middle text-right"><a class="href-new-action" href="{{ path('material_requisition_form') }}">New Order Supplies</a></label>
                                {% endif %}
                            </div>
                        </div>
                    </div>
                    <table class="display responsive" id="materialRequisition-datalist" width="100%">
                        <thead>
                        <tr>
                            <th>Control No.</th>
                            {#<th>Reference No.</th>
                            <th>Title</th>#}
                            <th>Request Date</th>
                            <th>Branch</th>
                            {#<th>Department</th>#}
                            <th>Purpose</th>
                            {#<th>Specific Purpose</th>#}
                            <th>Requested By</th>
                            {#<th>Status</th>#}
                            <th>No. of Items</th>
                            {#<th>Quantity Added</th>#}
                            <th>Action</th>
                        </tr>
                        </thead>
                        <tbody></tbody>
                    </table>
                </div>
            </div>
        </div>
    </div>
    {% include '@RxConnexion/Admin/js.html.twig' %}
    <script language="javascript">
        //<![CDATA[
        jQ(document).ready(function(){
            report.init('{{ app.environment }}');
            materialRequisition.settings.ajaxUrl = '{{ path('material_requisition_ajax_list') }}';
            materialRequisition.init();
        });
        //]]>
    </script>
{% endblock %}