<div class="content-wrapper">
    <section class="content-header">
        <div class="container-fluid">
            <div class="row mb-2">
                <div class="col-sm-6">
                    <h1 class="text-indigo">
                        <go-back/>
                        <i class="fas fa-envelope"></i> Appreciations List ({{appreciations.length}})
                    </h1>
                </div>
                <div class="col-sm-6">
                    <ol class="breadcrumb float-sm-right">
                        <li class="breadcrumb-item"><a ng-href="{{baseurl}}/dashboard">Home</a></li>
                        <li class="breadcrumb-item active">Appreciations</li>
                    </ol>
                </div>
            </div>
        </div><!-- /.container-fluid -->
    </section>
    <section class="content">
        <div class="container-fluid">
            <div class="row">
                <div class="col-md-12">
                    <div class="card card-indigo card-outline">
                        <div class="card-header border-transparent">
                            <h3 class="card-title">&nbsp;</h3>
                            <div class="card-tools">
                                <div class="btn-group">
                                    <!--<button ng-click="goTo($event,'ClientAppreciationsAdd')" type="button" class="btn bg-indigo"><i class="fas fa-plus"></i> <span class="d-none d-lg-inline-block">Create Appreciation</span></button>-->
                                    <button type="button" title="Fullscreen Toggle" class="btn btn-dark toggle-fullscreen"><i class="fas fa-expand"></i></button>
                                    <button type="button" class="btn btn-dark" data-widget="collapse"><i class="fas fa-minus"></i></button>
                                </div>
                            </div>
                        </div>
                        <div class="card-body p-0">
                            <div class="table table-responsive">
                                <table id="appreciationList" class="table table-bordered table-striped">
                                    <thead>
                                    <tr>
                                        <th>Hero Name</th>
                                        <th>Project Name</th>
                                        <th>Emp Code</th>
                                        <th>Line Manager</th>
										<th>Appreciation Date</th>
										<th>Appreciated by</th>
                                        <th style="width: 20%;">Team Memebers</th>
										<th>Screenshot</th>
										<th>Notes</th>
										<th>Validated (Yes / No)</th>
                                        <!--<th>Actions</th>-->
                                    </tr>
                                    </thead>
                                    <tbody>
                                    <tr ng-repeat="appreciation in appreciations">
                                        <td><span class="nowrap">{{appreciation.emp_first_name +' '+appreciation.emp_last_name | capitalize}}</span></td>
                                        <td><span class="nowrap">{{appreciation.project_name | capitalize}}</span></td>
                                        <td><span class="nowrap">{{appreciation.emp_code}}</span></td>
                                        <td><span class="nowrap">{{appreciation.lm_fn + ' ' + appreciation.lm_ln}}</span></td>
										<td><span class="nowrap">{{appreciation.apricated_on | datetz:'DD-MMM-YY'}}</span></td>
										<td><span class="nowrap">{{appreciation.apricated_by | capitalize}}</span></td>
                                        <td><span>{{appreciation.team_members_name | capitalize}}</span></td>
										<td>
                                            <!--<div><a target="_blank" href="{{baseurl}}/app/uploads/ClientAppreciations/{{appreciation.screenshot}}">View Image</a></div>-->
											<div><a href="#" ng-click="viewImgModel(appreciation)">View Image</a></div>
                                        </td>
										<td><span class="">{{appreciation.notes | capitalize}}</span></td>
										<td><span class="badge badge-success" ng-if="appreciation.verified=='1'">Validated</span>
										<a href="#" class="badge badge-danger" ng-if="appreciation.verified=='0'" ng-click="updateCaModel(appreciation)" >Validate</a></td>                                   
                                    </tr>
                                    </tbody>
                                </table>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </section>
    <script type="text/ng-template" id="UpdateCa.html">
        <div class="">
            <div class="modal-header bg-info">
                <h4 class="modal-title" id="modal-title">Validate Appreciation</h4>
            </div>
	
           <!-- <div class="modal-body" id="modal-body"><p>Are you sure to delete this tip</p></div>-->
            <div class="modal-footer bg-info">
                <button class="btn btn-default" type="button" ng-click="ok()">Yes</button>
                <button class="btn btn-primary" type="button" ng-click="cancel()">No</button>
            </div>
        </div>
    </script>
</div>

    <script type="text/ng-template" id="Viewimg.html">
      <div class="">    
		 <div class="modal-body" id="modal-body" ng-repeat="a in appreciation">
			<a href="#" ng-if="a.screenshot">   
			<img alt="{{a.screenshot}}" ng-src="{{baseurl}}/app/uploads/ClientAppreciations/{{a.screenshot}}" style="width:770px;height:480px;" />
			</a>
			<span ng-if="a.screenshot==''">No Image<span>
         </div>
         <div class="modal-footer">
            <button class="btn btn-default" type="button" ng-click="cancel()">Close</button>
         </div>
      </div>
    </script>

<!-- view image Modal -->
<!--<div id="viewimg" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
 <div class="modal-dialog">
    <div class="modal-content">
      <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;  </button>
      </div>
      <div class="modal-body" ng-repeat="appreciation in appreciations">
        <p><img alt="{{appreciation.screenshot}}" ng-src="{{baseurl}}/app/uploads/ClientAppreciations/{{appreciation.screenshot}}" style="width:400px" />
		  </p>
      </div>
      <div class="modal-footer">
        <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
      </div>
    </div>
  </div>
</div>-->
