applications.blade.php 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112
  1. @extends('supervisor.layouts.master')
  2. @section('content')
  3. <form method="POST" action="" style="padding: 10px; background-color: #16183f69; border-radius: 5px 5px 0px 0px;">
  4. <div class="row">
  5. <div class="col-md-3">
  6. <div class="mb-1">
  7. <label class="form-label" for="apply_ref" style="color: white; font-size:12px;">Apply Ref/Student Name or Email</label>
  8. <div class="form-icon position-relative">
  9. <input type="text" for="apply_ref" name="apply_ref" id="apply_ref" class="form-control ps-2" required="">
  10. </div>
  11. </div>
  12. </div>
  13. <div class="col-md-3">
  14. <div class="mb-1">
  15. <label class="form-label" for="" style="color: white; font-size:12px;">Status</label>
  16. <div class="form-icon position-relative">
  17. <select name="proposal_status" id="proposal_status" class="form-control frm" required="">
  18. <option disabled="" selected="" value="">Default</option>
  19. <option value="2">Reviewing</option>
  20. <option value="3">Pause</option>
  21. <option value="4">Hold</option>
  22. <option value="5">Interested</option>
  23. <option value="6">Rejected</option>
  24. </select>
  25. </div>
  26. </div>
  27. </div>
  28. <div class="col-md-3">
  29. <div class="mb-1">
  30. <label class="form-label" style="color: white; font-size:12px;">Application Received</label>
  31. <div class="form-icon position-relative">
  32. <input type="text" class="form-control submitted_date" name="submitted_date" id="submitted_date" placeholder="Date Range" data-validation="required" autocomplete="off" value="{{old('submitted_date')}}">
  33. </div>
  34. </div>
  35. </div>
  36. <div class="col-md-3">
  37. <div class="mb-1">
  38. <label class="form-label" for="start date" style="color: white; font-size:12px;">Preffered Start Date</label>
  39. <div class="form-icon position-relative">
  40. <input name="preffered_start_date" type="text" class="form-control preffered_start_date" id="preffered_start_date" placeholder="Date Range" data-validation="required" autocomplete="off" value="{{old('preffered_start_date')}}">
  41. </div>
  42. </div>
  43. </div>
  44. </div>
  45. </form>
  46. <div class="col-md-12" style="background-color:white; border-radius: 0px 0px 5px 5px;">
  47. <div class="mb-4" style="padding:15px;">
  48. <div class="text-end">
  49. <button class="btn btncl"><i class="fa fa-refresh"></i></button>
  50. <button class="btn btn2 search_button">search</button>
  51. </div>
  52. </div>
  53. </div>
  54. <div class="card rounded border-0 wait" style="background-color: #ffffff; color: #141639c4;">
  55. <div id="load_data"></div>
  56. </div>
  57. @endsection
  58. @push('js')
  59. <script>
  60. $(function(){
  61. get_data();
  62. $(".submitted_date").flatpickr({
  63. dateFormat: 'd-m-Y',
  64. mode: "range"
  65. // maxDate:"today",
  66. });
  67. $(".preffered_start_date").flatpickr({
  68. dateFormat: 'd-m-Y',
  69. mode: "range"
  70. // maxDate:"today",
  71. });
  72. $('.search_button').on('click', function(){
  73. get_data();
  74. });
  75. function get_data(){
  76. $('.wait').waitMe({effect : 'facebook', text : 'Please wait...'});
  77. var base = '{{url('/')}}';
  78. var apply_ref = $('#apply_ref').val();
  79. var proposal_status = $('#proposal_status').find('option:selected').val();
  80. var submitted_date = $('#submitted_date').val();
  81. var preffered_start_date = $('#preffered_start_date').val();
  82. $.ajax({
  83. method: 'GET',
  84. url: base+'/supervisor/application-list/search',
  85. data: {'apply_ref' : apply_ref,'proposal_status' : proposal_status,'submitted_date' : submitted_date,'preffered_start_date' : preffered_start_date},
  86. success: function(response){ // What to do if we succeed
  87. $('.wait').waitMe("hide");
  88. $('#load_data').html(response);
  89. },
  90. error: function(jqXHR, textStatus, errorThrown) { // What to do if we fail
  91. $('.wait').waitMe("hide");
  92. console.log(JSON.stringify(jqXHR));
  93. console.log("AJAX error: " + textStatus + ' : ' + errorThrown);
  94. }
  95. });
  96. }
  97. $('.wait-me').on('click', function(){
  98. $('.wait').waitMe({effect : 'facebook', text : 'Please wait...'});
  99. });
  100. });
  101. </script>
  102. @endpush