From 6a3a9d709f75868a0b1fe1252d8d09e16b7183fb Mon Sep 17 00:00:00 2001 From: pecintaseni Date: Wed, 4 Sep 2024 23:28:03 +0700 Subject: [PATCH] pilihan pengampu dan perekam --- app/Controllers/Kewilayahan/Kytp.php | 14 +- app/Controllers/Kewilayahan/Ref.php | 110 ++++++++++- .../Kewilayahan/Sebaran/Identifikasi.php | 16 +- .../Sebaran/IdentifikasiLapangan.php | 24 ++- .../Kewilayahan/Sebaran/JenisStatus.php | 16 +- app/Controllers/Kewilayahan/Sebaran/KLU.php | 16 +- .../Kewilayahan/Sebaran/PayComp.php | 16 +- .../Kewilayahan/Sebaran/Pembayaran.php | 24 +-- .../Kewilayahan/Sebaran/Pengampu.php | 23 ++- .../Kewilayahan/Sebaran/SPTTAhunan.php | 16 +- app/Controllers/Kewilayahan/Sebaran/Sof.php | 16 +- app/Views/inc/navbar.php | 4 +- .../dist/InterVariable-75YQYCJN.woff2 | Bin 345588 -> 0 bytes .../dist/a0e477f2f1f9d2376fde.woff2 | Bin 345588 -> 0 bytes .../dist/e295f70fe3e2df296c7b.woff2 | Bin 380904 -> 0 bytes app/Views/kewilayahan/dist/kpdl.js | 6 - .../kewilayahan/dist/kpdl.js.LICENSE.txt | 65 ------ app/Views/kewilayahan/kytp/TabPenugasan.js | 49 +++-- .../kewilayahan/kytp/TabProgresifitas.js | 2 +- .../kytp/componentDepan/NipPengampu.js | 180 +++++++++++++++++ .../kytp/componentDepan/NipPerekam.js | 185 ++++++++++++++++++ .../kytp/componentProgresifitas/ChartKPDL.js | 35 ++-- .../componentProgresifitas/Identifikasi.js | 9 +- .../kytp/componentProgresifitas/Pengampu.js | 2 +- .../kytp/componentProgresifitas/Sof.js | 1 - app/Views/kewilayahan/kytp/kpdl.js | 91 ++++++--- 26 files changed, 736 insertions(+), 184 deletions(-) delete mode 100644 app/Views/kewilayahan/dist/InterVariable-75YQYCJN.woff2 delete mode 100644 app/Views/kewilayahan/dist/a0e477f2f1f9d2376fde.woff2 delete mode 100644 app/Views/kewilayahan/dist/e295f70fe3e2df296c7b.woff2 delete mode 100644 app/Views/kewilayahan/dist/kpdl.js delete mode 100644 app/Views/kewilayahan/dist/kpdl.js.LICENSE.txt create mode 100644 app/Views/kewilayahan/kytp/componentDepan/NipPengampu.js create mode 100644 app/Views/kewilayahan/kytp/componentDepan/NipPerekam.js diff --git a/app/Controllers/Kewilayahan/Kytp.php b/app/Controllers/Kewilayahan/Kytp.php index 625d9b53..38273550 100644 --- a/app/Controllers/Kewilayahan/Kytp.php +++ b/app/Controllers/Kewilayahan/Kytp.php @@ -18,9 +18,7 @@ class Kytp extends Controller use ResponseTrait; public function index() { - $db = \Config\Database::connect(); - // $data['all_propinsi'] = $db->table('KPDL_V_BATAS_DESA')->select('ADM1_PCODE, ADM1_EN')->distinct()->get()->getResult() ; - // dd($data['all_propinsi']); + $db = \Config\Database::connect(); $data = []; if (session('isLogin')) { echo view('inc/head'); @@ -35,9 +33,15 @@ class Kytp extends Controller public function graph_matoa() { + $opsiWilZona = $this->request->getPost('opsiWilZona') ?? null; + if (!in_array($opsiWilZona, ['wilayah', 'zona', ''])) { + $dataReturn['poi_agg'] = []; + $dataReturn['kpdl_agg'] = []; + } else { - $dataReturn['poi_agg'] = $this->get_poi_agg(); - $dataReturn['kpdl_agg'] = $this->get_kpdl_agg(); + $dataReturn['poi_agg'] = $this->get_poi_agg(); + $dataReturn['kpdl_agg'] = $this->get_kpdl_agg(); + } return json_encode($dataReturn); } diff --git a/app/Controllers/Kewilayahan/Ref.php b/app/Controllers/Kewilayahan/Ref.php index 168c4a06..2875c72d 100644 --- a/app/Controllers/Kewilayahan/Ref.php +++ b/app/Controllers/Kewilayahan/Ref.php @@ -110,13 +110,13 @@ class Ref extends Controller public function zpzp() { $db = \Config\Database::connect(); - $kpp = $this->request->getGet('kpp'); - $seksi = $this->request->getGet('seksi'); - $ar = $this->request->getGet('ar'); + $kpp = $this->request->getPost('kpp'); + $seksi = $this->request->getPost('seksi'); + $ar = $this->request->getPost('ar'); $data = $db->table('KPDL_ZP_NAS_DIFF') ->select("OGC_FID as value, NO_URUT || '-' || ATTRIBUTE1 as label") ->distinct() - ->whereIn('KD_KPP', $kpp) + ->where('KD_KPP', $kpp) ->whereIn('KD_UNIT_OR', $seksi) ->whereIn('NIP_AR', $ar) ->orderBy('LABEL')->get()->getResult(); @@ -128,6 +128,108 @@ class Ref extends Controller return json_encode(($data)); } + public function kanwilPratama() + { + + $db = \Config\Database::connect(); + $data = $db->table('DIM_KANTOR') + ->select('KD_KANWIL as value, NM_KANTOR as label') + ->where('ID_JNS_KANTOR', 23) + ->orderBy('NM_KANTOR')->get()->getResult(); + + foreach ($data as $key => $val) { + $val->value = $val->value; + } + + return json_encode($data); + } + + public function kppPratama() + { + $kanwil = $this->request->getGet('kanwil'); + $db = \Config\Database::connect(); + $data = $db->table('DIM_KANTOR') + ->select('KD_KPP as value, NM_KANTOR as label') + ->where('KD_KANWIL', $kanwil) + ->where('ID_JNS_KANTOR', 24) + ->orderBy('NM_KANTOR')->get()->getResult(); + + foreach ($data as $key => $val) { + $val->value = $val->value; + } + + return json_encode($data); + } + + public function kanwil() + { + + $db = \Config\Database::connect(); + $data = $db->table('DIM_KANTOR') + ->select('KD_KANWIL as value, NM_KANTOR as label') + ->whereIn('ID_JNS_KANTOR', [21, 23]) + ->orderBy('NM_KANTOR')->get()->getResult(); + + foreach ($data as $key => $val) { + $val->value = $val->value; + } + + return json_encode($data); + } + + public function kpp() + { + $kanwil = $this->request->getGet('kanwil'); + $db = \Config\Database::connect(); + $data = $db->table('DIM_KANTOR') + ->select('KD_KPP as value, NM_KANTOR as label') + ->where('KD_KANWIL', $kanwil) + ->whereIn('ID_JNS_KANTOR', [22, 24]) + ->orderBy('NM_KANTOR')->get()->getResult(); + + foreach ($data as $key => $val) { + $val->value = $val->value; + } + + return json_encode($data); + } + + public function seksi() + { + $kpp = $this->request->getGet('kpp'); + $db = \Config\Database::connect(); + $data = $db->table('PEGAWAI')->distinct() + ->select('KD_UNIT_ORGANISASI as value, NAMA_UNIT_ES4 as label') + ->where('KPPADM', $kpp) + ->where('NAMA_JABATAN', "Account Representative") + ->orderBy('NAMA_UNIT_ES4')->get()->getResult(); + + foreach ($data as $key => $val) { + $val->value = $val->value; + } + + return json_encode($data); + } + + public function ar() + { + $kpp = $this->request->getPost('kpp'); + $kd_unit_organisasi = $this->request->getPost('seksi'); + $db = \Config\Database::connect(); + $data = $db->table('PEGAWAI')->distinct() + + ->select('NIP9 as value, NAMA as label') + ->where('KPPADM', $kpp) + ->whereIn('KD_UNIT_ORGANISASI', $kd_unit_organisasi) + ->where('NAMA_JABATAN', "Account Representative") + ->orderBy('NAMA')->get()->getResult(); + + foreach ($data as $key => $val) { + $val->value = $val->value; + } + + return json_encode($data); + } public function change_case($arr) { return array_change_key_case($arr, CASE_LOWER); diff --git a/app/Controllers/Kewilayahan/Sebaran/Identifikasi.php b/app/Controllers/Kewilayahan/Sebaran/Identifikasi.php index 4ed131bd..847bbde9 100644 --- a/app/Controllers/Kewilayahan/Sebaran/Identifikasi.php +++ b/app/Controllers/Kewilayahan/Sebaran/Identifikasi.php @@ -6,9 +6,11 @@ class Identifikasi extends \App\Controllers\Kewilayahan\Kytp { protected function data($request) { - $opsiWilZona = $request->getPost('opsiWilZona'); - $adm4_pcode = $request->getPost('adm4_pcode') ?? []; - $id_poly_zona = $request->getPost('id_poly_zona') ?? []; + $opsiWilZona = $request->getPost('opsiWilZona'); + $adm4_pcode = $request->getPost('adm4_pcode') ?? []; + $id_poly_zona = $request->getPost('id_poly_zona') ?? []; + $nip_ar_perekam = $request->getPost('nip_ar_perekam') ?? []; + $nip_ar_pengampu = $request->getPost('nip_ar_pengampu') ?? []; $db = \Config\Database::connect(); @@ -23,6 +25,14 @@ class Identifikasi extends \App\Controllers\Kewilayahan\Kytp $npwp->whereIn('ID_POLY_ZONA', $id_poly_zona); } + if ($opsiWilZona == 'perekam') { + $npwp->whereIn('CREATED_BY', $nip_ar_perekam); + } + + if ($opsiWilZona == 'pengampu') { + $npwp->whereIn('NIP_AR_PENGAMPU', $nip_ar_pengampu); + } + $data = $npwp->get()->getResult(); $ret = []; diff --git a/app/Controllers/Kewilayahan/Sebaran/IdentifikasiLapangan.php b/app/Controllers/Kewilayahan/Sebaran/IdentifikasiLapangan.php index e1c72cae..d2ed84ba 100644 --- a/app/Controllers/Kewilayahan/Sebaran/IdentifikasiLapangan.php +++ b/app/Controllers/Kewilayahan/Sebaran/IdentifikasiLapangan.php @@ -9,9 +9,11 @@ class IdentifikasiLapangan extends \App\Controllers\Kewilayahan\Kytp protected function dataKpdl($request, $bulan) { - $opsiWilZona = $request->getPost('opsiWilZona'); - $adm4_pcode = $request->getPost('adm4_pcode') ?? []; - $id_poly_zona = $request->getPost('id_poly_zona') ?? []; + $opsiWilZona = $request->getPost('opsiWilZona'); + $adm4_pcode = $request->getPost('adm4_pcode') ?? []; + $id_poly_zona = $request->getPost('id_poly_zona') ?? []; + $nip_ar_perekam = $request->getPost('nip_ar_perekam') ?? []; + $nip_ar_pengampu = $request->getPost('nip_ar_pengampu') ?? []; $db = \Config\Database::connect(); $KpdlLibrary = new KpdlLibrary; @@ -30,6 +32,13 @@ class IdentifikasiLapangan extends \App\Controllers\Kewilayahan\Kytp if ($opsiWilZona == 'zona') { $npwp = $npwp->whereIn('ID_POLY_ZONA', $id_poly_zona); } + if ($opsiWilZona == 'perekam') { + $npwp = $npwp->whereIn('NIP_PEREKAM', $nip_ar_perekam); + } + + if ($opsiWilZona == 'pengampu') { + $npwp = $npwp->whereIn('NIP_AR_PENGAMPU', $nip_ar_pengampu); + } $npwp = $npwp->getCompiledSelect(); @@ -60,6 +69,15 @@ class IdentifikasiLapangan extends \App\Controllers\Kewilayahan\Kytp if ($opsiWilZona == 'zona') { $data = $data->whereIn('ID_POLY_ZONA', $id_poly_zona); } + + if ($opsiWilZona == 'perekam') { + $data = $data->whereIn('CREATED_BY', $nip_ar_perekam); + } + + if ($opsiWilZona == 'pengampu') { + $data = $data->whereIn('NIP_AR_PENGAMPU', $nip_ar_pengampu); + } + $data = $data->getCompiledSelect(); $dataRet = $db->newQuery() diff --git a/app/Controllers/Kewilayahan/Sebaran/JenisStatus.php b/app/Controllers/Kewilayahan/Sebaran/JenisStatus.php index 9f800870..23573d91 100644 --- a/app/Controllers/Kewilayahan/Sebaran/JenisStatus.php +++ b/app/Controllers/Kewilayahan/Sebaran/JenisStatus.php @@ -6,9 +6,11 @@ class JenisStatus extends \App\Controllers\Kewilayahan\Kytp { protected function data($request, $jenisOrStatus) { - $opsiWilZona = $request->getPost('opsiWilZona'); - $adm4_pcode = $request->getPost('adm4_pcode') ?? []; - $id_poly_zona = $request->getPost('id_poly_zona') ?? []; + $opsiWilZona = $request->getPost('opsiWilZona'); + $adm4_pcode = $request->getPost('adm4_pcode') ?? []; + $id_poly_zona = $request->getPost('id_poly_zona') ?? []; + $nip_ar_perekam = $request->getPost('nip_ar_perekam') ?? []; + $nip_ar_pengampu = $request->getPost('nip_ar_pengampu') ?? []; $db = \Config\Database::connect(); @@ -37,6 +39,14 @@ class JenisStatus extends \App\Controllers\Kewilayahan\Kytp $npwp->whereIn('ID_POLY_ZONA', $id_poly_zona); } + if ($opsiWilZona == 'perekam') { + $npwp = $npwp->whereIn('CREATED_BY', $nip_ar_perekam); + } + + if ($opsiWilZona == 'pengampu') { + $npwp = $npwp->whereIn('NIP_AR_PENGAMPU', $nip_ar_pengampu); + } + $data = $npwp->get()->getResult(); $ret = []; diff --git a/app/Controllers/Kewilayahan/Sebaran/KLU.php b/app/Controllers/Kewilayahan/Sebaran/KLU.php index b37e326f..2922d8d1 100644 --- a/app/Controllers/Kewilayahan/Sebaran/KLU.php +++ b/app/Controllers/Kewilayahan/Sebaran/KLU.php @@ -6,9 +6,11 @@ class KLU extends \App\Controllers\Kewilayahan\Kytp { protected function data($request, $jenischart) { - $opsiWilZona = $request->getPost('opsiWilZona'); - $adm4_pcode = $request->getPost('adm4_pcode') ?? []; - $id_poly_zona = $request->getPost('id_poly_zona') ?? []; + $opsiWilZona = $request->getPost('opsiWilZona'); + $adm4_pcode = $request->getPost('adm4_pcode') ?? []; + $id_poly_zona = $request->getPost('id_poly_zona') ?? []; + $nip_ar_perekam = $request->getPost('nip_ar_perekam') ?? []; + $nip_ar_pengampu = $request->getPost('nip_ar_pengampu') ?? []; $db = \Config\Database::connect(); $npwp = $db->table('KPDL_MV_LOKASI_SUBJEK A')->select('NPWP, KD_GOLPOK, NM_GOLPOK, JUMLAH_PEMBAYARAN_THN_TERAKHIR')->distinct() @@ -26,6 +28,14 @@ class KLU extends \App\Controllers\Kewilayahan\Kytp $npwp = $npwp->whereIn('ID_POLY_ZONA', $id_poly_zona); } + if ($opsiWilZona == 'perekam') { + $npwp = $npwp->whereIn('CREATED_BY', $nip_ar_perekam); + } + + if ($opsiWilZona == 'pengampu') { + $npwp = $npwp->whereIn('NIP_AR_PENGAMPU', $nip_ar_pengampu); + } + $agg = "count(1) as JML"; if ($jenischart == 'dataRupiahBayar') { $agg = "SUM(JUMLAH_PEMBAYARAN_THN_TERAKHIR) as JML"; diff --git a/app/Controllers/Kewilayahan/Sebaran/PayComp.php b/app/Controllers/Kewilayahan/Sebaran/PayComp.php index 79928af3..a663735e 100644 --- a/app/Controllers/Kewilayahan/Sebaran/PayComp.php +++ b/app/Controllers/Kewilayahan/Sebaran/PayComp.php @@ -8,9 +8,11 @@ class PayComp extends \App\Controllers\Kewilayahan\Kytp { protected function dataC($request, $tahun, $bulan) { - $opsiWilZona = $request->getPost('opsiWilZona'); - $adm4_pcode = $request->getPost('adm4_pcode') ?? []; - $id_poly_zona = $request->getPost('id_poly_zona') ?? []; + $opsiWilZona = $request->getPost('opsiWilZona'); + $adm4_pcode = $request->getPost('adm4_pcode') ?? []; + $id_poly_zona = $request->getPost('id_poly_zona') ?? []; + $nip_ar_perekam = $request->getPost('nip_ar_perekam') ?? []; + $nip_ar_pengampu = $request->getPost('nip_ar_pengampu') ?? []; $db = \Config\Database::connect(); //npwp @@ -24,6 +26,14 @@ class PayComp extends \App\Controllers\Kewilayahan\Kytp $npwp->whereIn('ID_POLY_ZONA', $id_poly_zona); } + if ($opsiWilZona == 'perekam') { + $npwp = $npwp->whereIn('CREATED_BY', $nip_ar_perekam); + } + + if ($opsiWilZona == 'pengampu') { + $npwp = $npwp->whereIn('NIP_AR_PENGAMPU', $nip_ar_pengampu); + } + $data = $db->newQuery() ->select("'" . $tahun . '-' . $bulan . "' AS THN_BLN, B.JML|| ' bulan' as KETERANGAN, COUNT(1) AS Y", false) ->fromSubquery($npwp, 'A') diff --git a/app/Controllers/Kewilayahan/Sebaran/Pembayaran.php b/app/Controllers/Kewilayahan/Sebaran/Pembayaran.php index 6225da84..d3998df7 100644 --- a/app/Controllers/Kewilayahan/Sebaran/Pembayaran.php +++ b/app/Controllers/Kewilayahan/Sebaran/Pembayaran.php @@ -8,17 +8,11 @@ class Pembayaran extends \App\Controllers\Kewilayahan\Kytp { protected function dataC($request, $tahun, $bulan) { - $opsiWilZona = $request->getPost('opsiWilZona'); - $adm4_pcode = $request->getPost('adm4_pcode') ?? []; - $id_poly_zona = $request->getPost('id_poly_zona') ?? []; - // $tahun = $this->request->getPost('tahun') ?? date('Y'); - // $bulan = $this->request->getPost('bulan') ?? date('m'); - - // $opsiWilZona = ''; - // $adm4_pcode = ''; - // $id_poly_zona = ''; - // $tahun = date('Y'); - // $bulan = date('m'); + $opsiWilZona = $request->getPost('opsiWilZona'); + $adm4_pcode = $request->getPost('adm4_pcode') ?? []; + $id_poly_zona = $request->getPost('id_poly_zona') ?? []; + $nip_ar_perekam = $request->getPost('nip_ar_perekam') ?? []; + $nip_ar_pengampu = $request->getPost('nip_ar_pengampu') ?? []; $db = \Config\Database::connect(); //npwp @@ -32,6 +26,14 @@ class Pembayaran extends \App\Controllers\Kewilayahan\Kytp $npwp->whereIn('ID_POLY_ZONA', $id_poly_zona); } + if ($opsiWilZona == 'perekam') { + $npwp = $npwp->whereIn('CREATED_BY', $nip_ar_perekam); + } + + if ($opsiWilZona == 'pengampu') { + $npwp = $npwp->whereIn('NIP_AR_PENGAMPU', $nip_ar_pengampu); + } + $data = $db->newQuery() ->select("'" . $tahun . '-' . $bulan . "' AS THN_BLN, NVL(WARNA_BYR, 'black') WARNA_BYR, COUNT(1) AS Y") ->fromSubquery($npwp, 'A') diff --git a/app/Controllers/Kewilayahan/Sebaran/Pengampu.php b/app/Controllers/Kewilayahan/Sebaran/Pengampu.php index 4f78de5f..0a74f9ab 100644 --- a/app/Controllers/Kewilayahan/Sebaran/Pengampu.php +++ b/app/Controllers/Kewilayahan/Sebaran/Pengampu.php @@ -7,21 +7,24 @@ class Pengampu extends \App\Controllers\Kewilayahan\Kytp protected function data($request, $jenis) { ini_set('max_input_vars', 3000); - $opsiWilZona = $request->getPost('opsiWilZona'); - $adm4_pcode = $request->getPost('adm4_pcode') ?? []; - $id_poly_zona = $request->getPost('id_poly_zona') ?? []; + $opsiWilZona = $request->getPost('opsiWilZona'); + $adm4_pcode = $request->getPost('adm4_pcode') ?? []; + $id_poly_zona = $request->getPost('id_poly_zona') ?? []; + $nip_ar_perekam = $request->getPost('nip_ar_perekam') ?? []; + $nip_ar_pengampu = $request->getPost('nip_ar_pengampu') ?? []; $db = \Config\Database::connect(); - $npwp = $db->table('KPDL_MV_LOKASI_SUBJEK')->select("NM_KANTOR_PENGAMPU, count(1) JML", false) + $npwp = $db->table('KPDL_MV_LOKASI_SUBJEK')->select("NM_KANTOR_PENGAMPU, count(DISTINCT NPWP) JML", false) ->groupBy("NM_KANTOR_PENGAMPU")->orderBy("JML", 'desc'); switch ($jenis) { case 'assign': - + $npwp = $npwp->where("NPWP IS NOT NULL"); break; case 'unassign': - $npwp = $npwp->where("NM_KANTOR_PENGAMPU", "NPWP TIDAK DITEMUKAN"); + $npwp = $npwp->where("NPWP IS NOT NULL") + ->where("NIP_AR_PENGAMPU IS NULL"); break; default: @@ -36,6 +39,14 @@ class Pengampu extends \App\Controllers\Kewilayahan\Kytp $npwp->whereIn('ID_POLY_ZONA', $id_poly_zona); } + if ($opsiWilZona == 'perekam') { + $npwp = $npwp->whereIn('CREATED_BY', $nip_ar_perekam); + } + + if ($opsiWilZona == 'pengampu') { + $npwp = $npwp->whereIn('NIP_AR_PENGAMPU', $nip_ar_pengampu); + } + $data = $npwp->get()->getResult(); $ret = []; diff --git a/app/Controllers/Kewilayahan/Sebaran/SPTTAhunan.php b/app/Controllers/Kewilayahan/Sebaran/SPTTAhunan.php index 654cc096..34e0258b 100644 --- a/app/Controllers/Kewilayahan/Sebaran/SPTTAhunan.php +++ b/app/Controllers/Kewilayahan/Sebaran/SPTTAhunan.php @@ -6,9 +6,11 @@ class SPTTAhunan extends \App\Controllers\Kewilayahan\Kytp { protected function data($request, $tahun) { - $opsiWilZona = $request->getPost('opsiWilZona'); - $adm4_pcode = $request->getPost('adm4_pcode') ?? []; - $id_poly_zona = $request->getPost('id_poly_zona') ?? []; + $opsiWilZona = $request->getPost('opsiWilZona'); + $adm4_pcode = $request->getPost('adm4_pcode') ?? []; + $id_poly_zona = $request->getPost('id_poly_zona') ?? []; + $nip_ar_perekam = $request->getPost('nip_ar_perekam') ?? []; + $nip_ar_pengampu = $request->getPost('nip_ar_pengampu') ?? []; $db = \Config\Database::connect(); $npwp = $db->table('KPDL_MV_LOKASI_SUBJEK A')->select('NPWP, B.KETERANGAN')->distinct() @@ -23,6 +25,14 @@ class SPTTAhunan extends \App\Controllers\Kewilayahan\Kytp $npwp->whereIn('ID_POLY_ZONA', $id_poly_zona); } + if ($opsiWilZona == 'perekam') { + $npwp = $npwp->whereIn('CREATED_BY', $nip_ar_perekam); + } + + if ($opsiWilZona == 'pengampu') { + $npwp = $npwp->whereIn('NIP_AR_PENGAMPU', $nip_ar_pengampu); + } + $data = $db->newQuery() ->fromSubquery($npwp, "A") ->select("KETERANGAN, count(1) as JML") diff --git a/app/Controllers/Kewilayahan/Sebaran/Sof.php b/app/Controllers/Kewilayahan/Sebaran/Sof.php index 90a2abb9..02959bff 100644 --- a/app/Controllers/Kewilayahan/Sebaran/Sof.php +++ b/app/Controllers/Kewilayahan/Sebaran/Sof.php @@ -8,9 +8,11 @@ class Sof extends \App\Controllers\Kewilayahan\Kytp { protected function dataC($request, $tahun, $bulan) { - $opsiWilZona = $request->getPost('opsiWilZona'); - $adm4_pcode = $request->getPost('adm4_pcode') ?? []; - $id_poly_zona = $request->getPost('id_poly_zona') ?? []; + $opsiWilZona = $request->getPost('opsiWilZona'); + $adm4_pcode = $request->getPost('adm4_pcode') ?? []; + $id_poly_zona = $request->getPost('id_poly_zona') ?? []; + $nip_ar_perekam = $request->getPost('nip_ar_perekam') ?? []; + $nip_ar_pengampu = $request->getPost('nip_ar_pengampu') ?? []; $db = \Config\Database::connect(); //npwp @@ -24,6 +26,14 @@ class Sof extends \App\Controllers\Kewilayahan\Kytp $npwp->whereIn('ID_POLY_ZONA', $id_poly_zona); } + if ($opsiWilZona == 'perekam') { + $npwp = $npwp->whereIn('CREATED_BY', $nip_ar_perekam); + } + + if ($opsiWilZona == 'pengampu') { + $npwp = $npwp->whereIn('NIP_AR_PENGAMPU', $nip_ar_pengampu); + } + $sqlBulanIni = $db->newQuery() ->select("'" . $tahun . '-' . $bulan . "' AS THN_BLN, B.LAPISAN, count(1) JML", false) ->fromSubquery($npwp, 'A') diff --git a/app/Views/inc/navbar.php b/app/Views/inc/navbar.php index ec4fe61f..4fbce46e 100644 --- a/app/Views/inc/navbar.php +++ b/app/Views/inc/navbar.php @@ -8,7 +8,7 @@ -
+

DASHBOARD MANAJERIAL PENGAWASAN

@@ -18,7 +18,7 @@