<link rel="stylesheet" type="text/css" href="module/report/user-report/css/user-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>User 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.fromDate" 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.toDate" autocomplete="off" placeholder="End Date"
                                    data-isblockdate="true" ng-reportpickermin>
                                <button class="btn export_update" ng-click="chartData()">
                                    <p>Go</p>
                                </button> -->

                                
                            </div>
                        </div>
                        <div class="filter-area">
                                <input type="checkbox" class="check_cls" ng-model="formData.regtype" ng-true-value="0" ng-false-value="1" ng-click="selectStatus()"> 
                                <label class="lbl_font">Include Historical Data</label>  
                            <div class="download_export" ng-click="exportData()">
                                <img src="images/excel.png" alt="Export" title=" Export">
                                <span>Export Report</span>
                            </div>
                            <div class="inner-tab pull-left">
                                <!-- <div class="btn-pref btn-group btn-group-justified btn-group-lg" role="group" aria-label="...">
                                    <div class="btn-group" role="group" ng-repeat="pages in pageRedirect track by $index">
                                        <button type="button" id="stars" class="btn" ng-class="tabActive==pages ?'btn-primary':'btn-default'" ng-click="selectTab(pages,$index)"
                                            href="#tab{{$index}}" data-toggle="tab">
                                            <div class="hidden-xs">{{pages}}</div>
                                        </button>
                                    </div>
                                </div> -->
                            </div>
                            <div class="tab-content">
                                    <div class="tab-pane fade in "  ng-repeat="pages in pageRedirect track by $index" id="tab{{$index}}" ng-class="tabActive==pages ?'active':''">
                                        <div class="bottom_box">
                                            <div class="col-sm-12 table_box">
                                                <div class="table-fixed">
                                                    <table class="table table-striped">
                                                        <thead>
                                                            <tr class="row-name">
                                                                <th>S.No</th>
                                                                <th>Employee ID</th>
                                                                <th>Name</th>
                                                                <th>Email ID</th>
                                                                <th>Mobile</th>
                                                                <th>Dealer Code</th>
                                                                <th>Dealer Name</th>
                                                                <th>Dashboard Last Access</th>
                                                                <th>Learning Last Access</th>
                                                                <th>Assessment Last Access</th>
                                                                <th>Feedback Last Access</th>
    
                                                            </tr>
                                                            </thead>
                                                            <tbody>
                                                                <tr ng-if="userReport.length>0" class="row-content" ng-repeat="userList in userReport track by $index" >
                                                                    <td>{{itemsPerPage *(currentPage-1)+$index+1}}</td>
                                                                    <td>{{userList.smpin}}</td>
                                                                    <td>{{userList.fname}} {{userList.lname}}</td>
                                                                    <td>{{userList.emailid}}</td>
                                                                    <td>{{userList.mobileno}}</td>
                                                                    <td>{{userList.dealer_code}}</td>
                                                                    <td>{{userList.dealer_name}}</td>
                                                                    <td>{{userList.dashboard_last_access}}</td>
                                                                    <td>{{userList.learning_last_access}}</td>
                                                                    <td>{{userList.assessment_last_access}}</td>
                                                                    <td>{{userList.feedback_last_access}}</td>
                                                                </tr>
                                                            </tbody>
                                                            <div class="norecord" ng-if="userReport.length==0">
                                                                No Records Found
                                                            </div>
                                                    </table>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                        </div>
                        </div>
                <div class="container">
                        <div class="row">
                          <nav aria-label="Page navigation" id="div1">
                            <ul class="pagination pager" uib-pagination total-items="totalItems" ng-model="currentPage" ng-change="pageChanged()" max-size="maxSize"
                              boundary-links="true" rotate="false" num-pages="numPages" items-per-page="itemsPerPage"></ul>
                          </nav>
                        </div>
                      </div>
            </div>
        </div>
    </div>
</section>