@extends('admin.layouts.app')

    @section('styles')

    @endsection

        @section('content')

                           <!-- PAGE-HEADER -->
                           <div class="page-header">
                            <h1 class="page-title">Following Service</h1>
                            <div>
                                <ol class="breadcrumb">
                                    <!-- <li class="breadcrumb-item"><a href="javascript:void(0)">Tables</a></li> -->
                                    <li class="breadcrumb-item active" aria-current="page">Following Service List</li>
                                </ol>
                            </div>
                        </div>
                        <!-- PAGE-HEADER END -->
                        <!-- Row -->
                        <!-- <div class="row">
                            <div class="col-lg-12">
                                <div class="card">
                                    <div class="card-header">
                                        <h3 class="card-title">Following Service List</h3>
                                    </div>
                                    <div class="card-body">
                                       <a href="{{url('admin/createfollowingservices')}}"> <button id="table2-new-row-button" class="btn btn-primary mb-4"> Add New</button></a>
                                        <div class="table-responsive">
                                            <table class="table table-bordered border text-nowrap mb-0" id="new-edit">
                                                <thead>
                                                    <tr>
                                                        <th>Name</th>
                                                        <th>Status</th>
                                                        <th>Created date</th>
                                                        <th class="text-center">Actions</th>
                                                    </tr>
                                                </thead>
                                                <tbody>
                                                    @if(@$list)
                                                    @foreach(@$list as $key=>$data)                                                    
                                                    <tr>                                                        
                                                        <td>{{$data->name}}</td>
                                                        <td>@if($data->status==0) Active @else Deactive @endif</td>
                                                        <td>{{ \Carbon\Carbon::parse($data->created_at)->format('d/m/Y h:i')}}</td>                                 
                                                        <td class="text-center align-middle">
                                                            <div class="btn-group align-top">
                                                                <a href="{{url('admin/updatefollowingservice/'.$data->id)}}"><button class="btn btn-sm btn-primary badge" data-target="#user-form-modal" data-bs-toggle="" type="button">Edit</button></a>
                                                                <a href="{{url('admin/deletefollowingservice/'.$data->id)}}"><button class="btn btn-sm btn-primary badge" type="button"><i class="fa fa-trash"></i></button></a>
                                                            </div>
                                                        </td>   
                                                    </tr>
                                                    @endforeach
                                                    @endif                                               
                                                    
                                                    
                                                   
                                                </tbody>
                                            </table>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div> -->
                        <!-- End Row -->

                        <!-- Row -->
                        <div class="row row-sm">
                            <div class="col-lg-12">
                                <div class="card">
                                    <div class="card-header">
                                        <h3 class="card-title">Following Service List</h3>
                                    </div>
                                    <div class="card-body">
                                        <a href="{{url('admin/createfollowingservices')}}"> <button id="table2-new-row-button" class="btn btn-primary mb-4"> Add New</button></a>
                                        <div class="table-responsive">
                                            <table class="table table-bordered text-nowrap border-bottom" id="responsive-datatable">
                                                <thead>
                                                    <tr>
                                                        <th class="wd-15p border-bottom-0">Name</th>
                                                        <th class="wd-15p border-bottom-0">Status</th>
                                                        <th class="wd-10p border-bottom-0">Created Date</th>
                                                        <th class="wd-25p border-bottom-0">Action</th>
                                                    </tr>
                                                </thead>
                                                <tbody>
                                                   
                                                     @if(@$list)
                                                    @foreach(@$list as $key=>$data)                                                    
                                                    <tr>                                                        
                                                        <td>{{$data->name}}</td>
                                                        <td>@if($data->status==0) <span class="badge bg-success-transparent rounded-pill text-success p-2 px-3">Active </span> @else <span class="badge bg-danger-transparent rounded-pill text-danger p-2 px-3">De-Active </span> @endif</td>
                                                        <td>{{ \Carbon\Carbon::parse($data->created_at)->format('d/m/Y h:i')}}</td>                                 
                                                        <td class="text-center align-middle">
                                                        <div class="btn-group align-top">
                                                            <a class="btn text-primary btn-sm" href="{{url('admin/updatefollowingservice/'.$data->id)}}"><span class="fe fe-edit fs-14" data-target="#user-form-modal" data-bs-toggle="" type="button">Edit</span></a>
                                                           <!--  <input type='button' class="btn btn-warning mt-2" value='Warning alert' id='click1'> -->
                                                            <a class="btn text-danger btn-sm" href="{{url('admin/deletefollowingservice/'.$data->id)}}"><span class="fe fe-trash-2 fs-14" type="button" data-bs-original-title="Delete"></span></a>
                                                        </div>
                                                        </td>   
                                                    </tr>
                                                    @endforeach
                                                    @endif   

                                                </tbody>
                                            </table>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                        <!-- End Row -->

        @endsection

    @section('scripts')

    <!-- Select2 js-->
    <script src="{{asset('assets/plugins/select2/select2.full.min.js')}}"></script>
    <script src="{{asset('assets/js/select2.js')}}"></script>

    <!-- DATA TABLE JS-->
    <script src="{{asset('assets/plugins/datatable/js/jquery.dataTables.min.js')}}"></script>
    <script src="{{asset('assets/plugins/datatable/js/dataTables.bootstrap5.js')}}"></script>
    <script src="{{asset('assets/plugins/datatable/js/dataTables.buttons.min.js')}}"></script>
    <script src="{{asset('assets/plugins/datatable/js/buttons.bootstrap5.min.js')}}"></script>
    <script src="{{asset('assets/plugins/datatable/js/jszip.min.js')}}"></script>
    <script src="{{asset('assets/plugins/datatable/pdfmake/pdfmake.min.js')}}"></script>
    <script src="{{asset('assets/plugins/datatable/pdfmake/vfs_fonts.js')}}"></script>
    <script src="{{asset('assets/plugins/datatable/js/buttons.html5.min.js')}}"></script>
    <script src="{{asset('assets/plugins/datatable/js/buttons.print.min.js')}}"></script>
    <script src="{{asset('assets/plugins/datatable/js/buttons.colVis.min.js')}}"></script>
    <script src="{{asset('assets/plugins/datatable/dataTables.responsive.min.js')}}"></script>
    <script src="{{asset('assets/plugins/datatable/responsive.bootstrap5.min.js')}}"></script>
    <script src="{{asset('assets/js/table-data.js')}}"></script>

    <!-- INTERNAL Edit-Table JS -->
   <!--  <script src="{{asset('assets/plugins/edit-table/bst-edittable.js')}}"></script>
    <script src="{{asset('assets/plugins/edit-table/edit-table.js')}}"></script> -->
    <script type="text/javascript">
    </script>
    @endsection
