@extends('layouts.app')

@section('content')
    
<div class="container-fluid">
    <div class="row">
        <div class="col">
            @if ($errors->any())
                <div class="alert alert-danger">
                    <ul>
                        @foreach ($errors->all() as $error)
                            <li>{{ $error }}</li>
                        @endforeach
                    </ul>
                </div>
            @endif
        </div>
    </div>
    <div class="row">
        <div class="col-md-12">
            <div class="card" id="formEntreprise">
                <div class="card-header">
                    <h4 class="card-title">Informations générales</h4>
                </div>
                <div class="card-body">
                    <form method="post" action="{{route('infos-generales.store')}}">
                        @csrf
                        <div class="row">
                            <div class="col-md-4 ">
                                <div class="form-group">
                                    <label>Numéro FNAIM de l'agence</label>
                                    <input type="number" name="adh_num" class="form-control">
                                </div>
                            </div>
                            <div class="col-md-4">
                                <div class="form-group">
                                    <label>Numéro de l'affaire</label>
                                    <input type="number" name="aff_num" class="form-control" required>
                                </div>
                            </div>
                            <div class="col-md-4">
                                <div class="form-group">
                                    <label>Date de création de l'affaire</label>
                                    <input type="date" name="date_creation" class="form-control" required>
                                </div>
                            </div>
                        </div>

                        <div class="row">
                            <div class="col-md-3 mt-auto">
                                <div class="form-group">
                                    <label>Jour de la transaction</label>
                                    <input type="date" name="date_modification" class="form-control" required>
                                </div>
                            </div>
                            <div class="col-md-3 mt-auto">
                                <div class="form-group">
                                    <label>Date de validité du mandat</label>
                                    <input type="date" name="date_echeance" class="form-control" required>
                                </div>
                            </div>
                            <div class="col-md-3 mt-auto">
                                <div class="form-group">
                                    <label for="">Afficher cette affaire sur internet</label>
                                    <select name="transfert_public" id="" class="form-control" required>
                                        <option value="1">Oui</option>
                                        <option value="0">Non</option>
                                    </select>
                                </div>
                            </div>
                            <div class="col-md-3">
                                <div class="form-group">
                                    <label for="">Toutes les agences du groupement peuvent accéder à l’offre</label>
                                    <select name="visible_toutes_agences" id="" class="form-control">
                                        <option value="1">Oui</option>
                                        <option value="0">Non</option>
                                    </select>
                                </div>
                            </div>
                        </div>

                        <input type="text" hidden="" name="bien_id" value="{{ $bien->id }}">

                        <button type="submit" class="btn btn-info btn-fill pull-right">Etape suivante</button>
                        <div class="clearfix"></div>
                    </form>
                </div>
            </div>
        </div>
    </div>
</div>

@endsection