english_languge_proficiency_load.blade.php 5.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123
  1. @extends('admin.sub_contents.base')
  2. @section('main')
  3. <div class="table-responsive mt-2">
  4. @if(count($score)>0)
  5. <table class="table table-bordered list_table" style="margin-bottom:10px;">
  6. <tbody>
  7. @foreach($score as $row)
  8. <tr>
  9. <td>
  10. <div class="institute_info">
  11. <div class="left">
  12. <i class="fa fa-align-center" style="padding: 7px;"></i>
  13. </div>
  14. <div class="right">
  15. <span class="main_title" style="font-size: 11px;font-weight: 600; display: flex;"> Testing System</span>
  16. <span class="label_badge_light test_score_level">{{$row->test_name}}</span>
  17. <span style="font-weight: 400; font-size: 12px;">Test Date: {{date("d M, Y", strtotime($row->test_date))}}</span>
  18. </div>
  19. </div>
  20. </td>
  21. <td class="text-center">
  22. <strong style="color: rgb(57, 59, 62); font-size: 12px;">{{$row->overall_score}}</strong><br>
  23. <strong style="color: rgb(57, 59, 62); font-size: 12px;">Overall</strong>
  24. </td>
  25. <td class="text-center">
  26. <strong style="color: rgb(57, 59, 62); font-size: 12px;">{{$row->listening}}</strong><br>
  27. <strong style="font-size: 12px;">Listening</strong>
  28. </td>
  29. <td class="text-center">
  30. <strong style="color: rgb(57, 59, 62); font-size: 12px;">{{$row->speaking}}</strong><br>
  31. <strong style="font-size: 12px;">Speaking</strong>
  32. </td>
  33. <td class="text-center">
  34. <strong style="color: rgb(57, 59, 62); font-size: 12px;">{{$row->writing}}</strong><br>
  35. <strong style="font-size: 12px;">Writing</strong>
  36. </td>
  37. <td class="text-center">
  38. <strong style="color: rgb(57, 59, 62); font-size: 12px;">{{$row->reading}}</strong><br>
  39. <strong style="font-size: 12px;">Reading</strong>
  40. </td>
  41. @if(profile_permission($row->student_id))
  42. <td class="text-center" style="width: 100px;">
  43. <div class="icon_bar" style="border: none;">
  44. <span class="edit_score_info" data-id="{{$row->id}}" style="cursor: pointer; @if($is_freez_profile) pointer-events:none; @endif"><i class="fa fa-edit change_pass_btn" ></i></span>
  45. <span class="delete_score_info" data-id="{{$row->id}}" style="cursor: pointer; @if($is_freez_profile) pointer-events:none; @endif"><i class="fa fa-trash change_pass_btn ms-1" ></i></span>
  46. </div>
  47. </td>
  48. @endif
  49. </tr>
  50. <?php
  51. $edit_cls_name = "edit_cls_".$row->id;
  52. ?>
  53. <tr class="edit_data {{$edit_cls_name}} d-none">
  54. <td colspan="7">
  55. <div class="edit_english_languge_proficiency_form"></div>
  56. </td>
  57. </tr>
  58. @endforeach
  59. </tbody>
  60. </table>
  61. @else
  62. <div class="alert mt-1 mb-3" style="border-color: #e9f0f3; font-size: 12px !important; color: #dc3545; border-radius: 30px; padding: 8px 15px;">
  63. <span>No Test Score available.</span>
  64. </div>
  65. @endif
  66. </div>
  67. @endsection
  68. <script>
  69. $(function(){
  70. $('.edit_score_info').on('click', function(){
  71. $('.edit_english_languge_proficiency_form').empty();
  72. var self = $(this);
  73. var id = self.attr("data-id");
  74. var edit_cls = "edit_cls_"+id;
  75. $('.edit_data').addClass('d-none');
  76. $("."+edit_cls).removeClass('d-none');
  77. var edit_english_languge_proficiency_form = self.closest('tbody').find('.edit_english_languge_proficiency_form');
  78. fetch_sub_content(
  79. edit_english_languge_proficiency_form,
  80. "{!! route('sub-content', ['name'=>'edit_english_languge_proficiency_form','action'=>'edit']) !!}&edit_id="+id
  81. );
  82. });
  83. $('.delete_score_info').on('click', function(){
  84. var id = $(this).attr("data-id");
  85. var form_data={
  86. _token: "{{ csrf_token() }}",
  87. delete_id: id,
  88. }
  89. swal({
  90. title: "Are you sure?",
  91. text: "You will not be able to recover this data!",
  92. type: "warning",
  93. showCancelButton: true,
  94. confirmButtonClass: "btn-danger",
  95. cancelButtonClass: "btn-info",
  96. confirmButtonText: "Yes, delete!",
  97. cancelButtonText: "No, cancel!",
  98. }, function(isConfirm){
  99. if(isConfirm){
  100. $.post("{{ route('ajax-post', ['name'=>'delete_score_info']) }}",form_data
  101. ).done(function(res){
  102. pop_up_msg(res.msg);
  103. fetch_sub_content(
  104. '#english_languge_proficiency_load',
  105. "{{ route('sub-content', ['name'=>'english_languge_proficiency_load']) }}"
  106. );
  107. }).fail(function(err){
  108. pop_up_msg(err_msg(err), 'error');
  109. });
  110. }
  111. });
  112. });
  113. });
  114. </script>