@extends('admin.layouts.layout')
@section('content')
<h4>Editando Vacinação</h4>
<a href="{{route ('vacinacao.index')}}" class="btn btn-sm btn-block btn-outline-success">Ver todas</a>

@if($errors->any())

<div class="alert alert-danger">
    <ul>
        <h5><i class="icon fas fa-ban"></i> Ocorreu um erro</h5>
        @foreach($errors->all() as $error)
        <li>{{$error}}</li>
        @endforeach
    </ul>
</div>
@endif
<div class="card">
    <div class="card-body">
        <form action="{{route('vacinacao.update', ['vacinacao' => $vacinacao->id])}}" method="POST" class="form-horizontal" enctype="multipart/form-data">
            @method('PUT')
            @csrf
            <div class="box box-info">
                    <div class="row">
                        <div class="form-group col-md-3">
                            <label class="col-form-label">Data<span>*</span></label>
                            <input type="date" name="data" value="{{$vacinacao->data}}" class="form-control @error('data') is-invalid @enderror">
                        </div>

                        <div class="form-group col-md-2">
                            <label class="col-form-label">Hora<span>*</span></label>
                            <input type="time" name="hora" value="{{$vacinacao->hora}}" class="form-control @error('hora') is-invalid @enderror">
                        </div>


                    <div class="form-group col-md-2">
                        <label class="col-form-label">Enviadas<span>*</span></label>
                        <input type="text" name="enviadas" value="{{$vacinacao->enviadas}}" class="form-control @error('enviadas') is-invalid @enderror">
                    </div>

                    <div class="form-group col-md-2">
                        <label class="col-form-label">Vacinadas<span>*</span></label>
                        <input type="text" name="vacinadas" value="{{$vacinacao->vacinadas}}" class="form-control @error('vacinadas') is-invalid @enderror">
                    </div>

                    <div class="form-group col-md-3">
                        <label class="col-form-label">Disponíveis<span>*</span></label>
                        <input type="text" name="disponiveis" value="{{$vacinacao->disponiveis}}" class="form-control @error('disponiveis') is-invalid @enderror">
                    </div>

                    <div class="form-group col-md-12">
                        
                    </div>

                </div>

            <div class="form-group">
                <button type="submit" class="btn btn-outline-success btn-sm btn-block" name="form1">Gravar</button>
        </form>
    </div>
</div>
</div>
</div>
</div>
</div>
@endsection
