{% extends '@RxConnexion/Admin/content.html.twig' %}
{% block content %}

    <div class="row max-width-initial">
        <div class="small-12 columns">
            <div class="content-container">
                <div class="content-container-content">
                    <div class="row max-width-initial">
                        <div class="large-12 columns">
                            <div class="row max-width-initial">
                                <div class="large-6 medium-6 small-12 columns">
                                    <label>Date From</label>
                                    <input type="text" class="date" id="date_from" value="{{ 'now'|date('m/d/Y') }}" />
                                </div>
                                <div class="large-6 medium-6 small-12 columns">
                                    <label>Date To</label>
                                    <input type="text" class="date" id="date_to" value="{{ 'now'|date('m/d/Y') }}" />
                                </div>
                            </div>
                            <div class="row max-width-initial">
                                <div class="large-6 medium-6 small-12 columns">
                                    <label>Branch</label>
                                    <select class="js-multiple-branch" name="" id="branches" multiple="multiple" style="">
                                        {% for branches in branch %}
                                            <option value="{{ branches.id }}">{{ branches.description }}</option>
                                        {% endfor %}
                                    </select>
                                    <input type="hidden" id="form-branch-id" />
                                </div>
                                <div class="large-6 medium-6 small-12 columns">
                                    <label>Encounter Types</label>
                                    <select class="js-multiple-encounterType" name="" id="encounterType" multiple="multiple" style="">
                                        {% for encounterTypes in encounterType %}
                                            <option value="{{ encounterTypes.id }}">{{ encounterTypes.chartTypeDesc }}</option>
                                        {% endfor %}
                                    </select>
                                    <input type="hidden" id="form-encounterType-id" />
                                </div>
                            </div>
                            <div class="row max-width-initial">
                                <div class="large-6 medium-6 small-12 columns">
                                    <label>Clinician</label>
                                    <select class="js-multiple-clinician" name="" id="clinicians" multiple="multiple" style="">
                                        {% for clinicians in clinician %}
                                            <option value="{{ clinicians.id }}">{{ clinicians.providerName }}</option>
                                        {% endfor %}
                                    </select>
                                    <input type="hidden" id="form-clinician-id" />
                                </div>
                            </div>
                        </div>
                    </div>
                    {%
                        include '@RxConnexion/Report/buttons.html.twig'
                        with {
                        'preview_url': 'main/report/productivity_clinician/preview',
                        'export_to_pdf_url': 'main/report/productivity_clinician/export_to_pdf',
                        'export_to_excel_url': 'main/report/productivity_clinician/export_to_excel',
                        'paramsIds': 'date_from|date_to|form-branch-id|form-encounterType-id|form-clinician-id'
                    }
                    %}
                </div>
            </div>
        </div>
    </div>
    {% include '@RxConnexion/Admin/js.html.twig' %}
    <script language="javascript">
        //<![CDATA[
        jQ('.js-multiple-branch').select2({
            placeholder: "Select Branch"
        });
        jQ('.js-multiple-encounterType').select2({
            placeholder: "Select Encounter Type"
        });
        jQ('.js-multiple-clinician').select2({
            placeholder: "Select Clinician"
        });
        productivityClinician.settings.clinician_autocompleteUrl = '{{ path('provider_autocomplete') }}';
        productivityClinician.settings.branch_autocompleteUrl = '{{ path('health_facility_autocomplete') }}';
        productivityClinician.settings.examType_autocompleteUrl = '{{ path('chart_type_autocomplete') }}';

        jQ(document).ready(function(){
            report.init('{{ app.environment }}');
            productivityClinician.init();
        });
        //]]>
    </script>
{% endblock %}