@extends('layout.app')
@section('title', $title)
@section('content')
    <div class="row">
        <div class="col-md-6">

            @if ($errors->any())
                <div class="alert alert-danger">
                    <ul>
                        @foreach ($errors->all() as $error)
                            <li>{{ $error }}</li>
                        @endforeach
                    </ul>
                </div>
            @endif
            <form action="{{ route('hitung.index') }}" method="POST">
                {{ csrf_field() }}
                <div class="mb-3">
                    <label>Awal <span class="text-danger">*</span></label>
                    <input class="form-control" type="date" name="awal" value="{{ old('awal', $awal) }}" />
                </div>
                <div class="mb-3">
                    <label>Akhir <span class="text-danger">*</span></label>
                    <input class="form-control" type="date" name="akhir" value="{{ old('akhir', $akhir) }}" />
                </div>
                <div class="mb-3">
                    <label>Level <span class="text-danger">*</span></label>
                    <select class="form-control" name="moving_periode">
                        <?= get_moving_periode(old('moving_periode')) ?>
                    </select>
                </div>
                <div class="mb-3">
                    <button class="btn btn-primary">Hitung</button>
                </div>
            </form>
        </div>
    </div>

@endsection
