Esempio n. 1
0
 public function registrasi()
 {
     $this->config->load('grocery_crud');
     $this->config->set_item('grocery_crud_file_upload_allow_file_types', 'pdf');
     $this->config->set_item('grocery_crud_file_upload_max_file_size', '200KB');
     $c = new grocery_crud();
     $c->set_table('registrasi');
     // $c->unset_back_to_list();
     $c->unset_edit();
     //$c->unset_delete();
     $c->unset_read();
     $c->unset_list();
     if ($this->uri->segment(2) == 'registrasi' && $this->uri->segment(3) == NULL) {
         redirect($this->router->fetch_class() . '/' . $this->router->fetch_method() . '/add');
     }
     $c->set_rules('email', 'Email', 'required|valid_email');
     // unset field
     //        $c->unset_fields('tanggal_member', 'pengajuan', '');
     $c->unset_fields('tanggal_member', 'pengajuan', 'file_surat_pernyataan');
     $c->field_type('deskripsi_perusahaan', 'text');
     $c->field_type('alamat', 'text');
     $c->callback_add_field('syarat_ketentuan', function () {
         return '<input type="radio" maxlength="50" value="1" name="syarat_ketentuan">&nbsp;&nbsp;Dengan mencetang tanda ini berarti Anda telah menyetujui syarat & ketentuan yang berlaku';
     });
     $c->display_as('surat_ket_domisili', 'Nomor Surat Keterangan Domisili');
     $c->display_as('siup', 'Nomor SIUP/Perizinan Lainnya');
     $c->display_as('npwp', 'Nomor NPWP');
     $c->display_as('file_siup', 'SIUP/Perizinan Lainnya');
     $c->display_as('file_surat_ket_domisili', 'Surat Keterangan Domisili');
     $c->unset_texteditor('deskripsi_perusahaan', 'full_text');
     $c->unset_texteditor('alamat', 'full_text');
     $this->load->config('grocery_crud');
     $this->config->set_item('grocery_crud_file_upload_allow_file_types', 'pdf');
     $c->set_field_upload('file_surat_ket_domisili', 'assets/uploads/file_register');
     $c->set_field_upload('file_siup', 'assets/uploads/file_register');
     $c->required_fields('syarat_ketentuan', 'nama_perusahaan', 'direktur_utama', 'contact_person', 'email', 'alamat', 'provinsi', 'kota', 'npwp', 'akte_perusahaan', 'siup', 'file_akte', 'file_siup');
     $c->set_relation('kota', 'ref_kota', 'kota');
     $c->set_relation('provinsi', 'ref_provinsi', 'provinsi');
     $c->callback_field('email', function ($value, $row) {
         return '<input type="text" value="' . $value . '" name="email" id="field-email"> <span style="color:red; font-size:10px">*) Pastikan alamat email yang Anda masukkan valid</span>';
     });
     //$c->callback_insert(array($this, 'after_registrasi'));
     if ($this->uri->segment(3) == 'success') {
         redirect('umum/after_registrasi');
     }
     $output = $c->render();
     $state = $c->getState();
     $state_info = $c->getStateInfo();
     $this->logs();
     $this->load->view('umum/registrasi', $output);
 }
Esempio n. 2
0
 public function pelaporan_periodik($permohonan = NULL)
 {
     # code...
     $c = new grocery_crud();
     $c->set_table('pelaporan_periodik');
     $c->set_field_upload('file_pelaporan_periodik', 'assets/uploads/file_pelaporan_periodik');
     $c->columns('semester', 'file_pelaporan_periodik');
     $c->fields('semester', 'id_permohonan', 'file_pelaporan_periodik');
     $c->field_type('id_permohonan', 'hidden', $permohonan);
     $c->where('id_permohonan', $permohonan);
     $c->set_relation('semester', 'ref_semester', 'semester');
     $output = $c->render();
     $this->logs();
     view('level1/view_list', $output);
     if ($c->getState() != 'add') {
         $c->change_field_type('semester', 'readonly');
     }
     // if ($c->getState() != 'list') {
     //     // $this->menej_ref($output);
     // } else {
     //     return $output;
     // }
 }
