
@extends('admin/layouts/contentLayoutMaster')

@section('title', $title)

@section('vendor-style')
{{-- vednor css files --}}
@endsection
@section('content')
<!-- Add rows table -->

<?php
$statuses = Config::get('params.statuses');
?>
<section id="add-row">
    <div class="row">
        <div class="col-12">
            <div class="card">
                <div class="card-header"><h4 class="card-title"></h4>
                    <a href="{{url("admin/teams/create")}}" class="btn btn-primary mb-2 float-right"><i class="feather icon-plus "></i></a>

                 </div> 
                <div class="card-content">
                    <div class="card-body">
                        @include("messages")
                        <div class="table data-list-view dataTable no-footer dt-checkboxes-select">

                            @if(count($model))
                            <table id="listing" class="table data-list-view dataTable no-footer dt-checkboxes-select">
                                <thead>
                                    <tr>
                                        <th >ID</th>
                                        <th>Name</th>
                                        <th>Email</th>
                                        <th>Phone</th>
                                        <th>Designation</th>
                                        <th>Image</th>
                                        <th>Status</th>
                                        <th></th>
                                    </tr>

                                </thead>
                                <tbody>
                                    @foreach($model as $row)
                                    <tr class="odd">
                                        <td class="product-name">{{$row->id}}</td>
                                        <td class="">{{$row->first_name}}{{$row->last_name}}</td>
                                        <td>{{$row->email}}</td>
                                        <td>{{$row->phone}}</td>
                                        <td>{{$row->designation}}</td>
                                        
                                            @if(!empty($row->image))
                                            <td><img src="{{asset(Config("params.media_path.thumbnail").$row->image)}}" width="60px"></td>
                                         @else
                                            <td>None</td>
                                             @endif 
                                        <td>{{$statuses[$row->status]}}</td>
                                        <td>
                                            <div class="btn-group dropdown actions-dropodown">
                                                <button type="button" class="btn btn-white px-1 py-1 dropdown-toggle waves-effect waves-light" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">

                                                </button>                                               
                                                <div class="dropdown-menu dropdown-menu-right">
                                                    <!--
-->                                                    <a class="dropdown-item" href="{{url('admin/teams/'.$row->id)}}"><i class="feather icon-eye"></i> View</a> 
                                                    <a class="dropdown-item" href="{{url('admin/teams/edit/'.$row->id)}}"><i class="feather icon-mail"></i> Edit</a>
                                                    <div class="dropdown-divider"></div>
                                                    <a class="dropdown-item confirm-delete" href="javascript:void(0);" data-href="{{url('admin/teams/delete/'.$row->id)}}" data-id="{{$row->id}}" ><i class="fa fa-trash-o"></i> Delete</a>
                                                </div>
                                            </div>
                                        </td>
                                    </tr>
                                    @endforeach
                                </tbody>
                                
                            </table>
                            @else

                            <div class="alert alert-primary" role="alert">
                                <i class="feather icon-info mr-1 align-middle"></i>
                                <span>No record found</span>
                            </div>

                            @endif
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</section>
<!--/ Add rows table -->
<!--/ Scroll - horizontal and vertical table -->
@endsection
@include('vendor_script')
@section('myscript')
{{-- Page js files --}}

@endsection
