@extends('admin.layouts.layout')

@section('title', 'Adicionando novo Benefício')
@section('content')
<div class="container-fluid">
    <div class="card shadow mb-4">
        <div class="card-header py-3">
            <h5 class="m-0 font-weight-bold text-primary">Cadastrando Benefício</h5>
            <small>Cadastrando Benefício no Sistema</small>
            <a class="btn btn-outline-primary btn-block d-grid gap-2" type="button"
                href="{{ route('beneficios.index') }}" role="button">Ver todos</a>
        </div>
        <div class="card">
            <div class="card-body">

                <!-- Form -->
                <form method="POST" action="{{ route('beneficios.store') }}">
                    @csrf
                    <div class="row">
                        <div class="form-group col-md-2">
                            <label class="form-label">Data de Cadastro</label>
                            <input type="date" class="form-control @error('data_cadastro') is-invalid @enderror"
                                name="data_cadastro" value="{{ old('data_cadastro') }}">
                        </div>
                        <div class="form-group col-md-10">
                            <label class="form-label">Nome do Benefício</label>
                            <input type="text" class="form-control @error('nome_beneficio') is-invalid @enderror"
                                name="nome_beneficio" value="{{ old('nome_beneficio') }}"
                                placeholder="Nome do Benefício">
                        </div>
                    </div>
                    <div class="row">
                        <div class="form-group col-md-6">
                            <label class="form-label">Secretaria</label>
                            <select class="form-control" name="" id="">
                                <option value="">Selecione</option>
                            </select>
                        </div>
                        <div class="form-group col-md-6">
                            <label class="form-label">Programa</label>
                            <select class="form-control" name="" id="">
                                <option value="">Selecione</option>
                            </select>
                        </div>
                    </div>
                    <div class="row">
                        <div class="form-group col-md-6">
                            <label class="form-label">Meta atual</label>
                            <input type="text" class="form-control @error('meta_atual') is-invalid @enderror"
                                name="meta_atual" value="{{ old('meta_atual') }}" placeholder="0" disabled>
                        </div>
                        <div class="form-group col-md-6">
                            <label class="form-label">Meta Objetivo</label>
                            <input type="text" class="form-control @error('meta_objetivo') is-invalid @enderror"
                                name="meta_objetivo" value="{{ old('meta_objetivo') }}">
                        </div>
                    </div>
                    <div class="d-grid gap-2">
                        <br>
                        <button type="submit" class="btn btn-outline-success btn-block">Gravar</button>
                    </div>
                </form>
            </div>
        </div>
    </div>
</div>

@endsection