Esempio n. 3
0
 public function pelaporan_periodik()
 {
     $c = new grocery_crud();
     $c->set_table('pelaporan_periodik');
     $permohonan = $this->session->userdata('id_permohonan');
     $c->unset_delete();
     $c->unset_read();
     $c->unset_print();
     $c->unset_export();
     $c->unset_mytools();
     $c->set_field_upload('file_pelaporan_periodik', 'assets/uploads/file_pelaporan_periodik');
     $c->columns('semester', 'file_pelaporan_periodik', 'status_laporan');
     $c->fields('semester', 'id_permohonan', 'file_pelaporan_periodik', 'id_evaluator', 'id_perusahaan', 'status_laporan', 'create_at', 'catatan_evaluator');
     $c->field_type('id_permohonan', 'hidden', $permohonan);
     $c->field_type('id_perusahaan', 'hidden', $this->session->userdata('id_perusahaan'));
     $c->field_type('status_laporan', 'hidden', '1');
     $c->field_type('create_at', 'hidden', strftime('%Y-%m-%d'));
     $c->field_type('catatan_evaluator', 'hidden');
     $c->callback_after_update(function ($post_array, $primary_key) {
         $this->db->update('pelaporan_periodik', array('catatan_evaluator' => NULL), array('id_pelaporan_periodik' => $primary_key));
         return TRUE;
     });
     $c->callback_column('status_laporan', function ($value, $row) {
         if ($value == 1) {
             return 'Diajukan';
         } elseif ($value == 2) {
             return 'Revisi | <a class="link-pilih" title="Edit data" href="' . base_url() . 'perusahaan/pelaporan_periodik/edit/' . $row->id_pelaporan_periodik . '"><img class="mybtn-edit"></a>';
         } elseif ($value == 3) {
             return 'Disetujui';
         } elseif ($value == 4) {
             return 'Ditolak';
         }
     });
     $c->where('id_permohonan', $permohonan);
     $c->set_relation('semester', 'ref_semester', 'semester', array('is_delete' => 0));
     $sl_permohonan = select('user_tujuan', 'disposisi', array('id_permohonan' => $permohonan, 'status_progress' => 8), array('id_disposisi', 'DESC'));
     $smohon = select('*', 'users', array('id_user' => $sl_permohonan->user_tujuan, 'level' => 6));
     //$retVal = ($smohon) ? $smohon->id_user : 0 ;
     $c->field_type('id_evaluator', 'hidden', $smohon->id_user);
     $output = $c->render();
     $this->logs();
     $level = $this->session->userdata('level');
     $status = $this->session->userdata('status_lap_periodik');
     if ($level != NULL) {
         if ($level == 1 && $status == 1) {
             $this->load->view('level1/view_list', $output);
         } else {
             redirect('all_users/dashboard');
         }
     } elseif ($level == NULL) {
         redirect('umum/logout');
     }
     if ($c->getState() != 'add') {
         $c->change_field_type('semester', 'readonly');
         if ($c->getState() == 'success') {
             redirect('perusahaan/pelaporan_periodik');
         }
     }
 }
Esempio n. 4
0
 public function konsep_dokumen_skt($da = NULL, $id = NULL)
 {
     $this->load->config('grocery_crud');
     $this->config->set_item('grocery_crud_file_upload_allow_file_types', 'pdf|doc|docx');
     $dap = $this->model->select('id_perusahaan', 'disposisi', array('id_disposisi' => $this->uri->segment(4)));
     $c = new grocery_crud();
     $c->set_table('dokumen_skt');
     $c->unset_fields('no_dokumen', 'deskripsi', 'mulai_masa_berlaku', 'akhir_masa_berlaku', 'id_permohonan', 'status');
     $c->set_field_upload('file_dokumen', 'assets/uploads/file_skt');
     if ($dap != NULL) {
         $dap = $dap->id_perusahaan;
     } else {
         $dap = '';
     }
     $c->field_type('id_perusahaan', 'hidden', $dap);
     $output = $c->render();
     $state = $c->getState();
     $state_info = $c->getStateInfo();
     if ($state == 'success') {
         redirect(site_url('all_admin/daftar_semua_pengajuan_skt'));
     }
     $level_user = $this->session->userdata('level');
     $this->load->view('level' . $level_user . '/view_list', $output);
 }
