@extends('layouts.index')
@section('content')

<main class="main">
	<!-- loder -->
	  <div class="loader-wrapper">
		<div class="loader"></div>
		<div class="loder-section left-section"></div>
		<div class="loder-section right-section"></div>
	</div>

	<!--==================================================-->
	<!-- Start  Polytia Breadcumb Area -->
	<!--==================================================-->
	
	<!--==================================================-->
	<!-- End  Polytia Breadcumb Area -->
	<!--==================================================-->

	<!--==================================================-->
	<!-- Start charina donate section  -->
	<!--==================================================-->
	<div class="donate-section">
		<div class="container">
			<div class="row">
				<div class="col-lg-12">
					<div class="section-title text-center">
						<div class="section-main-title">
							<h1>FORMULAIRE DE RATTACHEMENT - CHAUFFEUR </h1>
						</div>
					</div> 
				</div>
			</div>
			<div class="row">
				<div class="col-lg-12">
					<!-- contact form box -->
					<div class="contact-form-box">
						@if ($message = Session::get('success'))
						<div class="alert alert-success alert-block">
							<button type="button" class="close" data-dismiss="alert">×</button>
							<strong>{{ $message }}</strong>
						</div>
						@endif
						<form action="{{ url('/lierchauffeur') }}" method="POST" id="dreamit-form">
							@csrf
							<div class="row">
								<div class="col-lg-6 col-md-6">
									<!-- from title -->
									<div class="form-title">
										<h6><b>Chauffeur</b><b style="color : red">* :</b></h6>
									</div>
									<div class="form-box up">
										 <select class="form-select" name="chauffeur" aria-label="Default select example">
                                            <option selected>Choisir Ici</option>
                                            @foreach($allChauffeurs as $chauffeur)
                                                <option value="{{$chauffeur->id }}">{{ $chauffeur->personne->nom }} - {{ $chauffeur->personne->prenom }}</option>
                                            @endforeach
                                        </select>
									</div>
								</div>
								<div class="col-lg-6 col-md-6">
									<!-- from title -->
									<div class="form-title">
										<h6><b>Véhicules </b><b style="color : red">* :</b></h6>
									</div>
									<div class="form-box up">
										<select class="form-select" name="vehicule" aria-label="Default select example">
                                            <option selected>Choisir Ici</option>
											@foreach($allVehicules as $vehicule)
												<option value="{{$vehicule->id }}">{{ $vehicule->num_chassi}}</option>
											@endforeach
										</select>
									</div>
								</div>
								<div class="col-lg-6 col-md-6">
									<!-- from title -->
									<div class="form-title">
										<h6><b>Date Début </b><b style="color : red">* :</b></h6>
									</div>
									<div class="form-box up">
										<input type="date" name="dayDeb" placeholder="Votre Date Début">
									</div>
								</div>
								<div class="col-lg-6 col-md-6">
									<!-- from title -->
									<div class="form-title">
										<h6><b>Date Fin: </b><b style="color : red">* :</b></h6>
									</div>
									<div class="form-box up">
										<input type="date" name="dayFin" placeholder="otre Date Fin">
									</div>
								</div>
								<div class="col-lg-6 col-md-6">
									<!-- from title -->
									<div class="form-title">
										<h6><b>Remarque :</b> </h6>
									</div>
									<div class="form-box up">
										<input type="text" name="remarque" placeholder="Votre Remarque">
									</div>
								</div>

								<div class="col-lg-6 col-md-6">
									<!-- from title -->
									<div class="form-title">
										<h6><b>CODE USER </b><b style="color : red">* :</b></h6>
									</div>
									<div class="form-box up">
										<input type="text" name="user_code"  placeholder="Votre Code">
									</div>
								</div>
							</div>

							<div class="campaigns-button pt-3">
								<button>Valider</button>
							</div>
						</form>
						<div id="status"></div>
					</div> 					
				</div>
			</div>
		</div>
	</div>
	<!--==================================================-->
	<!-- End charina donate Secton -->
	<!--==================================================-->
</main>

@endsection