@extends('admin.layouts.app')
@section('header-script')
    @include('admin.layouts.forms-header-script')
@endsection

    @section('content')
        <div class="row">
            <div class="col-sm-12">
                <!--<div class="btn-group pull-right m-t-25">-->
                <!--    <a  href="{{URL::to('admin/teams_create')}}" class="btn btn-custom  waves-effect waves-light"> -->
                <!--        Create soty  <span class="m-l-5"><i class="fa fa-plus-square" aria-hidden="true"></i></span>-->
                <!--    </a>-->
                <!--</div>-->
                <h4 class="page-title">Soty List</h4>
                @foreach (['danger', 'warning', 'success', 'info'] as $key)
                    @if(Session::has($key))
                        <p class="alert alert-{{ $key }}"><i class="fa fa-info-circle" style="color: #fe6271;"></i> {{ Session::get($key) }}</p>
                    @endif
                @endforeach
            </div>
        </div>
        <div class="row">
            <div class="col-sm-12">
                <div class="card-box">
                    <div class="row">
                        <table id="datatable" class="table table-striped dt-responsive nowrap  align-middle">
                            <thead>
                                <tr>
                                    <th>Sl</th>
                                    <th>TEAM ID <br> Join As</th>
                                    <th>Images</th>
                                    <th>Name <br> Designation <br>Profession</th>
                                    <th>WhatsApp Number<br> Email<br>Teligram Number</th>
                                    <th>Company/Institute Name <br> Mobile <br> Email</th>
                                    <th>Event <br> Join As</th>
                                    <th>Village, Thana <br> District, Division</th>
                                    <th>Action</th>
                                </tr>
                            </thead>

                            <tbody>
                                @foreach($mentors as $mentor)
                                <tr>
                                    <td>{{ $loop->index+1 }}</td>
                                    <td>{{"SOTT00000".$mentor->id}}<br>{{ $mentor->join->name ?? "" }}</td>
                                    <td><img src="{{ '/storage/app/public/'. $mentor->profile_image }}" alt="{{ $mentor->full_name }}" width="80" height="80"></td>
                                    <td>{{ $mentor->full_name }} <br> {{ $mentor->class_level_designation }}<br>{{ $mentor->group_department_subject }}</td> 
                                    <td>{{ $mentor->whatsapp_number }}<br>{{ $mentor->email }}<br>{{ $mentor->telegram_number }}</td>
                                    <td>{{ $mentor->institute }} <br> {{ $mentor->institute_mobile }} <br> {{ $mentor->institute_email }} </td>
                                    <td>{{ $mentor->event->session->title ?? '' }} <br> {{ $mentor->join->name ?? "" }}</td>
                                    <td>{{ $mentor->village_area}}, {{ $mentor->upazila->name ?? "" }} <br> {{ $mentor->district->name ?? "" }}, {{ $mentor->division->name ?? "" }}</td>
                                    <td style="width: 60px;"> 
                                        <a href="{{url('admin/joinsoty')}}/{{$mentor->id}}/edit" class="btn btn-sm  btn-warning"><i class="fa fa-edit"></i></a>
                                        <a href="{{url('admin/joinsoty')}}/{{$mentor->id}}/delete" class="btn btn-sm  btn-danger"><i class="fa fa-trash"></i></a>
                                    </td> 
                                </tr>
                                @endforeach
                            </tbody>
                        </table>
                        {{$mentors->links()}}
                    </div>
                </div>
            </div>
        </div>
    @endsection

 @section('footer-script')
     @include('admin.layouts.form-elements-footer-script')
 @endsection