<link rel="stylesheet" type="text/css" href="module/report/attrition-report/css/attrition-report.css" />
<section class="user_page container">
    <div class="sales_report">
        <div class="sales_report_in">
            <div class="sales_card">
                <div class="container-fluid table_area">
                        <div class="page-head">
                                <p>ATTRITION REPORT</p>
                            </div>
                        <div class="main_dropdown">
                            <div class="zmdropdown">
                                <label>Zonal Manager</label>
                                <select ng-model="formData.zm_email" ng-change='zmChange()'>
                                    <option value="all">All</option>
                                    <option ng-repeat="zm in zmuser_list" value="{{zm.email}}">{{zm.name}}</option>
                                </select>
                            </div>
                            <div class="rmdropdown" ng-if="!rmInactive">
                                <label>Regional Manager</label>
                                <select ng-model="formData.rm_email" ng-class="rmInactive ?'disabled':''" ng-change='rmChange()'>
                                    <option value="all">All</option>
                                    <option ng-repeat="rm in rmuser_list" value="{{rm.email}}">{{rm.name}}</option>
                                </select>
                            </div>
                            <div class="amdropdown" ng-if="!amInactive">
                                <label>Area Manager</label>
                                <select ng-model="formData.am_email" ng-class="amInactive ?'disabled':''" ng-change='amChange()'>
                                    <option value="all">All</option>
                                    <option ng-repeat="am in amuser_list" value="{{am.email}}">{{am.name}}</option>
                                </select>
                            </div>
                        </div>
                        <div class="date_align">
                            <div class="data_class">
                            <label>From Date</label>
                            <input type="text" id="fromdate" class="datepicker" name="fromdate" ng-model="formData.from_date" autocomplete="off" placeholder="Start Date"
                                data-isblockdate="true" ng-reportpickermin>
                            <label>To Date</label>
                            <input type="text" id="todate" class="datepicker" name="todate" ng-model="formData.to_date" autocomplete="off" placeholder="End Date"
                                data-isblockdate="true" ng-reportpickermin>
                            <button class="btn export_update" ng-click="chartData()" ng-if="formData.from_date!='' && formData.to_date!=''">
                                <p>Go</p>
                            </button>
                            <button class="btn export_update opacity" ng-if="formData.from_date=='' || formData.to_date==''"  >
                                    <p>Go</p>
                            </button>

                            <div class="download_export" ng-click="exportData()">
                                <img src="images/excel.png" alt="Export" title=" Export">
                                <span>Export Report</span>
                            </div>
                        </div>
                        </div>
                        <div class="filter-area">
                            <div class="inner-container">
                                <canvas id="salesChart" width="900" height="450"></canvas>
                            </div>
                            <div class="box_chart">
                                <h4>Total Attrition</h4>
                                <h2>{{totalValue}}</h2>
                                <!-- <p>From {{formData.from_date}} to {{formData.to_date}}</p> -->
                            </div>
                        </div>
                </div>
            </div>
        </div>
    </div>
</section>