<script type="text/javascript">

$('#id_karyawan').select2({
    placeholder: 'Pilih Karyawan',
    allowClear: true,
    ajax: {
      // type: 'POST',
        url: '<?= route("dropdown.karyawan") ?>',
        dataType: 'json',
        delay: 250,
        processResults: function (data) {
        return {
                results: data
            };
        },
        cache: false
    },
    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>
    <input type="hidden" id="id_notification" class="form-control" value="<?= ((isset($data))?md5($data->id_notification):'') ?>">
    <div class="form-group">
        <label>Karyawan <i class="text-danger">*</i></label>
         <select class="form-control" name="id_karyawan" id="id_karyawan" class="select2 form-control" style="border-radius: 5px; width: 100%;">
            <option value="<?=$data->id_karyawan?>" selected><?= $data->nik.' - '.$data->nama_lengkap?></option>
        </select>
    </div>
        
     <div class="row">
        <div class="col-md-12">
            <label>Hak Akses <i class="text-danger">*</i></label>
            <div class="row">
                <div class="col-md-6">
                    <input type="radio" id="hrd" name="hak_akses" value="1" checked="true" <?php if($data->notif_hrd=="1"){ echo "checked";}?>>
                    <label for="hrd">Notif HRD</label>
                </div>
                <div>
                    <input type="radio" id="finance" name="hak_akses" value="2" <?php if($data->notif_finance=="1"){ echo "checked";}?>>
                    <label for="finance">Notif Finance</label>
                </div>
            </div>
        </div> 
    </div> 
</div>
<div class="card-footer">
    <div class="row">
        <div class="col-md-7 text-left">
            <div id="message"></div>
        </div>
        <div class="col-md-5 text-right">
            <button id="btn_new_input" class="btn" style="display:none">TAMBAH BARU</button>
            <button class="btn_save ladda-button" data-style="expand-left"></button>
        </div>
    </div><!-- ./row -->
</div>

