<div class="modal fade" id="tambahKaryawan" tabindex="-1" role="dialog" aria-labelledby="tambahKaryawanTitle"
    aria-hidden="true">
    <div class="modal-dialog modal-dialog-scrollable modal-lg" role="document">
        <div class="modal-content">
            <div class="modal-header">
                <h5 class="modal-title" id="tambahKaryawanTitle">
                    Tambah Data KPI
                </h5>
                <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                    <span aria-hidden="true">&times;</span>
                </button>
            </div>
            <div class="modal-body">
                <?php echo form_open_multipart('manager/sistem/kpi_crud'); ?>
                <input type="hidden" name="<?= $this->security->get_csrf_token_name(); ?>"
                    value="<?= $this->security->get_csrf_hash(); ?>" style="display: none">
                <div class="form-group">
                    <label>Pilih Komponen Status</label>
                    <select class="form-control" id="komp_status" name="komp_status" onchange="showDiv(this)" required>
                        <option value="PILIH">Komponen Utama</option>
                        <?php foreach ($komponen as $Komponen) : ?>
                        <option value="<?= $Komponen->id ?>"><?= $Komponen->nm_komp ?></option>
                        <?php endforeach; ?>
                    </select>
                </div>
                <!-- Bagian Komponen -->
                <div class="form-group" id="select_nm_komp">
                    <label>Nama Komponen</label>
                    <input type="text" class="form-control" id="nm_komp" name="nm_komp"
                        placeholder="Masukkan Nama Komponen KPI">
                </div>
                <div class="form-group" id="select_ket_komp">
                    <label>Keterangan Komponen Baru</label>
                    <textarea name="ket_komp" id="ket_komp" class="form-control"
                        placeholder="Masukkan keterangan komponen KPI baru"></textarea>
                </div>
                <div class="form-group" id="select_pers_komp">
                    <label>Besar Kontribusi Komponen</label>
                    <input type="number" step="any" class="form-control" id="pers_komp" name="pers_komp"
                        placeholder="Masukkan jumlah kontribusi komponen KPI">
                </div>
                <!-- Bagian Faktor -->
                <div class="form-group">
                    <label>Nama Faktor KPI</label>
                    <input type="text" class="form-control" id="nm_faktor" name="nm_faktor"
                        placeholder="Masukkan Nama Faktor KPI" required>
                </div>
                <div class="form-group">
                    <label>Keterangan Faktor KPI Baru</label>
                    <textarea name="ket_faktor" id="ket_faktor" class="form-control"
                        placeholder="Masukkan keterangan faktor KPI baru" required></textarea>
                </div>
                <div class="form-group">
                    <label>Besar Kontribusi Faktor</label>
                    <input type="number" step="any" class="form-control" id="pers_faktor" name="pers_faktor"
                        placeholder="Masukkan jumlah kontribusi faktor KPI" required>
                </div>
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-outline-primary" data-dismiss="modal">
                    Close
                </button>
                <button type="submit" id="simpanKomponen" name="simpanKomponen" class="btn btn-primary">Simpan</button>
            </div>
            <?php echo form_close(); ?>
        </div>
    </div>
</div>
<?php $this->load->view('manager/sistem/kpi_marketing/script'); ?>