{% 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">
                            {#<span>Referral Date</span>#}
                            <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>Branch</label>
                                    <select class="js-multiple" name="" id="branches" multiple="multiple" style="">
                                        {% for branches in branch %}
                                            <option value="{{ branches.id }}">{{ branches.description }}</option>
                                        {% endfor %}
                                    </select>
                                    {#<input type="text" id="form-branch" />#}
                                    <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>Clinician</label>
                                    <input type="text" id="form-provider-fullName" />
                                    <input type="hidden" id="form-provider-id" />
                                </div>
                                <div class="large-6 medium-6 small-12 columns">
                                    <label>Referring Affiliate</label>
                                    <input type="text" id="form-referring-affiliate" />
                                    <input type="hidden" id="form-referring-affiliate-id" />
                                </div>
                            </div>
                            <div class="row max-width-initial">
                                <div class="large-6 medium-6 small-12 columns">
                                    <label>Referring Physician</label>
                                    <input type="text" id="form-referring-physician" />
                                    <input type="hidden" id="form-referring-physician-id" />
                                </div>
                                <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>
                            <div class="row max-width-initial">
                                <div class="large-6 medium-6 small-12 columns">
                                    <label>Agent</label>
                                    <input type="text" id="form-agent-fullName" />
                                    <input type="hidden" id="form-agent-id" />
                                </div>
                            </div>
                        </div>
                    </div>
                    {%
                        include '@RxConnexion/Report/buttons.html.twig'
                        with {
                        'preview_url': 'main/report/referral/preview',
                        'export_to_pdf_url': 'main/report/referral/export_to_pdf',
                        'export_to_excel_url': 'main/report/referral/export_to_excel',
                        'paramsIds': 'date_from|date_to|form-company-id|form-branch-id|received_date_from|received_date_to|form-patient-id|form-provider-id|form-referring-affiliate-id|form-referring-physician-id|form-agent-id'
                    }
                    %}
                </div>
            </div>
        </div>
    </div>
    {% include '@RxConnexion/Admin/js.html.twig' %}
    <script language="javascript">
        //<![CDATA[
        referral.settings.company_autocompleteUrl = '{{ path('company_autocomplete') }}';
        referral.settings.branch_autocompleteUrl = '{{ path('health_facility_autocomplete') }}';
        referral.settings.patient_autocompleteUrl = '{{ path('patient_autocomplete') }}';
        referral.settings.provider_autocompleteUrl = '{{ path('provider_autocomplete') }}';
        referral.settings.referring_physician_autocompleteUrl = '{{ path('referring_provider_autocomplete') }}';
        referral.settings.referring_affiliate_autocompleteUrl = '{{ path('referring_health_facility_autocomplete') }}';
        referral.settings.salesAgent_autocompleteUrl = '{{ path('sales_agent_autocomplete') }}';
        jQ(document).ready(function(){
            jQ('.js-multiple, .js-multiple-company').select2();
            report.init('{{ app.environment }}');
            referral.init();
        });
        //]]>
    </script>
{% endblock %}