applications.blade.php 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101
  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 p-2 rounded border-0" style="background-color: #ffffff; color: #141639c4; height: 80vh;">
  55. <div id="load_data"></div>
  56. </div>
  57. @endsection
  58. @push('js')
  59. <script>
  60. $(function(){
  61. $(".submitted_date").flatpickr({
  62. dateFormat: 'd-m-Y',
  63. mode: "range"
  64. // maxDate:"today",
  65. });
  66. $(".preffered_start_date").flatpickr({
  67. dateFormat: 'd-m-Y',
  68. mode: "range"
  69. // maxDate:"today",
  70. });
  71. $('.search_button').on('click', function(){
  72. get_data();
  73. });
  74. function get_data(){
  75. var base = '{{url('/')}}';
  76. var apply_ref = $('#apply_ref').val();
  77. var proposal_status = $('#proposal_status').find('option:selected').val();
  78. var submitted_date = $('#submitted_date').val();
  79. var preffered_start_date = $('#preffered_start_date').val();
  80. $.ajax({
  81. method: 'GET',
  82. url: base+'/supervisor/application-list/search',
  83. data: {'apply_ref' : apply_ref,'proposal_status' : proposal_status,'submitted_date' : submitted_date,'preffered_start_date' : preffered_start_date},
  84. success: function(response){ // What to do if we succeed
  85. $('#load_data').html(response);
  86. },
  87. error: function(jqXHR, textStatus, errorThrown) { // What to do if we fail
  88. console.log(JSON.stringify(jqXHR));
  89. console.log("AJAX error: " + textStatus + ' : ' + errorThrown);
  90. }
  91. });
  92. }
  93. });
  94. </script>
  95. @endpush