<script type="text/javascript">
    $(document).ready(function() {
        $('#form_input #id_atasan').select2({
            placeholder: 'Pilih Approver',
            ajax: {
                // type: 'POST',
                url: '<?= route("dropdown.karyawan.aktif.skor") ?>',
                dataType: 'json',
                delay: 250,
                processResults: function(data) {
                    return {
                        results: data
                    };
                },
                cache: true
            },
            minLength: 3,
        });

        $('#form_input #id_karyawan').select2({
            placeholder: 'Karyawan',
            ajax: {
                // type: 'POST',
                url: '<?= route("dropdown.karyawan.approver.kpi") ?>',
                dataType: 'json',
                delay: 250,
                processResults: function(data) {
                    return {
                        results: data
                    };
                },
                cache: true
            },
            minLength: 3,
        });
    });
</script>

<div class="card-header">
    <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
    <h3 class="title modal-title"></h3>
</div>
<div id="form_input" class="card-body" disabled>

    <div class="form-group">
        <label>Karyawan <i class="text-danger">*</i></label>
        <select id="id_karyawan" class="form-control select2" style="width:100%">
        </select>
    </div>

    <div class="form-group">
        <label>Approver <i class="text-danger">*</i></label>
        <select id="id_atasan" class="form-control select2" style="width:100%">
        </select>
    </div>
</div>
<div class="card-footer">
    <div class="row">
        <div class="col-md-6 text-left">
            <div id="message"></div>
        </div>
        <div class="col-md-6 text-right">
            <button id="btn_new_input" class="btn" style="display:none" onclick="new_input(this)">TAMBAH BARU</button>
            <button class="btn_save ladda-button" data-style="expand-left"></button>
        </div>
    </div>
</div>
