@extends('layouts.config_dashboard.app')

@section('content')
    <div class="container-fluid ">
        @if ($rdv->status_rendezvous_id == 2)
        <div class="row">
            <div class="col-12 mb-2 mt-2">
                <form action="{{ route('RendezVous.update', $rdv->id) }}" method="POST">
                    @csrf
                    @method('PUT')
                    <div style="float: left" class="page-title-box">
                        <button name="action" type="submit" value="annuler" class="btn btn-danger"> Annuler </button>
                    </div>
                    <div style="float: right" class="page-title-box">
                        <button name="action" type="submit" value="terminer" class="btn btn-success"> Terminer </button>
                    </div>
                </form>
            </div>
        </div>
         @endif
        <div class="row">
            <div class="col-12">
                <div class="card">
                    <div class="card-body">
                        <div class="table-responsive">
                            <table class="table" id="myTable">
                                <thead>
                                    <tr>
                                        <th>Id</th>
                                        <th>Ref Dossier</th>
                                        <th>Motif</th>
                                        <th>Type</th>
                                        <th>Status</th>
                                    </tr>
                                </thead>
                                <tbody>
                                    <tr>
                                        <td>{{ $rdv->id }}</td>
                                        <td>{{ $rdv->ref }}</td>
                                        <td>{{ $rdv->motif }}</td>
                                        <td>{{ $rdv->typerendezvous->type }}</td>
                                        <td> <span
                                                class="badge bg-{{ $rdv->statusrendezvous->color }}">{{ $rdv->statusrendezvous->status }}</span>
                                        </td>

                                    </tr>

                                </tbody>
                            </table>
                        </div>
                    </div>
                </div>

            </div>
        </div>
    </div>
@endsection
