home.blade.php 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294
  1. @extends('web.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. <span style="padding:5px; background: #ffbd59;"> Sorry! your email is not verified.</span>
  7. </div>
  8. <div class="col-md-12">
  9. <div class="card p-2 rounded border-0" style="background-color: #16183f1c; color: #141639c4;">
  10. <div class="col-md-12">
  11. <div class="container">
  12. <div class="row mt-2">
  13. <h6 style="font-weight:bold !important;">There are two methods for submitting your proposal :</h6>
  14. <p style="font-size: 13px;"><strong>Method 1:</strong> 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>
  15. <p style="font-size: 13px;"><strong>Method 2:</strong> Request your supervisor to invite you through Q apply. 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>
  16. </div>
  17. </div>
  18. </div>
  19. </div>
  20. <div class="row">
  21. <div class="col-md-8 mt-4">
  22. <div class="card p-3 rounded border-0" style="background-color: white; height: 350px;">
  23. <div class="col-md-12">
  24. <div class="container-fluid" style="padding:0px !important;">
  25. <div class="row">
  26. <h6 style="font-weight:bold !important; margin: 0px; color: #141639c4;">Submit your proposals with ease</h6>
  27. <p style="font-size: 13px; color: #141639c4;">Simplify the process and contact with potential supervisors effortlessly!</p>
  28. <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>
  29. </div>
  30. </div>
  31. </div>
  32. <div class="col-md-12">
  33. <div class="row" style="display:flex;">
  34. <div class="mb-1">
  35. <div class="form-icon position-relative" style="display:flex;">
  36. <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="">
  37. <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>
  38. <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>
  39. <!-- <button class="btn btncl"></button> -->
  40. </div>
  41. <div id="load_data"></div>
  42. </div>
  43. </div>
  44. </div>
  45. </div>
  46. </div><!--end col-->
  47. <div class="col-md-3 mt-4" style="background-color:white; border-radius: 6px; width: 31.5%; margin-left: 8px; height: 350px;">
  48. <div class="row p-2">
  49. <div class="col-md-12">
  50. <div class="mt-2 mb-2">
  51. <div class="container-fluid" style="padding:0px !important;">
  52. <div class="row">
  53. <p class="mb-1" style="font-size:14px; font-weight:bold !important; color: #141639c4;">Refer a Friend</p>
  54. <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>
  55. <div class="col-md-12">
  56. <div class="row">
  57. <div class="col-md-12">
  58. <div class="mb-3">
  59. <label class="form-label"></label>
  60. <div class="form-icon position-relative">
  61. <input type="text" class="form-control" id="ref_name" placeholder="Full Name" name="name" required="">
  62. </div>
  63. </div>
  64. </div>
  65. <div class="col-lg-12" style="margin-top:-18px;">
  66. <div class="mb-3">
  67. <label class="form-label"></label>
  68. <div class="form-icon position-relative">
  69. <input type="email" class="form-control" id="ref_email" placeholder="Email Address" name="email" required="">
  70. </div>
  71. </div>
  72. </div><!--end col-->
  73. <div class="col-md-12">
  74. <div class="mt-2 mb-4 text-center">
  75. <button type="submit" class="btn btn1 refer_btn" style="padding: 3px 18px;">
  76. {{ __('Invite Now') }}
  77. </button>
  78. </div>
  79. </div>
  80. </div>
  81. </div>
  82. </div>
  83. </div>
  84. </div>
  85. </div>
  86. </div>
  87. </div>
  88. </div><!--end row-->
  89. @if(count($student_proposal) > 0 )
  90. <div class="card p-2 mt-4 rounded border-0" style="background-color: white;">
  91. <div class="col-md-12">
  92. <div class="container">
  93. <div class="row mt-2">
  94. <div class="col-md-12">
  95. <h6 style="font-weight:bold !important; color: #141639c4;">Application you have submitted that are currently awaiting decisions</h6>
  96. <div class="table-responsive">
  97. <table class="table table-bordered list_table">
  98. <thead>
  99. <tr>
  100. <th>Sl</th>
  101. <th>Apply Ref.</th>
  102. <th>Supervisor Name</th>
  103. <th>University Name</th>
  104. <th style="text-align:center;">Proposal Ref.</th>
  105. <th style="text-align:center;">Applied On</th>
  106. <th style="text-align:center;">Status</th>
  107. <th style="text-align:center;">action</th>
  108. </tr>
  109. </thead>
  110. <tbody>
  111. @foreach($student_proposal as $key=>$row)
  112. <tr>
  113. <td style="font-size: 11px;">{{++$key}}</td>
  114. <td style="font-size: 11px;">{{$row->student_apply_ref}}</td>
  115. <td style="font-size: 11px;"><strong>{{ cn($row,'teacher_details.first_name','')}} {{ cn($row,'teacher_details.last_name','')}}</strong><br>
  116. <span>{{cn($row,'teacher_details.designation','')}}</span></td>
  117. <td style="font-size: 11px;">{{cn($row,'teacher_details.university_name','')}}</br>
  118. <span>
  119. @if(isset($row->teacher_details->department_name))
  120. {{cn($row,'teacher_details.department_name.name','')}}
  121. @else
  122. <span style="font-size: 11px; color: #868e96;">{{cn($row,'teacher_details.others_department','')}}</span>
  123. @endif
  124. </span></td>
  125. <td style="font-size: 11px; text-align:center;">
  126. @php
  127. $proposal =\DB::table('proposal')->where('id',$row->proposal_id)->where('student_id',$row->student_id)->first();
  128. @endphp
  129. @if($proposal)
  130. <strong>{{ $proposal->proposal_ref}}</strong>
  131. @endif
  132. </td>
  133. <td style="font-size: 11px; text-align:center;">{{date('d M Y', strtotime($row->created_at))}}</td>
  134. <td style="text-align:center; font-size: 11px;"><span class="label_badge_radius" style="background-color: #d8fdd8; color: green;">Applied</span></td>
  135. <td style="text-align:center; font-size: 11px;">
  136. <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"></i></span>
  137. </td>
  138. </tr>
  139. @endforeach
  140. </tbody>
  141. </table>
  142. </div>
  143. </div>
  144. </div>
  145. </div>
  146. </div>
  147. </div>
  148. @endif
  149. <div class="w3-container mt-5">
  150. </div>
  151. </div><!--end container-->
  152. </div>
  153. </section>
  154. @endsection
  155. @push('js')
  156. <script>
  157. function fetch_sub_content(selector, url, args=null){
  158. var config={
  159. spinner: true
  160. }
  161. if(typeof args=='object'){
  162. config=Object.assign(config, args);
  163. }
  164. if(config.spinner){
  165. $(selector).waitMe({
  166. effect: 'facebook',
  167. text: 'Please! Wait ...'
  168. });
  169. }
  170. $(selector).load(url, null, function(){
  171. $(selector).waitMe('hide');
  172. if(typeof args=='function') args();
  173. });
  174. }
  175. function wait_me(selector, config=null){
  176. if(config){
  177. selector.waitMe(config);
  178. }else{
  179. selector.waitMe({
  180. effect: 'facebook',
  181. //color: '#000',
  182. text: 'Please! Wait ...'
  183. });
  184. }
  185. }
  186. function pop_up_msg(msg='No message specified', type='success', callback=null){
  187. new Noty({
  188. theme:'sunset',
  189. text: msg,
  190. type: type,
  191. timeout:1500,
  192. callbacks:{
  193. afterClose: callback
  194. }
  195. }).show();
  196. }
  197. function err_msg(err){
  198. var msg="Request failed to process, try again later.";
  199. if(err.responseJSON && err.responseJSON.msg){
  200. msg=err.responseJSON.msg;
  201. }
  202. return msg;
  203. }
  204. $(function(){
  205. $('.search_button').on('click', function(){
  206. // get_data();
  207. var teacher_ref_no = $('#teacher_ref_no').val();
  208. if(teacher_ref_no){
  209. fetch_sub_content(
  210. '#load_data',
  211. "{!! route('sub-content', ['name'=>'load_ref_no_available_info']) !!}" +"?teacher_ref_no=" +teacher_ref_no
  212. );
  213. }else{
  214. pop_up_error_msg('Please type a vaild Reference No.');
  215. }
  216. });
  217. $('.ref_button').on('click', function(){
  218. $('#teacher_ref_no').val("");
  219. });
  220. // function get_data(){
  221. // var base = '{{url('/')}}';
  222. // var teacher_ref_no = $('#teacher_ref_no').val();
  223. // if(teacher_ref_no){
  224. // $.ajax({
  225. // method: 'GET',
  226. // url: base+'/home/search',
  227. // data: {'teacher_ref_no' : teacher_ref_no},
  228. // success: function(response){ // What to do if we succeed
  229. // //console.log(response);
  230. // $('#load_data').html(response);
  231. // },
  232. // error: function(jqXHR, textStatus, errorThrown) { // What to do if we fail
  233. // console.log(JSON.stringify(jqXHR));
  234. // console.log("AJAX error: " + textStatus + ' : ' + errorThrown);
  235. // }
  236. // });
  237. // }else{
  238. // pop_up_error_msg('Please type a Teacher Reference No.');
  239. // }
  240. // }
  241. $('.refer_btn').on('click', function(){
  242. var name =$('#ref_name').val();
  243. var email =$('#ref_email').val();
  244. var form_data={
  245. _token: "{{ csrf_token() }}",
  246. name: name,
  247. email: email,
  248. }
  249. $.post("{{ route('ajax-post', ['name'=>'add_refer_user']) }}", form_data, function(res){
  250. pop_up_msg(res.msg);
  251. }).fail(function(err){
  252. pop_up_msg(err_msg(err), 'error');
  253. });
  254. });
  255. });
  256. </script>
  257. @endpush