public function nilai_investasi() { $this->config->load('grocery_crud'); $this->config->set_item('grocery_crud_file_upload_allow_file_types', 'pdf'); $c = new grocery_crud(); $c->set_table('nilai_investasi'); $c->where('id_perusahaan', $this->session->userdata('id_perusahaan')); // if($this->glo_jenis_permo != ''){ // $c->unset_delete(); // $c->unset_read(); // $c->unset_edit(); $sl_permohonan = select('*', 'permohonan', array('id_permohonan' => $this->session->userdata('id_permohonan'), 'selesai' => 2)); if (!$sl_permohonan) { $c->unset_delete(); $c->unset_read(); $c->unset_edit(); } //$c->add_action('Pilih', 'sd', 'perusahaan/pilih/peralatan','ui-icon-plus'); // } // unset field $c->unset_fields('catatan_petugas', 'status_kepemilikan', 'file_nilai_investasi', 'status_pemakaian'); // unset columtn $c->unset_columns('id_perusahaan', 'catatan_petugas', 'status_pemakaian', 'file_nilai_investasi'); $c->field_type('id_perusahaan', 'hidden', $this->session->userdata('id_perusahaan')); $c->required_fields('nama_investor', 'negara_asal', 'nominal_investasi', 'persentase'); //$c->set_field_upload('file_nilai_investasi', 'assets/uploads/file_nilai_investasi'); $c->display_as('persentase', 'Persentase %'); //$c->unset_delete(); $output = $c->render(); $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'); } }
public function daftar_pengajuan_skt_perpanjangan_admin_naik() { $c = new grocery_crud(); $permohonan = $this->model->select('*', 'permohonan', array('jenis_permohonan' => 'Perpanjangan SKT')); $c->set_table('disposisi'); $level = $this->session->userdata('level'); if ($level == 5) { $c->where('status_progress', 9); $id_per = $this->model->select('id_perusahaan', 'disposisi', array('status_progress' => 9)); } elseif ($level == 4) { $c->where('status_progress', 11); $id_per = $this->model->select('id_perusahaan', 'disposisi', array('status_progress' => 11)); } elseif ($level == 3) { $c->where('status_progress', 12); $id_per = $this->model->select('id_perusahaan', 'disposisi', array('status_progress' => 12)); } elseif ($level == 2) { $c->where('status_progress', 13); $id_per = $this->model->select('id_perusahaan', 'disposisi', array('status_progress' => 13)); } if ($id_per != NULL) { $id_per = $id_per->id_perusahaan; } else { $id_per = ''; } $permohonan = $this->model->selects('*', 'permohonan', array('jenis_permohonan' => 'Perpanjangan SKT', 'id_perusahaan' => $id_per)); if ($permohonan != NULL) { foreach ($permohonan as $key => $value) { $c->where('id_perusahaan', $value->id_perusahaan); } } else { $c->where('id_perusahaan', ''); } $c->unset_add(); //$c->unset_delete(); $c->unset_edit(); $c->unset_read(); $c->field_type('id_user', 'hidden', $this->session->userdata('id_user')); $c->field_type('alamat', 'text'); $c->unset_columns('id_user', 'status_user', 'contact_person', 'alamat', 'provinsi', 'website', 'deskripsi_perusahaan', 'status_progress', 'keterangan'); // $c->add_action('Revisi','sR', base_url('all_admin/revisi_pengajuan_skt/').'/'); // $c->add_action('Lanjut','text', base_url('all_admin/pengajuan_skt_diterima/add').'/'); $c->add_action('Detail Evaluasi', 'sd', 'all_admin/detail_evaluasi/perpanjangan_skt'); $c->set_crud_url_path(base_url(strtolower(__CLASS__ . "/" . __FUNCTION__)), base_url(strtolower(__CLASS__ . "/daftar_pengajuan_skt"))); $c->required_fields('nama_perusahaan', 'direktur_utama', 'contact_person', 'email', 'alamat', 'kota', 'provinsi', 'website'); $c->unset_fields('tanggal_member', 'status_user', 'keterangan'); $output = $c->render(); $this->logs(); if ($c->getState() != 'list') { $this->daftar_pengajuan_skt_admin($output); } else { return $output; } }
public function pelatihan_tenaga_kerja_eksternal() { $c = new grocery_crud(); $c->set_table('pelatihan_tenaga_kerja_eksternal'); // if($this->glo_jenis_permo != ''){ // $c->unset_delete(); // $c->unset_read(); // $c->unset_edit(); $sl_permohonan = select('*', 'permohonan', array('id_permohonan' => $this->session->userdata('id_permohonan'), 'selesai' => 2)); $c->columns('id_tenaga_kerja', 'jenis_pelatihan', 'action'); if (!$this->session->userdata('laporan_berkala') == 'aktif') { $c->unset_delete(); // $c->unset_edit(); $c->unset_read(); } $c->callback_column('action', function ($value, $row) { $ada = NULL; $cek_if_has_data_permohonan = select('status_pemakaian', 'pelatihan_tenaga_kerja_eksternal', array('id_perusahaan' => $this->session->userdata('id_perusahaan'), 'id_pelatihan' => $row->id_pelatihan)); $temp = explode(',', $cek_if_has_data_permohonan->status_pemakaian); if ($cek_if_has_data_permohonan != NULL) { foreach ($temp as $key => $status_pemakaian) { if ($status_pemakaian == $this->session->userdata('id_permohonan')) { $ada = 'ada'; } } } if ($ada != NULL) { return '<a class="link-pilih" href="' . base_url() . 'perusahaan/ganti/pelatihan_tenaga_kerja/pelatihan_tenaga_kerja_eksternal/' . $row->id_pelatihan . '" title="Klik untuk merubah"><img class="btn-pilih">Dipilih</a>'; } else { return '<a class="link-pilih" href="' . base_url() . 'perusahaan/pilih/pelatihan_tenaga_kerja/pelatihan_tenaga_kerja_eksternal/' . $row->id_pelatihan . '" title="Klik untuk merubah"><img class="btn-ganti">Tidak Dipilih</a>'; } }); $c->where('pelatihan_tenaga_kerja_eksternal.id_perusahaan', $this->session->userdata('id_perusahaan')); $this->load->config('grocery_crud'); //$c->unset_delete(); $c->required_fields('id_tenaga_kerja', 'jenis_pelatihan'); $c->set_crud_url_path(base_url(strtolower(__CLASS__ . "/" . __FUNCTION__)), base_url(strtolower(__CLASS__ . "/pelatihan_tenaga_kerja"))); //field type $c->field_type('id_perusahaan', 'hidden', $this->session->userdata('id_perusahaan')); // unset columns $c->unset_columns('id_perusahaan', 'catatan_petugas', 'status_pemakaian'); $c->unset_fields('catatan_petugas', 'status_pemakaian'); // set relation $c->set_relation('id_tenaga_kerja', 'tenaga_kerja', 'nama_lengkap', array('id_perusahaan' => $this->session->userdata('id_perusahaan'))); // display as $c->display_as('id_tenaga_kerja', 'Nama Tenaga Kerja'); $output = $c->render(); $this->logs(); if ($c->getState() != 'list') { $this->pelatihan_tenaga_kerja($output); } else { return $output; } }
public function menej_pengumuman() { $c = new grocery_crud(); $c->set_table('pengumuman'); $c->unset_fields('tanggal_terbit'); $c->unset_columns('penulis'); $c->required_fields('judul', 'isi'); $c->order_by('id_pengumuman', 'DESC'); $c->field_type('penulis', 'hidden', $this->session->userdata('nama_user_online')); $output = $c->render(); $this->logs(); $level = $this->session->userdata('level'); if ($level != NULL) { if ($level == 9 || $level == 8) { $this->load->view('level' . $level . '/manage_pengumuman', $output); } else { redirect('all_users/dashboard'); } } elseif ($level == NULL) { redirect('umum/logout'); } }
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); } }
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'); } }
public function nilai_investasi() { $this->config->load('grocery_crud'); $this->config->set_item('grocery_crud_file_upload_allow_file_types', 'pdf'); $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('nilai_investasi'); $c->where('id_perusahaan', $this->session->userdata('id_perusahaan')); // if($this->glo_jenis_permo != ''){ // $c->unset_delete(); // $c->unset_read(); // $c->unset_edit(); $sl_permohonan = select('*', 'permohonan', array('id_permohonan' => $this->session->userdata('id_permohonan'), 'selesai' => 2)); if (!$this->session->userdata('laporan_berkala') == 'aktif') { $c->unset_delete(); $c->unset_read(); //$c->unset_edit(); } //$c->add_action('Pilih', 'sd', 'perusahaan/pilih/peralatan','ui-icon-plus'); // } // unset field $c->unset_fields('catatan_petugas', 'status_kepemilikan', 'file_nilai_investasi', 'status_pemakaian'); // unset columtn $c->unset_columns('id_perusahaan', 'catatan_petugas', 'status_pemakaian', 'file_nilai_investasi'); $c->field_type('id_perusahaan', 'hidden', $this->session->userdata('id_perusahaan')); $c->required_fields('nama_investor', 'negara_asal', 'nominal_investasi', 'persentase', 'mata_uang'); //$c->set_field_upload('file_nilai_investasi', 'assets/uploads/file_nilai_investasi'); $c->callback_before_upload(array($this, 'callback_before_upload_file_data')); $c->callback_field('mata_uang', array($this, 'callback_mata_uang')); $c->callback_column('nominal_investasi', function ($value, $row) { if ($row->mata_uang == 'Rupiah') { return 'Rp. ' . number_format($value, 2, ',', '.'); } else { return 'USD $' . number_format($value, 2, ',', '.'); } }); $c->callback_field('persentase', function ($value, $row) { return '<input type="text" value="' . $value . '" name="persentase" style="width: 30%"><br/><span style="color:red; font-size:10px">*) Gunakan tanda titik (.) untuk menuliskan nilai desimal<br/>*) Angka maksimal adalah 100</span>'; }); $c->display_as('persentase', 'Persentase %'); //$c->unset_delete(); $output = $c->render(); $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'); } }
public function daftar_pengajuan_skt_baru_dtlm() { if ($this->session->userdata('level') != 3) { $this->logout(); } $c = new grocery_crud(); $c->set_table('biodata_perusahaan'); $c->where('status_progress', 4); $c->unset_add(); //$c->unset_delete(); $c->unset_edit(); $c->unset_read(); $c->field_type('id_user', 'hidden', $this->session->userdata('id_user')); $c->field_type('alamat', 'text'); $c->unset_columns('id_user', 'status_user', 'contact_person', 'alamat', 'provinsi', 'website', 'deskripsi_perusahaan', 'status_progress', 'tanggal_disetujui'); $c->add_action('Revisi', 'sR', base_url('hal/revisi_pengajuan_skt_dtlm/add') . '/'); $c->add_action('Lanjut', 'text', base_url('hal/pengajuan_skt_diterima_dtlm/add') . '/'); $c->add_action('Detail', 'sd', 'hal/detail_perusahaan/pengajuan_skt'); $c->required_fields('nama_perusahaan', 'direktur_utama', 'contact_person', 'email', 'alamat', 'kota', 'provinsi', 'website'); $c->unset_fields('tanggal_member', 'status_user'); $output = $c->render(); $this->logs(); $level = $this->session->userdata('level'); if ($level != NULL) { $this->load->view('level' . $level . '/view_list', $output); } }