@extends('layouts.idara.panel')


@section('content')

<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.6.3/jquery.min.js" integrity="sha512-STof4xm1wgkfm7heWqFJVn58Hm3EtS31XFaagaa8VMReCXAkQnJZ+jEy8PCC/iT18dFy95WcExNHFTqLyp72eQ==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>

<script src="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-toggle/2.2.2/js/bootstrap-toggle.min.js" integrity="sha512-F636MAkMAhtTplahL9F6KmTfxTmYcAcjcCkyu0f0voT3N/6vzAuJ4Num55a0gEJ+hRLHhdz3vDvZpf6kqgEa5w==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>

<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-toggle/2.2.2/css/bootstrap-toggle.min.css" integrity="sha512-hievggED+/IcfxhYRSr4Auo1jbiOczpqpLZwfTVL/6hFACdbI3WQ8S9NCX50gsM9QVE+zLk/8wb9TlgriFbX+Q==" crossorigin="anonymous" referrerpolicy="no-referrer" />
@include('backend.partials.import')

<section style="margin-bottom: 44px;">

    <div class="card">
        <div class="card-header">
            Demande de devis
        </div>
        <div class="card-body">

            <a href="<?php echo $_SERVER["REQUEST_URI"]; ?>" class="btn btn-secondary"><i class="fa-solid fa-arrows-rotate"></i>Actualiser</a>



        </div>
    </div>
</section>

<section>
    <div class="card">
        <div class="card-header">
            Demande de Devis
        </div>
        <div class="card-body">

            <div class="table-responsive">
                <table class="table table-bordered">
                    <thead>
                        <tr>
                            <th scope="col">Objet</th>
                            <th scope="col">Nom</th>
							 <th scope="col">Date</th>
                            <th scope="col">Action</th>

                        </tr>
                    </thead>
                    <tbody>
                        @foreach($devis as $devi)


                        <tr>
                            <th scope="row">

                                {{$devi->objet}}

                            </th>
                            <th>

                                {{$devi->nom}}


                            </th>
                                <th>

                                {{$devi->created_at}}


                            </th>
                            <th scope="row" class="buttonOffOut">


                                <div>

                                    <form method="POST" action="{{ url('/delete/demande/'. $devi->id) }}">
                                        @csrf
                                        <a class="btn btn-primary" href="{{route('demande.show',['id'=>$devi->id])}}">Details</a>

                                        <input name="_method" type="hidden" value="DELETE">
                                        <Tooltip title="Supprimer"> <button type="submit" class="btn btn-xs btn-danger btn-flat show_confirm" data-toggle="tooltip" ref="{{ url('/delete/demande/'.$devi->id) }}">delete</button></Tooltip>



                                    </form>





                                </div>

                            </th>
                        </tr>

                        @endforeach
                    </tbody>
                </table>
                {!! $devis->links() !!}


            </div>


        </div>
    </div>
</section>

@endsection
