load_application.blade.php 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220
  1. @if(count($students) >0)
  2. <div class="col-md-12 bg-white" style="padding:10px; height:500px;">
  3. <!-- <h4 class="text-info"></h4> -->
  4. <div class="table-responsive">
  5. <table class="table table-bordered list_table">
  6. <thead>
  7. <tr>
  8. <th>Sl</th>
  9. <th>Student Information</th>
  10. <th>Education</th>
  11. <th class="text-center">English Test</th>
  12. <th class="text-center">Others</th>
  13. <th>Proposal Summary</th>
  14. <th class="text-center">Status</th>
  15. </tr>
  16. </thead>
  17. <tbody>
  18. @foreach($students as $key=>$row)
  19. <tr>
  20. <td style="font-size: 11px;">{{$key+1}}</td>
  21. <td style="width: 20%;">
  22. <div style="display:flex;">
  23. @if($row->student_details->nationality)
  24. <img class="img-responsive listFlag mt-2" style="border-radius: 2px; padding: 0px;height: 35px; width: 35px;" src="{{ asset('/assets/img/flags/4x3').'/'.strtolower(cn($row,'student_details.country_name.iso_3166_2','')).'.svg' }}" alt="Flag" data-toggle="tooltip" title="" data-placement="top">
  25. @endif
  26. <div class="alert" style="background-color:white; padding: 3px 7px; margin-bottom: 0px;">
  27. <div style="font-size: 12px; font-weight: 600; color: black; text-transform: capitalize;">
  28. <span>{{cn($row,'student_details.first_name','')}} {{cn($row,'student_details.last_name','')}}</span>
  29. </div>
  30. <div style="font-size: 11.5px;">
  31. <a href="" class="" style="color: #868e96;"><span>Ref : {{$row->student_apply_ref ?? "N/A"}} </span></a>
  32. </div>
  33. <div style="font-size: 11.5px;">
  34. <span style="color: #868e96;">Applied : {{utc_to_ltz($row->submitted_date, 'd M Y g:i A', local_tz($user))}}</span>
  35. </div>
  36. </div>
  37. </div>
  38. </td>
  39. <td style="font-size: 11.5px; width: 17%;">
  40. <div style="display:flex;">
  41. <div class="alert" style="background-color:white; padding: 3px 7px; margin-bottom: 0px;">
  42. <div style="font-size: 11.5px; font-weight: 600; display:block;">
  43. <span style="color: black;">{{cn($row,'institutes.institution','')}}</span>
  44. </div>
  45. <div style="font-size: 11.5px;">
  46. <span style="color: black;">Passing Year : {{cn($row,'institutes.passing_year','N/A')}} </span>
  47. </div>
  48. <div class="mt-1" style="font-size: 11.5px;">
  49. <span class="label_badge_gpa">{{cn($row,'institutes.result','')}} (GPA)</span>
  50. </div>
  51. </div>
  52. </div>
  53. </td>
  54. <td class="mb-1" style="font-size: 11.5px; text-align:center; color: black;"><span class="label_badge_gpa" style="background-color: #f5f4fd; color: black;">{{cn($row,'scores.test_name','N/A')}} • {{cn($row,'scores.overall_score','')}}</span>
  55. <div style="font-size: 11.5px;">
  56. <span style="color: black;">
  57. @php
  58. $work_history_first =$row->work_experience_date()->whereNotNull('start_date')->oldest()->first();
  59. $work_history_last =$row->work_experience_date()->latest()->first();
  60. if($work_history_first && $work_history_last && $work_history_last->end_date){
  61. $diff_in_days =diff_in_days($work_history_first->start_date,$work_history_last->end_date);
  62. }elseif($work_history_first){
  63. $diff_in_days =diff_in_days($work_history_first->start_date, now());
  64. }else{
  65. $diff_in_days =0;
  66. }
  67. $years = ($diff_in_days / 365) ;
  68. $years = floor($years);
  69. $month = ($diff_in_days % 365) / 30.5;
  70. $month = floor($month);
  71. $days = ($diff_in_days % 365) % 30.5;
  72. @endphp
  73. <div class="mt-1" style="font-size: 11px; display:block;">
  74. <span class="label_badge_work"><i class="fa fa-briefcase" style="color: #2466dc; margin-right: 5px;"></i>{{$years}} years</span>
  75. </div>
  76. </span>
  77. </div>
  78. </td>
  79. <td style="font-size: 11px; text-align:center;">
  80. <div style="font-size: 11px; display:block;">
  81. <div style="font-size: 11px; color: black;"> Pub :
  82. @if($row->student_details->is_publication==1)
  83. <span class="label_badge_work" style="font-weight: 400 !important; background-color: #f5f2cd; color: #6f6b3e;"> Yes</span>
  84. @else
  85. <span class="label_badge_work" style="font-weight: 400 !important; background-color: #f5f2cd; color: #6f6b3e;"> No</span>
  86. @endif
  87. </div>
  88. <div class="mt-1" style="font-size: 11px; color: black;"> Con :
  89. @if($row->student_details->is_attended_conference==1)
  90. <span class="label_badge_work" style="font-weight: 400 !important; background-color: #e5ebf7; color: #2466dc;"> Yes</span>
  91. @else
  92. <span class="label_badge_work" style="font-weight: 400 !important; background-color: #e5ebf7; color: #2466dc;"> No</span>
  93. @endif
  94. </div>
  95. </div>
  96. </td>
  97. <td style="font-size: 11px; width: 30%;">
  98. @php
  99. $hashids = new \Hashids\Hashids('application', 25);
  100. @endphp
  101. <div class="inner_right">
  102. <a href="{{ url('supervisor/application/'.$hashids->encode($row->id)) }}"><strong style="font-size:11px; color:black;">{{cn($row,'proposal.title','')}}</strong></a></br>
  103. <span style="color:black;">{{cn($row,'proposal.methology','')}}</span>
  104. @php
  105. $proposal =\DB::table('proposal')->where(
  106. 'student_id',$row->student_id
  107. )->first();
  108. if(isset($proposal)){
  109. $department =\DB::table('departments')->where(
  110. 'id',$proposal->department
  111. )->first();
  112. }
  113. @endphp
  114. @if(isset($department))
  115. <span>.</span>
  116. <span style="color:black;">
  117. {{ $department->name }}
  118. </span>
  119. @endif
  120. <span>.</span>
  121. <span style="color:black;">{{cn($row,'proposal.status','')}}</span>
  122. </div>
  123. </td>
  124. <td style="font-size: 11px; text-align:center;">
  125. <div class="top_part_status">
  126. @if($row->accepted_status==1 && $row->proposal_status ==1)
  127. <button class="btn btn2" style="padding: 1px 10px !important; font-size: 11px;">Reviewing</button>
  128. @elseif($row->accepted_status==1 && $row->proposal_status ==2)
  129. <button class="btn btn2" style="padding: 1px 10px !important; font-size: 11px;">Reviewing</button>
  130. @elseif($row->accepted_status==1 && $row->proposal_status ==3)
  131. <button class="btn btn2" style="padding: 1px 10px !important; font-size: 11px;">Push</button>
  132. @elseif($row->accepted_status==1 && $row->proposal_status ==4)
  133. <button class="btn btn2" style="padding: 1px 10px !important; font-size: 11px;">Hold</button>
  134. @elseif($row->accepted_status==1 && $row->proposal_status ==5)
  135. <button class="btn btn2" style="padding: 1px 10px !important; font-size: 11px;">Interested</button>
  136. @elseif($row->accepted_status==1 && $row->proposal_status ==6)
  137. <button class="btn btn2" style="padding: 1px 10px !important; font-size: 11px;">Rejected</button>
  138. @else
  139. <button class="btn btn2 accept_status_update" data-id="{{$row->id}}" style="padding: 1px 10px !important; font-size: 11px;">Accept</button>
  140. @endif
  141. @if($row->proposal_status_date)
  142. <br>
  143. <span style="font-size:11px; font-weight: bold;">
  144. {{utc_to_ltz($row->proposal_status_date, 'd M Y g:i A', local_tz($user))}}
  145. </span>
  146. @endif
  147. </div>
  148. </td>
  149. </tr>
  150. @endforeach
  151. </tbody>
  152. </table>
  153. </div>
  154. </div><!--end col-->
  155. {{-- {{ $students->appends(request()->query())->links('paginator') }} --}}
  156. @else
  157. <div class="col-md-12 bg-white" style="padding:10px;">
  158. <div class="alert mt-1 mb-3" style="border-color: #e9f0f3; font-size: 12px !important; color: #dc3545; border-radius: 30px; padding: 8px 15px; text-align: center;">
  159. <span>No data available.</span>
  160. </div>
  161. </div>
  162. @endif
  163. <script>
  164. $(function(){
  165. $('.accept_status_update').on('click', function(){
  166. var self =$(this);
  167. var id =self.data('id');
  168. var form_data={
  169. _token :"{{csrf_token()}}",
  170. 'id':id,
  171. }
  172. swal({
  173. title: "Are you sure you want to change status?",
  174. text: "Please check before submitting!",
  175. type: "warning",
  176. showCancelButton: true,
  177. confirmButtonClass: "btn-danger",
  178. cancelButtonClass: "btn-info",
  179. confirmButtonText: "Yes",
  180. cancelButtonText: "No",
  181. closeOnConfirm: true,
  182. closeOnCancel: true
  183. }, function(isConfirm){
  184. if(isConfirm){
  185. $.post("{{ route('ajax-post', ['name'=>'accept_status_update']) }}", form_data, function(res){
  186. pop_up_msg(res.msg);
  187. window.location.reload();
  188. }).fail(function(err){
  189. pop_up_msg(err_msg(err), 'error');
  190. });
  191. }
  192. });
  193. });
  194. $('.page-link').on('click',function() {
  195. $('#load_data').load($(this).attr('href'));
  196. });
  197. });
  198. </script>