completed_task_by_user.blade.php 5.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170
  1. @extends('layouts.master')
  2. @section('content')
  3. <!-- Main content -->
  4. <section class="content">
  5. <!-- Main row -->
  6. <div class="row">
  7. <div class="col-md-12">
  8. <form class="form-inline" action="{{url('admin/search_completed_task_by_user')}}" method="POST">
  9. {{ csrf_field() }}
  10. <div class="form-group">
  11. <input type="text" required="required" name="fromdate" class="form-control" id="fromdate" placeholder="From date">
  12. </div>
  13. <div class="form-group">
  14. <input type="text" required="required" name="todate" class="form-control" id="todate" placeholder="To date">
  15. </div>
  16. <div class="form-group">
  17. <select class="form-control" name="user_id">
  18. <option value="0">Select User</option>
  19. @foreach($users as $u)
  20. <option value="{{$u->id}}">{{$u->name}}</option>
  21. @endforeach
  22. </select>
  23. </div>
  24. <button type="submit" class="btn btn-success">Search</button>
  25. </form>
  26. <br>
  27. <section class="panel tasks-widget">
  28. <header class="panel-heading" style="height:40px;">
  29. <div class="pull-left">
  30. {{$title}}
  31. @if(!empty($user_name))
  32. OF
  33. <span class="txt-color">
  34. {{$user_name}}
  35. </span>
  36. Between ({{$fdate}} to {{$tdate}})
  37. @endif
  38. </div>
  39. </header>
  40. <div class="table-responsive project-list">
  41. <table class="table table-striped">
  42. <thead>
  43. <tr>
  44. <th colspan="2">
  45. Task Name
  46. </th>
  47. <th>
  48. Project Name
  49. </th>
  50. <th>
  51. Assign Time
  52. </th>
  53. <th>
  54. Start Time
  55. </th>
  56. <th>
  57. Closing Time
  58. </th>
  59. <th>
  60. Estimated Time
  61. </th>
  62. </tr>
  63. </thead>
  64. <tbody>
  65. @if(!empty($all))
  66. <?php $count=1; ?>
  67. @foreach($all as $info)
  68. <tr>
  69. <td>
  70. {{$count++}}
  71. </td>
  72. <td>
  73. {{$info->name}}
  74. </td>
  75. <td>
  76. {{$info->proj_name->name}}
  77. </td>
  78. <td>
  79. {{$info->assign_time}}
  80. </td>
  81. <td>
  82. {{$info->start_time}}
  83. </td>
  84. <td>
  85. {{$info->closing_time}}
  86. </td>
  87. <td>
  88. {{$info->estimated_time}}
  89. </td>
  90. </tr>
  91. @endforeach
  92. @endif
  93. </tbody>
  94. </table>
  95. <hr>
  96. </hr>
  97. </div>
  98. <div class="panel-body">
  99. <div class=" add-task-row">
  100. </div>
  101. <div class="table-foot">
  102. </div>
  103. </div>
  104. </section>
  105. </div>
  106. </div>
  107. </section>
  108. <!-- row end -->
  109. @endsection
  110. @section('script')
  111. <script type="text/javascript">
  112. $( function() {
  113. $( "#fromdate" ).datepicker({
  114. changeMonth: true,
  115. changeYear: true
  116. });
  117. $( "#fromdate" ).datepicker( "option", "dateFormat", "yy-mm-dd" );
  118. } );
  119. $( function() {
  120. $( "#todate" ).datepicker({
  121. changeMonth: true,
  122. changeYear: true
  123. });
  124. $( "#todate" ).datepicker( "option", "dateFormat", "yy-mm-dd" );
  125. } );
  126. jQuery(document).ready(function($)
  127. {
  128. $('.chk-active').click(function(event)
  129. {
  130. var id = $(this).val();
  131. var stat;
  132. if($(this).is(':checked'))
  133. {
  134. stat = 1;
  135. }
  136. else
  137. {
  138. stat = 0;
  139. }
  140. $.ajax({
  141. url: '{{url('admin/user_active')}}',
  142. type: 'POST',
  143. data: {id: id,stat: stat},
  144. })
  145. .done(function(data){
  146. alert(data);
  147. });
  148. });
  149. $('.change-pass').click(function(event) {
  150. var id = $(this).parent('.parent-action-cls').children('input').val();
  151. $('.change-pass-user-id').val(id);
  152. });
  153. });
  154. </script>
  155. @endsection