{% 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 Type</label>
                                    <select class="js-multiple-encounter-type" name="" id="encounterTypes" multiple="multiple" style="">
                                        <option value="null">All</option>
                                        {% for encounterType in chartType  %}
                                            <option value="{{ encounterType.id }}">{{ encounterType.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>Encounter Status</label>
                                    <select id="encounter-status">
                                        <option value="null">All</option>
                                        {% for encounterStatus in chartStatus  %}
                                            <option value="{{ encounterStatus.status }}">{{ encounterStatus.status }}</option>
                                        {% endfor %}
                                    </select>
                                </div>
                                <div class="large-6 medium-6 small-12 columns">
                                    <label>Referring Affiliate</label>
                                    <select class="js-multiple-referring-affiliate" name="" id="referring-affiliates" multiple="multiple" style="">
                                        <option value="null">All</option>
                                        {% for referringAffiliate in referringAffiliates %}
                                            <option value="{{ referringAffiliate.id }}">{{ referringAffiliate.description }}</option>
                                        {% endfor %}
                                    </select>
                                    <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>
                                    <select class="js-multiple-referring-physician" name="" id="referring-physician" multiple="multiple" style="">
                                        <option value="null">All</option>
                                        {% for referringPhysician in referringPhysicians %}
                                            <option value="{{ referringPhysician.id }}">{{ referringPhysician.full_name }}</option>
                                        {% endfor %}
                                    </select>
                                    <input type="hidden" id="form-referring-physician-id" />
                                </div>
                            </div>
                        </div>
                    </div>
                    {%
                        include '@RxConnexion/Report/buttons.html.twig'
                        with {
                        'preview_url': 'main/report/marketing_cycle/preview',
                        'export_to_pdf_url': 'main/report/marketing_cycle/export_to_pdf',
                        'export_to_excel_url': 'main/report/marketing_cycle/export_to_excel',
                        'paramsIds': 'date_from|date_to|form-branch-id|form-marketingStaff-id|form-encounterType-id|encounter-status|form-referring-affiliate-id|form-referring-physician-id'
                    }
                    %}
                </div>
            </div>
        </div>
    </div>
    {% include '@RxConnexion/Admin/js.html.twig' %}
    <script language="javascript">
        //<![CDATA[
        jQ('.js-multiple-branch, .js-multiple-company, .js-multiple-encounter-type, .js-multiple-referring-affiliate, .js-multiple-physician').select2();
        marketingEncounter.settings.encounter_autocompleteUrl = '{{ path('chart_type_autocomplete') }}';
        jQ(document).ready(function(){
            report.init('{{ app.environment }}');
            marketingEncounter.init();
        });
        //]]>
    </script>
{% endblock %}