
<div class="container">
    <div class="row">
        <div class="col-md-8">
            <div ng-controller="listEmployeeLackController">
                <input class="search" ng-model="search" type="text" placeholder="Search" ng-change="currentPage =1">
                <h3>Danh Sách Thành viên thiếu TimeSheet</h3>
                <form>
                    <input type="text" ng-model="search" placeholder="Search" style="margin-bottom: 10px;"> <br>
                    <div ng-show="detail">
                        <div>
                            Số lần thiếu báo cáo: {{listEmployeeLackDetails.numberOflack}}
                        </div>
                        <div>
                            <table class="table table-bordered" id="" width="100%" cellspacing="0">
                                <tbody>
                                <tr>
                                    <th>Ngày thiếu:</th>
                                    <td data-ng-repeat="dt in listEmployeeLackDetails.timeSheetList" >{{dt.createdAt | date:"dd/MM/yyyy"}} </td>
                                </tr>
                                </tbody>
                            </table>
                        </div>
                    </div>

                    <div ng-show="inputDate">
                        <label for="startDate">Ngày Bắt Đầu</label>
                        <input type="date" ng-model="request.firstDate" id="startDate" class="form-control"
                               placeholder="điểm đầu" required="required" style="width: auto">
                        <label for="endDate">Ngày Kết Thúc</label>
                        <input type="date" ng-model="request.finalDate" id="endDate" class="form-control"
                               placeholder="điểm cuối" required="required" style="width: auto">
                    </div>
                    <div>
                        <a ng-click="listEmployeeLacks($stateParams.ID,request.firstDate, request.finalDate)" class="btn btn-primary btn-circle btn-sm" style="margin-bottom: 10px;" ng-show="show"> Hiển thị </a>
                        <a ng-click="cancelView()" class="btn btn-primary btn-circle btn-sm" style="margin-bottom: 10px;" ng-show="cancel"> Đóng </a>
                    </div>
                </form>
                <table class="table">
                    <thead>
                    <tr>
                        <th>STT</th>
                        <th>Ảnh</th>
                        <th>Username</th>
                        <th>Họ và tên</th>
                        <th>Địa chỉ email</th>
                        <th>SDT</th>
                        <th>Menu</th>
                    </tr>
                    </thead>
                    <tbody>
                    <tr  data-ng-repeat="emp in listEmployee|filter:search">
                        <td>{{$index+1}}</td>
                        <td>{{emp.picture}}</td>
                        <td>{{emp.firstName+" "+emp.lastName}}</td>
                        <td>{{emp.emailAddress}}</td>
                        <td>{{emp.emailAddress}}</td>
                        <td>{{emp.phoneNumber}}</td>
                        <td><a ng-click="listEmployeeLackDetail(emp.id)" class="btn btn-info btn-circle btn-sm">Xem </a></td>
                    </tr>
                    </tbody>
                </table>
                <div><a ng-click="history.go(-1);" class="btn btn-primary btn-circle btn-sm" style="margin-bottom: 10px;" > Trở Về</a></div>

                <uib-pagination total-items="getTotalItems()" boundary-link-numbers="true" ng-model="currentPage"
                                ng-change="pageChangedIndex()" rotate="true"
                                items-per-page="employeePerPage"></uib-pagination>
            </div>
        </div>
    </div>

</div>
