@extends('layouts.app')

@section('headerScripts')
<script src="{{ asset('js/indicatorEntries.js') }}" type="text/javascript"></script>
@endsection

@section('content')


<div class="page-title">
    <div class="row">
        <div class="col-12 col-md-6 order-md-1 order-last">
            <h3>Agregar informacion de indicadores</h3>
        </div>

    </div>
</div>
<section class="section">
    <div class="card">

        <div class="card-body">


            <div class="row mb-3">
                <div class="col-md-2">
                    <label for="indicator_id" class="col-form-label text-md-end">Indicador</label>
                </div>

                <div class="col-md-4">

                    <select id="indicator_id" class="form-control">
                        <option value="">-- Seleccionar indicador --</option>
                        @foreach($indicators as $indicator)
                        <option value="{{ $indicator->indicator_id }}">{{ $indicator->name }}</option>
                        @endforeach
                    </select>

                </div>
                <div class="col-md-2">
                    <button class="btn btn-primary" onclick="return addIndicatorEntry();">Agregar indicador</button>
                </div>
            </div>

            <div class="row mb-3">
                <div class="col-md-2">
                    <label for="selected_year" class="col-form-label text-md-end">Año</label>
                </div>

                <div class="col-md-4">

                    <select id="selected_year" class="form-control">
                        @foreach($years as $year)
                        <option value="{{ $year }}" {{ $year == $currentYear ? 'selected' : '' }}>{{ $year }}</option>
                        @endforeach
                    </select>

                </div>
            </div>


            <div id="indicatorEntries">

            </div>

        </div>
    </div>
</section>

@endsection