Esempio n. 5
0
    public function laporan_berkala_kasie()
    {
        $this->config->load('grocery_crud');
        $this->config->set_item('grocery_crud_dialog_forms', true);
        $this->config->set_item('grocery_crud_default_per_page', 10);
        $this->load->config('grocery_crud');
        $c = new grocery_crud();
        $c->set_table('pelaporan_periodik');
        $c->where('id_kasie', $this->session->userdata('id_user'));
        $c->where('status_laporan', 1);
        $c->or_where('id_kasie', NULL);
        $c->or_where('status_laporan', 2);
        $c->columns('id_perusahaan', 'no_skt', 'bidang_usaha', 'semester', 'file_pelaporan_periodik', 'catatan_evaluator', 'status_laporan', 'aksi');
        $c->field_type('id_permohonan', 'hidden');
        $c->field_type('id_kasie', 'hidden', $this->session->userdata('id_user'));
        $c->set_relation('id_perusahaan', 'biodata_perusahaan', 'nama_perusahaan');
        $c->set_relation('id_evaluator', 'users', 'nama_lengkap', array('level' => 6));
        $c->fields('file_pelaporan_periodik', 'id_permohonan', 'semester', 'id_perusahaan', 'id_kasie', 'id_evaluator');
        $c->required_fields('file_pelaporan_periodik', 'id_permohonan', 'semester', 'id_perusahaan', 'id_kasie', 'id_evaluator');
        $c->edit_fields('id_evaluator', 'id_kasie', 'skrip');
        $c->set_field_upload('file_pelaporan_periodik', 'assets/uploads/file_pelaporan_periodik');
        $c->unset_delete();
        //$c->unset_edit();
        //$c->unset_read();
        $c->unset_add();
        $c->unset_export();
        $c->unset_print();
        $c->callback_field('skrip', function ($value, $row) {
            return '<script>
    $("#skrip_display_as_box").remove();

    $("div.crud-form div.mDiv div.ftitle").remove();
    $(".ptogtitle").remove();
    $(".pDiv").css("border", "none");
    $(".form-div").css("border", "none");
    $(".ui-dialog-content").dialog( "option", "height", 250 );
    $(".ui-dialog-content").dialog( "option", "width", 650 );
    $("#save-and-go-back-button").attr("value", "Submit");
    $("#form-button-save").remove();
    $("#cancel-button").remove();
</script>';
        });
        $c->unset_mytools();
        $c->callback_column('aksi', function ($value, $row) {
            return '<div style="text-align:center; margin: 0px !important"><a class="link-pilih  edit-anchor edit_button" title="Lihat Catatan Evaluator" href="' . base_url() . 'all_admin/lihat_catatan_evaluator/read/' . $row->id_pelaporan_periodik . '">Detail Evaluasi</a> | <a class="link-pilih edit-anchor edit_button" title="Tugaskan evaluator" href="' . base_url() . 'all_admin/laporan_berkala_kasie/edit/' . $row->id_pelaporan_periodik . '">Tugaskan</a> | <a class="link-pilih" title="Lihat detail laporan" href="' . base_url() . 'all_admin/detail_perusahaan/laporan_berkala_kasie/' . $row->id_permohonan . '">Lihat detail </a><hr style="margin: 6px 0px 6px 0px; border: 0; border-top: 1px solid #BDC3C7;"/>
    <a class="link-pilih" title="Revisi laporan" href="' . base_url() . 'all_admin/aksi_kasie/revisi/' . $row->id_pelaporan_periodik . '">Revisi</a> | <a class="link-pilih" title="Terima Laporan" href="' . base_url() . 'all_admin/aksi_kasie/terima/' . $row->id_pelaporan_periodik . '">Terima</a> | <a class="link-pilih" title="Tolak Laporan" href="' . base_url() . 'all_admin/aksi_kasie/tolak/' . $row->id_pelaporan_periodik . '">Tolak</a></div>';
        });
        $c->callback_column('status_laporan', function ($value, $row) {
            if ($value == 1 && $row->id_evaluator != NULL && $row->catatan_evaluator == NULL) {
                return '<span style="background-color:#F7CA18; color:#fff; border-radius:3px; padding: 0px 2px 0px 2px;">Belum Dievaluasi</span>';
            } elseif ($value == 1 && $row->id_evaluator != NULL && $row->catatan_evaluator != NULL) {
                return '<span style="background-color:#3498DB; color:#fff; border-radius:3px; padding: 0px 2px 0px 2px;">Sudah Dievaluasi</span>';
            } elseif ($value == 2) {
                return '<span style="background-color:#6C7A89; color:#fff; border-radius:3px; padding: 0px 2px 0px 2px;">Direvisi</span>';
            }
        });
        $c->unset_columns('action', 'pilihan');
        $c->callback_column('no_skt', function ($value, $row) {
            $dok_skt = $this->model->select('*', 'dokumen_skt', array('id_permohonan' => $row->id_permohonan));
            return $dok_skt->no_dokumen;
        });
        $c->callback_column('bidang_usaha', function ($value, $row) {
            $permohonan = $this->model->select('*', 'permohonan', array('id_permohonan' => $row->id_permohonan));
            $bidang_usaha = select('*', 'ref_bidang_usaha', array('id_bidang_usaha' => $permohonan->bidang_usaha));
            $sub_bidang = select('*', 'ref_sub_bidang', array('id_sub_bidang' => $permohonan->sub_bidang));
            return $bidang_usaha->bidang_usaha . ' /<br/>' . $sub_bidang->sub_bidang;
        });
        $c->display_as('id_perusahaan', 'Perusahaan');
        $c->display_as('bidang_usaha', 'Bidang & Sub Bidang');
        $c->display_as('no_skt', 'No SKT');
        $c->display_as('file_pelaporan_periodik', 'File Laporan');
        $c->display_as('id_evaluator', 'Nama Evaluator');
        $c->display_as('catatan_evaluator', 'Hasil Evaluasi');
        $c->set_crud_url_path(base_url(strtolower(__CLASS__ . "/" . __FUNCTION__)), base_url(strtolower(__CLASS__ . "/laporan_berkala_kasie")));
        $c->set_lang_string('update_success_message', 'Data Anda berhasil disimpan.
 <script type="text/javascript">
    window.location = "' . site_url(strtolower(__CLASS__) . '/' . strtolower(__FUNCTION__)) . '";
</script>
<div style="display:none">
 ');
        $output = $c->render();
        $this->logs();
        if ($c->getState() != 'read') {
            $c->fields('file_pelaporan_periodik', 'id_permohonan', 'semester', 'id_perusahaan');
        }
        if ($c->getState() != 'edit' && $c->getState() != 'list') {
            redirect('all_admin/laporan_berkala_kasie');
        } else {
            $this->load->view('level5/laporan_berkala_kasie', $output);
        }
    }
Esempio n. 6
0
 public function csr()
 {
     $c = new grocery_crud();
     $c->set_table('csr');
     $c->where('id_perusahaan', $this->session->userdata('id_perusahaan'));
     $c->required_fields('kegiatan', 'waktu', 'lokasi');
     $c->set_relation('lokasi', 'ref_kota', 'kota', null, 'id_kota');
     $c->field_type('id_perusahaan', 'hidden', $this->session->userdata('id_perusahaan'));
     $c->set_field_upload('file_csr', 'assets/uploads/file_csr');
     $c->unset_fields('catatan_petugas', 'status_pemakaian');
     $c->unset_columns('id_perusahaan', 'catatan_petugas', 'status_pemakaian');
     $c->display_as('file_csr', 'File CSR');
     //$c->unset_delete();
     $output = $c->render();
     $this->logs();
     $level = $this->session->userdata('level');
     if ($level != NULL) {
         if ($level == 1) {
             $this->load->view('level1/skt_tabel', $output);
         } else {
             redirect('all_users/dashboard');
         }
     } elseif ($level == NULL) {
         redirect('umum/logout');
     }
 }
Esempio n. 7
0
 public function pelaporan_periodik($value = '')
 {
     # code...
     $c = new grocery_crud();
     $c->set_table('pelaporan_periodik');
     $c->set_field_upload('file_pelaporan_periodik', 'assets/uploads/file_pelaporan_periodik');
     $output = $c->render();
     $this->logs();
     view('level1/view_list', $output);
     // if ($c->getState() != 'list') {
     //     // $this->menej_ref($output);
     // } else {
     //     return $output;
     // }
 }