home.blade.php 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257
  1. @extends('application.layouts.master')
  2. @section('content')
  3. <section class="bg-half-170 d-table w-100" style="background-color: #efefef; height: 100vh;">
  4. <div class="container mt-5 pt-4" style="padding: 10px 20px 0px 20px;">
  5. <div class="col-md-12">
  6. @if(\Auth::user()->email_verification==0)
  7. <div class="col md-4 mt-1">
  8. <div class="col-md-12">
  9. <span class="alert mt-3" role="alert" style="font-size: 12px !important; border-radius: .55rem; padding: 8px 12px; margin-top: 6px; background: #fff0d6; color: #fdad2a; border-color: #ffebca; border-width: 3px; border-style: double;"> <i class="fa fa-warning" style="font-size: 11px; margin-right: 5px; color: #fdad2a !important; top: 0px; position: relative;"></i> Your email is not verified. Pleace check your email .</span>
  10. </div>
  11. </div>
  12. @endif
  13. <div class="card p-2 rounded border-0" style="background-color: #ffffff; color: #141639c4;">
  14. <div class="col-md-12">
  15. <div class="row p-2 mb-1">
  16. <h6 style="font-weight:bold !important;">There are two methods for submitting your proposal :</h6>
  17. <div class="col-md-5 mt-3 ms-3 method-box">
  18. <h6 class="method"> Option 1:</h6>
  19. <p style="font-size: 13px;"> Contact your supervisor and request their Account Reference Number (ARN). With this number, you can search for the supervisor's account and submit your proposal.</p>
  20. </div>
  21. <div class="col-md-5 mt-3 ms-3 method-box">
  22. <h6 class="method"> Option 2:</h6>
  23. <p style="font-size: 13px;">Request your supervisor to invite you. Once you receive the email invitation, click on the link provided in the email. This will automatically link your application with the supervisor's account, and you only need to click the Submit button.</p>
  24. </div>
  25. </div>
  26. </div>
  27. </div>
  28. <div class="row">
  29. <div class="col-md-8 mt-4">
  30. <div class="card p-3 rounded border-0" style="background-color: white; height: 350px;">
  31. <div class="col-md-12">
  32. <div class="container-fluid" style="padding:0px !important;">
  33. <div class="row">
  34. <h6 style="font-weight:bold !important; margin: 0px; color: #141639c4;">Submit your proposals with ease</h6>
  35. <p style="font-size: 13px; color: #141639c4;">Simplify the process and contact with potential supervisors effortlessly!</p>
  36. <p class="mt-1" style="font-size: 13px; color: #141639c4;">Please input the Supervisor's Account Reference Number (ARN) in the search bar below. After verifying that the Supervisor Name, Department and University Name are accurate, click on the <strong>"Apply"</strong> button to complete your submission.</p>
  37. </div>
  38. </div>
  39. </div>
  40. <div class="col-md-12">
  41. <div class="row" style="display:flex;">
  42. <div class="mb-1">
  43. <div class="form-icon position-relative" style="display:flex;">
  44. <input type="text" class="form-control search-box" id="teacher_ref_no" placeholder="Please type your Supervisor's ARN here" name="teacher_ref_no" required="">
  45. <span class="search_button hand search-btn" style="margin-left: -8.8rem; "><span style="display:block; margin-left:11px; margin-top:4px; cursor: pointer;">Search</span></span>
  46. <span class="ref_button hand search-btn ms-2" style="width: 5%; background-color: #ffbd59 !important; border: 2px solid #ffbd59;"><span style="display:block; margin-left:9px; margin-top:4px; cursor: pointer;"><i class="fa fa-refresh" style="color:#ffff !important;"></i></span></span>
  47. <!-- <button class="btn btncl"></button> -->
  48. </div>
  49. <div id="load_data"></div>
  50. </div>
  51. </div>
  52. </div>
  53. </div>
  54. </div><!--end col-->
  55. <div class="col-md-3 mt-4" style="background-color:white; border-radius: 6px; width: 31.5%; margin-left: 8px; height: 350px;">
  56. <div class="row p-2">
  57. <div class="col-md-12">
  58. <div class="mt-2 mb-2">
  59. <div class="container-fluid" style="padding:0px !important;">
  60. <div class="row">
  61. <p class="mb-1" style="font-size:14px; font-weight:bold !important; color: #141639c4;">Refer a Friend</p>
  62. <p style="font-size: 13px;">Earn points by referring your friends or colleagues to register and submit their first application. Once they submit their application, you will receive the points.</p>
  63. <div class="col-md-12">
  64. <div class="row">
  65. <div class="col-md-12">
  66. <div class="mb-3">
  67. <label class="form-label"></label>
  68. <div class="form-icon position-relative">
  69. <input type="text" class="form-control" id="ref_name" placeholder="Full Name" name="name" required="">
  70. </div>
  71. </div>
  72. </div>
  73. <div class="col-lg-12" style="margin-top:-18px;">
  74. <div class="mb-3">
  75. <label class="form-label"></label>
  76. <div class="form-icon position-relative">
  77. <input type="email" class="form-control" id="ref_email" placeholder="Email Address" name="email" required="">
  78. </div>
  79. </div>
  80. </div><!--end col-->
  81. <div class="col-md-12">
  82. <div class="mt-2 mb-4 text-center">
  83. <button type="submit" class="btn btn1 refer_btn" style="padding: 3px 18px;">
  84. {{ __('Invite Now') }}
  85. </button>
  86. </div>
  87. </div>
  88. </div>
  89. </div>
  90. </div>
  91. </div>
  92. </div>
  93. </div>
  94. </div>
  95. </div>
  96. </div><!--end row-->
  97. @if(count($student_proposal) > 0 )
  98. <div class="card p-2 mt-4 rounded border-0" style="background-color: white;">
  99. <div class="col-md-12">
  100. <div class="container">
  101. <div class="row mt-2">
  102. <div class="col-md-12">
  103. <h6 style="font-weight:bold !important; color: #141639c4;">Application you have submitted that are currently awaiting decisions</h6>
  104. <div class="table-responsive">
  105. <table class="table table-bordered list_table">
  106. <thead>
  107. <tr>
  108. <th>Sl</th>
  109. <th>Apply Ref.</th>
  110. <th>Supervisor Name</th>
  111. <th>University Name</th>
  112. <th style="text-align:center;">Proposal Ref.</th>
  113. <th style="text-align:center;">Applied On</th>
  114. <th style="text-align:center;">Status</th>
  115. <th style="text-align:center;">action</th>
  116. </tr>
  117. </thead>
  118. <tbody>
  119. @foreach($student_proposal as $key=>$row)
  120. <tr>
  121. <td style="font-size: 12px;">{{++$key}}</td>
  122. <td style="font-size: 12px;">{{$row->student_apply_ref}}</td>
  123. <td style="font-size: 12px;">
  124. <div class="d-flex">
  125. @if($row->teacher_details->university)
  126. <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,'teacher_details.university.country.iso_3166_2','')).'.svg' }}" alt="Flag" data-toggle="tooltip" title="" data-placement="top">
  127. @endif
  128. <div class="alert" style="background-color:white; padding: 3px 7px; margin-bottom: 0px;">
  129. <strong class="ml-2">{{ cn($row,'teacher_details.first_name','')}} {{ cn($row,'teacher_details.last_name','')}}</strong><br>
  130. <span class="ml-2" style="font-weight: 300;">{{cn($row,'teacher_details.designation','')}}</span>
  131. </div>
  132. </div>
  133. </td>
  134. <td style="font-size: 12px;">
  135. @if($row->teacher_details->university_name)
  136. {{cn($row,'teacher_details.university_name','')}}
  137. @else
  138. {{cn($row,'teacher_details.university.name','')}}
  139. @endif
  140. </br>
  141. <span>
  142. @if($row->teacher_details->others_department)
  143. <span style="font-size: 12px; color: #868e96;">{{cn($row,'teacher_details.others_department','')}}</span>
  144. @else
  145. <span style="font-size: 12px; color: #868e96;"> {{cn($row,'teacher_details.department_name.name','')}} </span>
  146. @endif
  147. </span></td>
  148. <td style="font-size: 12px; text-align:center;">
  149. @php
  150. $proposal =\DB::table('proposal')->where('id',$row->proposal_id)->where('student_id',$row->student_id)->first();
  151. @endphp
  152. @if($proposal)
  153. <strong>{{ $proposal->proposal_ref}}</strong>
  154. @endif
  155. </td>
  156. <td style="font-size: 12px; text-align:center;">@if(!empty($row->submitted_date)){{date('d M Y', strtotime($row->submitted_date))}} @else @endif</td>
  157. <td style="text-align:center; font-size: 12px;"><span class="label_badge_radius" style="background-color: #d8fdd8; color: green;">Applied</span></td>
  158. <td style="text-align:center; font-size: 12px;">
  159. <span class="open_modal_page hand" data-toogle="tooltips" title="View" data-title="Apply Reference - {{$row->student_apply_ref}} " data-url="{{route('modal-get',['name'=>'view_apply_proposal','id'=>$row->id])}}"><i class="fa fa-eye change_pass_btn"></i></span>
  160. </td>
  161. </tr>
  162. @endforeach
  163. </tbody>
  164. </table>
  165. </div>
  166. </div>
  167. </div>
  168. </div>
  169. </div>
  170. </div>
  171. @endif
  172. <div class="w3-container mt-5">
  173. </div>
  174. </div><!--end container-->
  175. </div>
  176. </section>
  177. @endsection
  178. @push('js')
  179. <script>
  180. $(function(){
  181. $('.search_button').on('click', function(){
  182. // get_data();
  183. var teacher_ref_no = $('#teacher_ref_no').val();
  184. if(teacher_ref_no){
  185. fetch_sub_content(
  186. '#load_data',
  187. "{!! route('sub-content', ['name'=>'load_ref_no_available_info']) !!}" +"?teacher_ref_no=" +teacher_ref_no
  188. );
  189. }else{
  190. pop_up_error_msg('Please type a vaild Reference No.');
  191. }
  192. });
  193. $('.ref_button').on('click', function(){
  194. $('#teacher_ref_no').val("");
  195. });
  196. // function get_data(){
  197. // var base = '{{url('/')}}';
  198. // var teacher_ref_no = $('#teacher_ref_no').val();
  199. // if(teacher_ref_no){
  200. // $.ajax({
  201. // method: 'GET',
  202. // url: base+'/home/search',
  203. // data: {'teacher_ref_no' : teacher_ref_no},
  204. // success: function(response){ // What to do if we succeed
  205. // //console.log(response);
  206. // $('#load_data').html(response);
  207. // },
  208. // error: function(jqXHR, textStatus, errorThrown) { // What to do if we fail
  209. // console.log(JSON.stringify(jqXHR));
  210. // console.log("AJAX error: " + textStatus + ' : ' + errorThrown);
  211. // }
  212. // });
  213. // }else{
  214. // pop_up_error_msg('Please type a Teacher Reference No.');
  215. // }
  216. // }
  217. $('.refer_btn').on('click', function(){
  218. var name =$('#ref_name').val();
  219. var email =$('#ref_email').val();
  220. var form_data={
  221. _token: "{{ csrf_token() }}",
  222. name: name,
  223. email: email,
  224. }
  225. $.post("{{ route('ajax-post', ['name'=>'save_student_refer_friend']) }}", form_data, function(res){
  226. $('#ref_name').val('');
  227. $('#ref_email').val('');
  228. pop_up_msg(res.msg);
  229. }).fail(function(err){
  230. pop_up_msg(err_msg(err), 'error');
  231. });
  232. });
  233. });
  234. </script>
  235. @endpush