@extends('layouts.appadmin')



<link rel="stylesheet" type="text/css" href="https://cdn.datatables.net/datetime/1.5.1/css/dataTables.dateTime.min.css">
@section('content')

  <!-- Content Wrapper. Contains page content -->
  <div class="content-wrapper">
    <!-- Content Header (Page header) -->
    <div class="content-header">
      <div class="container-fluid">
        <div class="row mb-2">
          <div class="col-sm-6">
            <h1 style="color: blue;font-weight: bold;">Reglement</h1>
            @if(session('success'))
    <div class="alert alert-success alert-dismissible fade show" role="alert">
        {{ session('success') }}
        <button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="Close"></button>
    </div>
@endif

@if(session('error'))
    <div class="alert alert-danger alert-dismissible fade show" role="alert">
        {{ session('error') }}
        <button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="Close"></button>
    </div>
@endif

 

          </div><!-- /.col -->
          <div class="col-sm-6">
            <ol class="breadcrumb float-sm-right">

            </ol>
          </div><!-- /.col -->
        </div><!-- /.row -->
      </div><!-- /.container-fluid -->
    </div>
    <!-- /.content-header -->

    <section class="content">
      <div class="row">
        <div class="col-12">
          <div class="card">
    
          <div class="card-header  bg-info">
          <div class="col-md-3 font-success-bold"><i class="fas fa fa-users"></i>  reglements
     </div>
      
            </div>  

                    <div class="card">
        
              <!-- /.card-header -->
              <div class="card-body">
    

             
              <div class="table-responsive">
            <table  class="table table-bordered display nowrap" cellspacing="0" width="100%"data-order='[[ 0, "desc" ]]'>           
                <thead>
                  
                <tr>
               
                <th style="color: blue;font-weight: bold;">Ref</th>
                <th style="color: blue;font-weight: bold;">nom client</th>
            
                   <th style="color: blue;font-weight: bold;">montant</th>
               <th style="color: blue;font-weight: bold;">date</th>
                </tr>
                </thead>
                <tbody>
                    @foreach($reglements as $reglement)
                    <tr>
                    <td> {{$reglement->id}} </td>
                  
             <td> {{ $reglement->client->nom }}</td>
                <td> {{$reglement->montant}}DH </td>
             <td> {{$reglement->created_at}}</td>
        
          
   
             
             @endforeach
          </tbody>
      
        </table>
        <div class="d-flex justify-content-center mt-4">
          {{ $reglements->links('pagination::bootstrap-4') }}
      </div>
              </div>
              <!-- /.card-body -->
            </div>
            <!-- /.card -->
          </div>
          <!-- /.col -->
        </div>
        <!-- /.row -->
      </div>
      <!-- /.container-fluid -->
    </section>
    <!-- /.content -->
  </div>

</div></div>
<!-- ./wrapper -->

@endsection
<!-- jQuery -->

<script src="{{asset('dash/plugins/jquery/jquery.min.js')}}"></script>

<script src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.29.2/moment.min.js"></script>




</body>
</html>
