@extends('app')
@section('title', 'Raport Trimestriel')
@section('link')
<!-- Data Table Css -->
<link rel="stylesheet" href="{{asset('bower_components/datatables.net-bs4/css/dataTables.bootstrap4.min.css')}}">
<link rel="stylesheet" href="{{asset('assets/pages/data-table/css/buttons.dataTables.min.css')}}">
<link rel="stylesheet" href="{{asset('bower_components/datatables.net-responsive-bs4/css/responsive.bootstrap4.min.css')}}">
<style>
    .btn.btn-icons {
        border-radius: 50%;
        width: 25px;
        line-height: 15px;
        height: 25px;
        padding: 2px;
        text-align: center;
    }
    .btn.btn-icons i{
        font-size: 11px;
        margin: 0px auto
    }
    
    .dataTables_length label{
        display: none;
    }
</style>
@endsection
@section('content')
<div class="pcoded-inner-content">
    @include('includes._alert')
    <div class="main-body">
        <div class="page-wrapper">
            <div class="page-body">
                <div class="row">
                    <div class="col-sm-12">
                        <div class="card">
                            <div class="card-header mb-0 pb-0">
                                <div class="d-flex justify-content-between">
                                    <h4>Raport Trimestriel</h4>
                                    <span>
                                        <strong style="font-size: 20px">{{ $year->school_year }}</strong>
                                    </span>
                                </div>
                            </div>
                            <hr class="my-0 mx-3">
                            <div class="card-block pt-3">
                                <div class="dt-responsive table-responsive">
                                    <table id="myTable" class="table table-striped table-bordered nowrap" style="width: 100%">
                                        <thead>
                                            <tr>
                                                <th style="width: 25%"></th>
                                                <th class="text-center" style="width: 25%">Libelle</th>
                                                <th class="text-center" style="width: 25%">Status</th>
                                                <th class="text-center" style="width: 25%">Actions</th>
                                            </tr>
                                        </thead>
                                        <tbody>
                                            @php $i = 1; @endphp
                                            @foreach ($cutting as $item)
                                            <tr>
                                                <th class="text-center">{{$i <= 9 ? '0'.$i++:$i++}}</th>
                                                <td class="text-center">{{ ucfirst($item->cutting->libelle) }}</td>
                                                <td class="text-center">{{ ucfirst('Inactif') }}</td>
                                                <td style="width: 20%" class="text-center">
                                                    <span class="card-block remove-label m-0 p-0 text-center">
                                                        <a href="{{ route('trimestriel.show', $item->id) }}" class="btn btn-inverse btn-outline-inverse btn-icons mr-2 pb-2" title="Edit">
                                                            <i class="fas fa-edit m-0"></i>
                                                        </a>
                                                        <a href="{{ route('trimestriel.pdf', $item->id) }}" target="_blank" class="btn btn-inverse btn-outline-inverse btn-icons pb-2" title="Get Doc" >
                                                            <i class="fa fa-download m-0"></i>
                                                        </a>
                                                    </span>
                                                </td>
                                            </tr>
                                            @endforeach
                                        </tbody>
                                    </table>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
@endsection
@section('script')
    <script src="{{asset('bower_components/datatables.net/js/jquery.dataTables.min.js')}}"></script>
    <script src="{{asset('assets/pages/data-table/extensions/autofill/js/dataTables.autoFill.min.js')}}"></script>
    <script src="{{asset('assets/pages/data-table/js/dataTables.bootstrap4.min.js')}}"></script>
    <script src="{{asset('bower_components/datatables.net-responsive/js/dataTables.responsive.min.js')}}"></script>
    <script src="{{asset('bower_components/datatables.net-responsive-bs4/js/responsive.bootstrap4.min.js')}}"></script>
    <!-- Custom js -->
    <script src="{{asset('assets/pages/data-table/extensions/colreorder/js/colreorder-custom.js')}}"></script>
    <script src="{{asset('assets/js/pcoded.min.js')}}"></script>
    <script src="{{asset('assets/js/vartical-layout.min.js')}}"></script>
    <script src="{{asset('assets/js/jquery.mCustomScrollbar.concat.min.js')}}"></script>

    <script>
        $(document).ready(function() {

            $('#myTable').DataTable({ ordering: false });

        })
    </script>
@endsection