<link rel="stylesheet" type="text/css" href="module/redeem/css/redeem.css" />
<section class="user_page container">
    <div class="sales_report">
        <div class="sales_report_in">
            <div class="sales_card">
                <!---ADD / EDIT FORM -------->
                <!-- <div class="profile_bg" >
                
                <div class="container-fluid form_bg form-scroll"  >
                        <div class="row bottom_box">
                                <form class="row form_2" ng-submit="surveySubmit()" novalidate>
                                <div class="col-sm-12 table_box">
                                    <div class="table-fixed">
                                        <table class="table table-fixed">
                                            <thead >
                                                <tr class="row-name">
                                                    <th class="col-xs-2">Action</th>
                                                    <th class="col-xs-4"> Name</th>
                                                    <th class="col-xs-2">Employee ID</th>
                                                    <th class="col-xs-2">Redeem Points</th>
                                                    <th class="col-xs-2">Amount</th>
                                                   
                                                </tr>
                                            </thead>
                                            <tbody >
                                                <tr ng-repeat="item in itemdetail">
                                                    <td class="col-xs-2"><input type="hidden" class="checkcls" ng-model="formData.questionList[item.id]" value="{{item.id}}">
                                                        <input type="checkbox" class="checkcls" ng-model="formData.questionList[item.id]" ng-change="quesChange(item,$index)" style='margin:auto'> </td>
                                                    <td class="col-xs-4">{{item.fname}}</td>
                                                    <td class="col-xs-2">{{item.smpin}}</td>
                                                    <td class="col-xs-2">{{item.points}}</td>
                                                    <td class="col-xs-2">{{item.amount}}</td>
                                                    
                                                </tr>
                                            </tbody>
                                        </table>
                                        <div class="col-sm-12 text-center ">
                                                <button type="button" class="btn primary fixed" ng-click="closeForm()">Cancel</button>
                                                <button type="submit" class="btn primary fixed">Submit</button>
                                            </div>
                                    </div>
                                </div>
                                </form>
                            </div>
                </div>
            </div> -->
                <div class="container-fluid table_area">
                    <div class="row">
                        <ul class="nav nav-tabs">
                            <li ng-click="listClick(obj)" ng-class="{active:obj.name == sideselect.name}" ng-repeat="obj in submenu track by $index">
                                <a data-toggle="tab" data-target="#menu{{$index}}" class="ptr clsusersidemenu_{{$index}}">{{obj.name}}</a>
                            </li>
                        </ul>
                    </div>
                    <div class="row top_box">
                        <div class="left_box">
                            <div class="input-group mb-3">
                            </div>
                        </div>
                        <div class="right_box">
                            <div class="sear">
                                <form class="row form_2">
                                    <div class="form-group col-sm-12 disable">
                                        <input type="search" ng-change="onSearchChange()" class="form-control" ng-model="formData.mymodel" name="Search" placeholder="Search"
                                            autocomplete="off" required>
                                    </div>
                                </form>
                            </div>
                            <div class="pull-right" ng-if="sideselect.id != 2">
                                <button type="submit" class="btn_approve btn primary fixed" ng-disabled="!showButton" ng-click="sendConfirmation()">Approve</button>
                                <!-- <button type="submit" class="btn primary fixed" ng-click="sendConfirmation()">Approve</button> -->
                            </div>
                        </div>
                    </div>
                    <div class="row bottom_box">
                        <div class="col-sm-12 table_box">
                            <div class="table-fixed">
                                <table class="table table-fixed">
                                    <thead ng-if="sideselect.id == 1">
                                        <tr class="row-name">
                                            <th class="col-xs-2">
                                                <input type="checkbox" ng-click="toggleSelect()" value="isAllSelected" ng-model="isAllSelected"/> Select All </th>
                                            <th class="col-xs-4"> Name</th>
                                            <th class="col-xs-2">Employee ID</th>
                                            <th class="col-xs-2">Redeem Points</th>
                                            <th class="col-xs-2">Amount</th>
                                        </tr>
                                    </thead>
                                    <tbody ng-if="sideselect.id == 1 && itemdetail.length>0">
                                        <tr ng-repeat="item in itemdetail">
                                            <td class="col-xs-2">
                                                <input type="checkbox" value="{{item.id}}" ng-click="childSelect(item.id)" ng-model="item.selected" style="margin:0"> </td>
                                            <td class="col-xs-4">{{item.fname}}</td>
                                            <td class="col-xs-2">{{item.smpin}}</td>
                                            <td class="col-xs-2">{{item.points}}</td>
                                            <td class="col-xs-2">{{item.amount}}</td>
                                        </tr>
                                    </tbody>
                                    <div ng-if="sideselect.id == 1 && itemdetail.length==0">

                                        No Records Found
                                    </div>
                                    <thead ng-if="sideselect.id == 2">
                                        <tr class="row-name">
                                            <th class="col-xs-3"> Name</th>
                                            <th class="col-xs-3">SMPIN</th>
                                            <th class="col-xs-3">Redeem Points</th>
                                            <th class="col-xs-3">Amount</th>
                                        </tr>
                                    </thead>
                                    <tbody ng-if="sideselect.id == 2 && approvedListDetail.length>0">
                                        <tr ng-repeat="item in approvedListDetail">
                                            <td class="col-xs-3">{{item.fname}}</td>
                                            <td class="col-xs-3">{{item.smpin}}</td>
                                            <td class="col-xs-3">{{item.points}}</td>
                                            <td class="col-xs-3">{{item.amount}}</td>
                                        </tr>
                                    </tbody>

                                </table>
                                <div class="text-center" ng-if="sideselect.id == 1 && itemdetail.length==0">
                                    No Records Found
                                </div>
                                <div class="text-center" ng-if="sideselect.id == 2 && approvedListDetail.length==0">
                                    No Records Found
                                </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>