123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147 |
- @extends('admin.sub_contents.base')
- @section('main')
- <div class="table-responsive">
- <table class="table table-bordered list_table" style="margin: 0px;">
- <thead>
- <tr>
- <th>Sl</th>
- <th>Name</th>
- <th>University Name</th>
- <th>Department</th>
- <th class="text-center">Status</th>
- <th class="text-center">Action</th>
- </tr>
- </thead>
- <tbody>
- @if(count($register_teachers_list) > 0)
- @foreach($register_teachers_list as $key=>$row)
- <tr>
- <td style="font-size: 11px;">{{++$key}}</td>
- <td style="font-size: 11px;"><span style="font-weight: bold !important;">{{$row->first_name }} {{$row->last_name }}</span><br>
- <span>{{$row->designation}}</span><br>
- <span>{{$row->email}}</span>
- </td>
- <td style="font-size: 11px;"> {{ cn($row, 'university.name','') }}<br>
- <span>{{$row->uni_website}}</span>
- </td>
- <td style="font-size: 11px;">
- @if(isset($row->department))
- {{ cn($row, 'department_name.name','') }}
- @else
- {{ $row->others_department }}
- @endif
- </td>
- <td style="font-size: 11px; width: 9%;">
- <div class="single_glance_row mt-1" style="display: flex;">
- <div class="top_part_status" style="position: relative; width: fit-content; margin-left: 10px;">
- <span class="top_part_status_name" style="background: #dcdcdc; color: #8c9094;">
- @if($row->apply_status==0)
- Pending
- @endif
- </span>
- <div class="dropdown" style="top: 0.4px; position: absolute; right: 9px;">
- <i class="fa fa-caret-down dropdown-toggle add_hover tooltips" id="dropdownMenuButton" data-toggle="dropdown" aria-haspopup="true" aria-expanded="true" data-original-title="Change Status" style="color: #8c9094;"></i>
- <div class="dropdown-menu" aria-labelledby="dropdownMenuButton" x-placement="bottom-start" style="position: absolute; transform: translate3d(10px, 13px, 0px); top: 0px; left: 0px; will-change: transform; margin-left: -75px; z-index: 2; margin-top: 10px;">
- <a class="dropdown-item active_inactive_status_change hand" data-value="1" data-id={{$row->id}}>Active</a>
- <a class="dropdown-item active_inactive_status_change hand" data-value="2" data-id={{$row->id}}>In active</a>
- <a class="dropdown-item active_inactive_status_change hand" data-value="3" data-id={{$row->id}}>Suspend</a>
- </div>
- </div>
- </div>
- </div>
- </td>
- <td class="text-center">
- <span class="edit_info" data-id="{{$row->id}}"><i class="fa fa-edit"></i></span>
- </td>
- </tr>
- <?php
- $edit_cls_name = "edit_cls_".$row->id;
- ?>
- <tr class="edit_data {{$edit_cls_name}} d-none">
- <td colspan="6">
- <div class="edit_teacher_load"></div>
- </td>
- </tr>
- @endforeach
- @else
- <tr>
- <td colspan="6" class="text-center">
- <span class="text-danger">No data found!</span>
- </td>
- </tr>
- @endif
- </tbody>
- </table>
- </div>
-
- @endsection
- <script>
- $(function(){
-
- $('.edit_info').on('click', function(){
- $('.edit_teacher_load').empty();
- var self = $(this);
- var id = self.attr("data-id");
- var edit_cls = "edit_cls_"+id;
- $('.edit_data').addClass('d-none');
- $("."+edit_cls).removeClass('d-none');
- var edit_teacher_load = self.closest('tbody').find('.edit_teacher_load');
- fetch_sub_content(
- edit_teacher_load,
- "{!! route('sub-content', ['name'=>'edit_teacher_load','action'=>'edit']) !!}&edit_id="+id
- );
- });
- $('.active_inactive_status_change').on('click', function(e){
- var self =$(this);
- var id =$(this).data('id');
- var value =$(this).data('value');
- var form_data={
- _token:"{{ csrf_token() }}",
- 'id':id,
- 'status':value
- }
- swal({
- title: "Are you sure?",
- text: "Do you want to change this status?",
- type: "warning",
- showCancelButton: true,
- confirmButtonClass: "btn btn-md btn-success",
- cancelButtonClass: 'btn btn-md btn-danger',
- confirmButtonText: "Yes"
- }, function(isConfirm){
- if(isConfirm) {
- $.post("{{ route('ajax-post', ['name'=>'teacher_user_status_change'])}}" ,form_data).done(function(res){
- pop_up_msg(res.msg);
- //window.location.reload();
- fetch_sub_content(
- '#pending_teacher_load',
- "{{ route('sub-content', ['name'=>'register_pending_teacher_load']) }}"
- );
- }).fail(function(error){
- let msg='Sorry!, form submission failed try again later.';
- if(error.responseJSON.msg){
- msg=error.responseJSON.msg;
- }
- pop_up_msg(msg, 'error');
- });
- }
- });
- });
-
- });
- </script>
|