list.blade.php 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266
  1. @extends('layouts.master')
  2. @section('content')
  3. <style type="text/css">
  4. .cls-overflow{
  5. height: 800px;
  6. overflow: scroll;
  7. }
  8. .cls-overflow-one{
  9. height: 400px;
  10. overflow: scroll;
  11. }
  12. </style>
  13. <!-- Main content -->
  14. <section class="content">
  15. <!-- Main row -->
  16. <div class="row">
  17. <div class="col-md-12">
  18. <section class="panel tasks-widget">
  19. <header class="panel-heading" style="height:40px;">
  20. <div class="pull-left">
  21. {{$title}}
  22. </div>
  23. <div>
  24. <a href="{{url('admin/attendace_report')}}" class="btn btn-success btn-xs pull-right" style="margin-left: 2%">Attendance Report</a>
  25. <button class="btn btn-success btn-xs pull-right" data-toggle="modal" data-target="#attendace">Add Attendance Sheet</button>
  26. </div>
  27. </header>
  28. @if (session('status'))
  29. <div class="alert alert-success">
  30. {{ session('status') }}
  31. </div>
  32. @endif
  33. <div class="row">
  34. <div class="col-md-12">
  35. <div class="col-md-6">
  36. <header class="" style="height:40px;">
  37. <div class="text-center">
  38. <span style="font-weight: bolder;font-size: 20px">Attendance of: {{ date('d/m/Y')}}</span>
  39. </div>
  40. </header>
  41. <div class="table-responsive cls-overflow-one">
  42. <table class="table table-striped table-hover">
  43. <thead>
  44. <tr>
  45. <th class="text-center">
  46. User Name
  47. </th>
  48. <th class="text-center">
  49. Entry Time
  50. </th>
  51. </tr>
  52. </thead>
  53. <tbody>
  54. @if(!empty($entry_time))
  55. @foreach($entry_time as $entry)
  56. <tr>
  57. <td class="text-center">
  58. <span style="font-size:12px">
  59. @if($entry['absent_count'] == 0)
  60. {{ $entry['user_name'] }}
  61. @endif
  62. </span>
  63. </td>
  64. <td class="text-center">
  65. <span style="font-size:12px">
  66. <?php
  67. $a=strtotime('today 9:30 am');
  68. $c=date('Y-m-d H:i:s', $a);
  69. $exact_time= $a;
  70. $timestamp = date('Y-m-d H:i:s',strtotime('today midnight'));
  71. if($c < date('Y-m-d H:i:s',strtotime($entry['attendance_time'])))
  72. {
  73. echo '<span class="text-center" style="color:red;font-weight:bolder;font-size:12px">'.date('H:i:s A',strtotime($entry['attendance_time'])).'</span>';
  74. }
  75. else if($entry['absent_count'] == 1 )
  76. {
  77. }
  78. else
  79. {
  80. echo '<span class="text-center" style="color:green;font-weight:bolder;font-size:12px">'.date('H:i:s A',strtotime($entry['attendance_time'])) .'</span>';
  81. }
  82. ?>
  83. </span>
  84. </td>
  85. </tr>
  86. @endforeach
  87. @endif
  88. </tbody>
  89. </table>
  90. <hr>
  91. </hr>
  92. <header class="" style="height:40px;">
  93. <div class="text-center">
  94. <span style="font-weight: bolder;font-size: 20px">Checkout Time of: {{ date('d/m/Y',strtotime('yesterday'))}}</span>
  95. </div>
  96. </header>
  97. <table class="table table-striped table-hover">
  98. <thead>
  99. <tr>
  100. <th class="text-center">
  101. User Name
  102. </th>
  103. <th class="text-center">
  104. Exit Time
  105. </th>
  106. </tr>
  107. </thead>
  108. <tbody>
  109. @if(!empty($exit_time))
  110. @foreach($exit_time as $entry)
  111. <tr >
  112. <td class="text-center">
  113. <span style="font-size:12px">
  114. {{ $entry['user_name'] }}
  115. </span>
  116. </td>
  117. <td class="text-center">
  118. <span style="font-size:12px">
  119. {{ date('h:i:s A',strtotime($entry['attendance_time'])) }}
  120. </span>
  121. </td>
  122. </tr>
  123. @endforeach
  124. @endif
  125. </tbody>
  126. </table>
  127. </div>
  128. </div>
  129. <div class="col-md-6">
  130. <div class="table-responsive project-list cls-overflow-one">
  131. <header class="" style="height:40px;">
  132. <div class="text-center">
  133. <span style="font-weight: bolder;font-size: 20px">Summery : <span style="text-transform: uppercase;">{{ date('F'),time()}}</span></span>
  134. </div>
  135. </header>
  136. <table class="table table-striped table-hover">
  137. <thead>
  138. <tr>
  139. <th class="text-center">
  140. User Name
  141. </th>
  142. <th class="text-center">
  143. Late Count
  144. </th>
  145. <th class="text-center">
  146. Absent Count
  147. </th>
  148. </tr>
  149. </thead>
  150. <tbody>
  151. @if(!empty($late_array))
  152. @foreach($late_array as $late)
  153. <tr>
  154. <td class="text-center">
  155. <span style="font-size:12px">
  156. {{ $late['user_name'] }}
  157. </span>
  158. </td>
  159. <td class="text-center">
  160. <span style="font-size:12px;margin-left: 10%;">
  161. <span class="badge" style="color:red;background:rgba(221, 221, 226, 0.84)">{{ $late['late_count'] }}</span>
  162. </span>
  163. </td>
  164. <td class="text-center">
  165. <span style="font-size:12px;margin-left: 10%;">
  166. <span class="badge" style="color:red;background:rgba(221, 221, 226, 0.84)">{{ $late['absent_count'] }}</span>
  167. </span>
  168. </td>
  169. </tr>
  170. @endforeach
  171. @endif
  172. </tbody>
  173. </table>
  174. <hr>
  175. </hr>
  176. </div>
  177. </div>
  178. </div>
  179. </div>
  180. <div class="panel-body">
  181. <div class=" add-task-row">
  182. </div>
  183. <div class="table-foot">
  184. </div>
  185. </div>
  186. </section>
  187. </div>
  188. </div>
  189. </section>
  190. <!-- row end -->
  191. <!-- /.content -->
  192. <!-- Modal Add User -->
  193. <div class="modal fade" id="attendace" tabindex="-1" role="dialog" aria-labelledby="gridSystemModalLabel">
  194. <div class="modal-dialog" role="document">
  195. <div class="modal-content">
  196. <div class="modal-header">
  197. <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
  198. <h4 class="modal-title" id="gridSystemModalLabel">Add Attendace Sheet</h4>
  199. </div>
  200. <div class="modal-body">
  201. <form action="{{url('admin/attendace_sheet_entry')}}" enctype="multipart/form-data" method="POST">
  202. {{ csrf_field() }}
  203. <div class="form-group">
  204. <label for="exampleInputPassword1">Attendace Sheet(csv format)*</label>
  205. <input type="file" name="import_file" class="form-control" placeholder="Upload File" required="">
  206. </div>
  207. </div>
  208. <div class="modal-footer">
  209. <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
  210. <button type="submit" class="btn btn-primary">Submit</button>
  211. </div>
  212. </form>
  213. </div><!-- /.modal-content -->
  214. </div><!-- /.modal-dialog -->
  215. </div>
  216. @endsection
  217. @section('script')
  218. <script type="text/javascript">
  219. jQuery(document).ready(function($)
  220. {
  221. $('.chk-active').click(function(event)
  222. {
  223. var id = $(this).val();
  224. var stat;
  225. if($(this).is(':checked'))
  226. {
  227. stat = 1;
  228. }
  229. else
  230. {
  231. stat = 0;
  232. }
  233. $.ajax({
  234. url: '{{url('admin/user_active')}}',
  235. type: 'POST',
  236. data: {id: id,stat: stat},
  237. })
  238. .done(function(data){
  239. //alert(data);
  240. });
  241. });
  242. });
  243. </script>
  244. @endsection