{% 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="" />
                                </div>
                                <div class="large-6 medium-6 small-12 columns">
                                    <label>Date To</label>
                                    <input type="text" class="date" id="date_to" value="" />
                                </div>
                            </div>
                            <div class="row max-width-initial">
                                <div class="large-6 medium-6 small-12 columns">
                                    <label>Received Date From</label>
                                    <input type="text" class="date" id="received_date_from" value="" />
                                </div>
                                <div class="large-6 medium-6 small-12 columns">
                                    <label>Received Date To</label>
                                    <input type="text" class="date" id="received_date_to" value="" />
                                </div>
                            </div>
                            <div class="row max-width-initial">
                                <div class="large-6 medium-6 small-12 columns">
                                    <label>Company</label>
                                    <select class="js-multiple-company" name="" id="companies" multiple="multiple" style="">
                                        {% for companies in company %}
                                            <option value="{{ companies.id }}">{{ companies.description }}</option>
                                        {% endfor %}
                                    </select>
                                    <input type="hidden" id="form-company-id" />
                                </div>
                                <div class="large-6 medium-6 small-12 columns">
                                    <label>Referring 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>
                            <div class="row max-width-initial">
                                <div class="large-6 medium-6 small-12 columns">
                                    <label>Servicing Branch</label>
                                    <select class="js-multiple-servicing-branch" name="" id="servicing-branches" multiple="multiple" style="">
                                        {% for branches in branch %}
                                            <option value="{{ branches.id }}">{{ branches.description }}</option>
                                        {% endfor %}
                                    </select>
                                    <input type="hidden" id="form-servicing-branch-id" />
                                </div>
                                <div class="large-6 medium-6 small-12 columns">
                                    <label>Services</label>
                                    <select class="js-multiple-service" name="" id="services" multiple="multiple" style="">
                                        {% for service in services %}
                                            <option value="{{ service.id }}">{{ service.description }}</option>
                                        {% endfor %}
                                    </select>
                                    <input type="hidden" id="form-service-id" />
                                </div>
                            </div>
                            <div class="row max-width-initial">
                                <div class="large-6 medium-6 small-12 columns">
                                    <label>Patient</label>
                                    <input type="text" id="form-patient-fullName" />
                                    <input type="hidden" id="form-patient-id" />
                                </div>
                                <div class="large-6 medium-6 small-12 columns">
                                    <label>Specialist</label>
                                    <input type="text" id="form-specialist-fullName" />
                                    <input type="hidden" id="form-specialist-id" />
                                </div>
                            </div>
                            <div class="row max-width-initial">
                                <div class="large-6 medium-6 small-12 columns">
                                    <label>Type</label>
                                    <select name="" id="form-type-id">
                                        <option value="All" selected>All</option>
                                        <option value="Specialist">Specialist</option>
                                        <option value="Others">Others</option>
                                    </select>
                                </div>
                            </div>
                        </div>
                    </div>
                    {%
                        include '@RxConnexion/Report/buttons.html.twig'
                        with {
                        'preview_url': 'main/report/specialist_referral_tracker/preview',
                        'export_to_pdf_url': 'main/report/specialist_referral_tracker/export_to_pdf',
                        'export_to_excel_url': 'main/report/specialist_referral_tracker/export_to_excel',
                        'paramsIds': 'date_from|date_to|received_date_from|received_date_to|form-company-id|form-branch-id|form-servicing-branch-id|form-service-id|form-patient-id|form-specialist-id|form-type-id'
                    }
                    %}
                </div>
            </div>
        </div>
    </div>
    {% include '@RxConnexion/Admin/js.html.twig' %}
    <script language="javascript">
        //<![CDATA[
        jQ('.js-multiple-company, .js-multiple-branch, .js-multiple-servicing-branch, .js-multiple-service').select2();

        specialistReferralTracker.settings.company_autocompleteUrl = '{{ path('company_autocomplete') }}';
        specialistReferralTracker.settings.patient_autocompleteUrl = '{{ path('patient_autocomplete') }}';
        specialistReferralTracker.settings.specialist_autocompleteUrl = '{{ path('specialist_autocomplete') }}';
        specialistReferralTracker.settings.health_facility_autocomplete_url = '{{ path('health_facility_autocomplete') }}';
        //specialistReferralTracker.settings.service_autocomplete_url = '{{ path('service_autocomplete') }}';
        jQ(document).ready(function(){
            report.init('{{ app.environment }}');
            specialistReferralTracker.init();
        });
        //]]>
    </script>
{% endblock %}