Browse Source

pilihan pengampu dan perekam

main
pecintaseni 7 months ago
parent
commit
32d9927575
  1. 14
      app/Controllers/Kewilayahan/Kytp.php
  2. 110
      app/Controllers/Kewilayahan/Ref.php
  3. 16
      app/Controllers/Kewilayahan/Sebaran/Identifikasi.php
  4. 24
      app/Controllers/Kewilayahan/Sebaran/IdentifikasiLapangan.php
  5. 16
      app/Controllers/Kewilayahan/Sebaran/JenisStatus.php
  6. 16
      app/Controllers/Kewilayahan/Sebaran/KLU.php
  7. 16
      app/Controllers/Kewilayahan/Sebaran/PayComp.php
  8. 24
      app/Controllers/Kewilayahan/Sebaran/Pembayaran.php
  9. 23
      app/Controllers/Kewilayahan/Sebaran/Pengampu.php
  10. 16
      app/Controllers/Kewilayahan/Sebaran/SPTTAhunan.php
  11. 16
      app/Controllers/Kewilayahan/Sebaran/Sof.php
  12. 4
      app/Views/inc/navbar.php
  13. 2
      app/Views/kewilayahan/dist/kpdl.js
  14. 49
      app/Views/kewilayahan/kytp/TabPenugasan.js
  15. 2
      app/Views/kewilayahan/kytp/TabProgresifitas.js
  16. 180
      app/Views/kewilayahan/kytp/componentDepan/NipPengampu.js
  17. 185
      app/Views/kewilayahan/kytp/componentDepan/NipPerekam.js
  18. 2
      app/Views/kewilayahan/kytp/componentProgresifitas/ChartKPDL.js
  19. 9
      app/Views/kewilayahan/kytp/componentProgresifitas/Identifikasi.js
  20. 2
      app/Views/kewilayahan/kytp/componentProgresifitas/Pengampu.js
  21. 1
      app/Views/kewilayahan/kytp/componentProgresifitas/Sof.js
  22. 91
      app/Views/kewilayahan/kytp/kpdl.js

14
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);
}

110
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);

16
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 = [];

24
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()

16
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 = [];

16
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";

16
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')

24
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')

23
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 = [];

16
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")

16
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')

4
app/Views/inc/navbar.php

@ -8,7 +8,7 @@
<button type="button" id="navbar-fullscreen" class="nav-link"><i class="ik ik-maximize"></i></button>
<button type="button" id="navbar-print" class="nav-link ml-2"><i class="ik ik-printer"></i></button>
</div>
<div class="top-menu d-flex align-items-center">
<div class="judul top-menu d-flex align-items-center" id="judul">
<h3><b><strong>DASHBOARD MANAJERIAL PENGAWASAN</strong></b></h3>
@ -18,7 +18,7 @@
<div class="dropdown">
<a class="dropdown-toggle mr-4" href="#" id="userDropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"><img class="avatar" src="<?= base_url('public/theme/img/users/user.png') ?>" alt="">
<a class="dropdown-toggle mr-4" href="#" id="userDropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"><img class="avatar" src="<?=base_url('public/theme/img/users/user.png')?>" alt="">
<?php echo session('kppadm') ?> - <?php echo session('nama') ?>
</a>
<div class="dropdown-menu dropdown-menu-right" aria-labelledby="userDropdown">

2
app/Views/kewilayahan/dist/kpdl.js vendored

File diff suppressed because one or more lines are too long

49
app/Views/kewilayahan/kytp/TabPenugasan.js

@ -1,20 +1,45 @@
import React, { useState } from "react"
import { TabView, TabPanel } from "primereact/tabview"
import { Card, CardBody } from "reactstrap"
import React, { useRef, useState } from "react"
import { Card, CardBody, CardHeader, CardTitle } from "reactstrap"
import ChartKpdl from "./componentProgresifitas/ChartKPDL"
import { Stepper } from "primereact/stepper"
import { StepperPanel } from "primereact/stepperpanel"
const TabPenugasan = ({ dataSend }) => {
const stepperRef = useRef(null)
return (
<>
<Card>
<CardBody className="">
<TabView className="p-1" pt={{ panelContainer: { className: "p-1" } }}>
<TabPanel className="p-" id="tab_1" header="Identifikasi Lapangan (KPDL/MATOA)">
<ChartKpdl dataSend={dataSend} />
</TabPanel>
<TabPanel id="tab_2" header="Aktifitas pasca identifikasi"></TabPanel>
<TabPanel id="tab_3" header="Hasil"></TabPanel>
</TabView>
<CardHeader className="d-flex justify-content-center p-2">
<CardTitle tag={"h1"} className="font-weight-bold">
Statistik Penugasan Matoa Tahun Berjalan
</CardTitle>
</CardHeader>
<CardBody className="mb-0">
<div className="card flex justify-content-center">
<Stepper ref={stepperRef} style={{ flexBasis: "30rem" }}>
<StepperPanel header="Identifikasi Lapangan (KPDL/MATOA)">
<div className="flex flex-column h-12rem">
<div className="font-medium">
<ChartKpdl dataSend={dataSend} />
</div>
</div>
</StepperPanel>
<StepperPanel header="Aktifitas pasca identifikasi">
<div className="flex flex-column h-12rem">
<div className="border-2 border-dashed surface-border border-round surface-ground flex-auto flex justify-content-center align-items-center font-medium">
OTW
</div>
</div>
</StepperPanel>
<StepperPanel header="Hasil pasca aktifitas">
<div className="flex flex-column h-12rem">
<div className="border-2 border-dashed surface-border border-round surface-ground flex-auto flex justify-content-center align-items-center font-medium">
OTW
</div>
</div>
</StepperPanel>
</Stepper>
</div>
</CardBody>
</Card>
</>

2
app/Views/kewilayahan/kytp/TabProgresifitas.js

@ -13,7 +13,7 @@ import KLU from "./componentProgresifitas/KLU"
export default function TabProgresifitas({ dataSend }) {
return (
<div className="card">
<TabView>
<TabView scrollable>
<TabPanel id="tab_1" header="Identifikasi">
<Identifikasi dataSend={dataSend} />
</TabPanel>

180
app/Views/kewilayahan/kytp/componentDepan/NipPengampu.js

@ -0,0 +1,180 @@
import React, { useEffect, useRef, useState } from "react"
import { MultiSelect } from "react-multi-select-component"
import { Col, Label, Row } from "reactstrap"
import Select from "react-select"
import { Button as ButtonP } from "primereact/button"
import { isObjEmpty } from "../util"
import $ from "jquery"
import collect from "collect.js"
const NipPengampu = ({ dataSend, setDataSend, activeTab, toast, setHiddenGraphMatoa }) => {
const [kanwil, setKanwil] = useState({})
const [kpp, setKpp] = useState({})
const [seksi, setSeksi] = useState([])
const [ar, setAr] = useState([])
const [kanwilSelected, setKanwilSelected] = useState(null)
const [kppSelected, setKppSelected] = useState({})
const [seksiSelected, setSeksiSelected] = useState([])
const [arSelected, setArSelected] = useState([])
const base_url = "<?=base_url()?>"
useEffect(() => {
$.ajax({
url: base_url + "kewilayahan/ref/kanwil",
method: "GET",
dataType: "json",
success: (data) => {
setKanwil(data)
}
})
}, [])
useEffect(() => {
setKpp(null)
setSeksi([])
setAr([])
setKppSelected(null)
setSeksiSelected([])
setArSelected([])
if (kanwilSelected && !isObjEmpty(kanwilSelected)) {
const kanwil = kanwilSelected.value
$.ajax({
url: base_url + "kewilayahan/ref/kpp",
method: "GET",
dataType: "json",
data: { kanwil },
success: (data) => {
setKpp(data)
}
})
}
}, [kanwilSelected])
useEffect(() => {
setSeksi([])
setAr([])
setSeksiSelected([])
setArSelected([])
if (kppSelected && !isObjEmpty(kppSelected)) {
// const kpp = collect(kppSelected).pluck("value").all()
const kpp = kppSelected.value
$.ajax({
url: base_url + "kewilayahan/ref/seksi",
method: "GET",
dataType: "json",
data: { kpp },
success: (data) => {
setSeksi(data)
}
})
}
}, [kppSelected])
useEffect(() => {
setAr([])
setArSelected([])
const seksi = collect(seksiSelected).pluck("value").all()
if (seksi.length && !isObjEmpty(seksiSelected)) {
const kpp = kppSelected.value
$.ajax({
url: base_url + "kewilayahan/ref/ar",
method: "POST",
dataType: "json",
data: { kpp, seksi },
success: (data) => {
setAr(data)
}
})
}
}, [seksiSelected])
const buttonProsesOnClick = () => {
const nip_ar_pengampu = collect(arSelected).pluck("value").all()
if (nip_ar_pengampu.length) {
setDataSend({ opsiWilZona: activeTab, nip_ar_pengampu })
setHiddenGraphMatoa(true)
} else {
toast.current.show({ severity: "info", summary: "Info", detail: "AR Pengampu harus dipilih" })
}
}
return (
<>
<Row>
<Col md="3">
<Label className="form-label" for="basicInput">
Kanwil
</Label>
<Select
placeholder="Pilih Kanwil"
className="basic-single w-100"
onChange={(e) => {
setKanwilSelected(e)
}}
classNamePrefix="select"
// defaultValue={kanwilSelected}
value={kanwilSelected}
isClearable={false}
options={kanwil}
/>
</Col>
<Col md="3">
<Label className="form-label" for="Pilih KPP">
KPP
</Label>
<Select
placeholder="Pilih KPP"
className="basic-single w-100"
onChange={(e) => {
setKppSelected(e)
}}
classNamePrefix="select"
// defaultValue={kanwilSelected}
value={kppSelected}
isClearable={false}
options={kpp}
/>
</Col>
<Col md="3">
<Label className="form-label" for="Pilih Seksi">
Seksi
</Label>
<MultiSelect
className="me-1 w-full"
hasSelectAll={true}
debounceDuration={300}
options={seksi}
value={seksiSelected}
onChange={(e) => {
setSeksiSelected(e)
}}
labelledBy="Pilih Seksi"
overrideStrings={{ allItemsAreSelected: "Semua dipilih", selectSomeItems: "Pilih Seksi" }}
/>
</Col>
<Col md="3">
<Label className="form-label" for="Pilih AR">
AR
</Label>
<MultiSelect
className="me-1 w-full"
hasSelectAll={true}
debounceDuration={300}
options={ar}
value={arSelected}
onChange={(e) => {
setArSelected(e)
}}
labelledBy="Pilih AR"
overrideStrings={{ allItemsAreSelected: "Semua dipilih", selectSomeItems: "Pilih AR" }}
/>
</Col>
</Row>
<Row className="mt-2">
<Col sm="12">
<ButtonP onClick={() => buttonProsesOnClick()} label="Proses" severity="" rounded className="w-10rem text-white text-base" />
</Col>
</Row>
</>
)
}
export default NipPengampu

185
app/Views/kewilayahan/kytp/componentDepan/NipPerekam.js

@ -0,0 +1,185 @@
import React, { useEffect, useRef, useState } from "react"
import { MultiSelect } from "react-multi-select-component"
import { Col, Label, Row } from "reactstrap"
import Select from "react-select"
import { Button as ButtonP } from "primereact/button"
import { isObjEmpty } from "../util"
import $ from "jquery"
import collect from "collect.js"
const NipPerekam = ({ dataSend, setDataSend, activeTab, toast, setHiddenGraphMatoa }) => {
const base_url = "<?=base_url()?>"
const [kanwil, setKanwil] = useState({})
const [kpp, setKpp] = useState(null)
const [seksi, setSeksi] = useState([])
const [ar, setAr] = useState([])
const [kanwilSelected, setKanwilSelected] = useState(null)
const [kppSelected, setKppSelected] = useState()
const [seksiSelected, setSeksiSelected] = useState([])
const [arSelected, setArSelected] = useState([])
useEffect(() => {
$.ajax({
url: base_url + "kewilayahan/ref/kanwilPratama",
method: "GET",
dataType: "json",
success: (data) => {
setKanwil(data)
}
})
}, [])
useEffect(() => {
setKpp(null)
setSeksi([])
setAr([])
setKppSelected(null)
setSeksiSelected([])
setArSelected([])
if (kanwilSelected && !isObjEmpty(kanwilSelected)) {
const kanwil = kanwilSelected.value
$.ajax({
url: base_url + "kewilayahan/ref/kppPratama",
method: "GET",
dataType: "json",
data: { kanwil },
success: (data) => {
setKpp(data)
}
})
}
}, [kanwilSelected])
useEffect(() => {
setSeksi([])
setAr([])
setSeksiSelected([])
setArSelected([])
if (kppSelected && !isObjEmpty(kppSelected)) {
// const kpp = collect(kppSelected).pluck("value").all()
const kpp = kppSelected.value
$.ajax({
url: base_url + "kewilayahan/ref/seksi",
method: "GET",
dataType: "json",
data: { kpp },
success: (data) => {
setSeksi(data)
}
})
}
}, [kppSelected])
useEffect(() => {
setAr([])
setArSelected([])
const seksi = collect(seksiSelected).pluck("value").all()
if (seksi.length && !isObjEmpty(seksiSelected)) {
const kpp = kppSelected.value
// const seksi = collect(seksiSelected).pluck("value").all()
$.ajax({
url: base_url + "kewilayahan/ref/ar",
method: "POST",
dataType: "json",
data: { kpp, seksi },
success: (data) => {
setAr(data)
}
})
}
}, [seksiSelected])
const buttonProsesOnClick = () => {
const nip_ar_perekam = collect(arSelected).pluck("value").all()
if (nip_ar_perekam.length) {
setDataSend({ opsiWilZona: activeTab, nip_ar_perekam })
setHiddenGraphMatoa(true)
} else {
toast.current.show({ severity: "info", summary: "Info", detail: "AR Perekam harus dipilih" })
}
}
return (
<>
<Row>
<Col md="3">
<Label className="form-label" for="basicInput">
Kanwil
</Label>
<Select
placeholder="Pilih Kanwil"
className="basic-single w-100"
onChange={(e) => {
setKanwilSelected(e)
}}
classNamePrefix="select"
// defaultValue={kanwilSelected}
value={kanwilSelected}
isClearable={false}
options={kanwil}
/>
</Col>
<Col md="3">
<Label className="form-label" for="Pilih KPP">
KPP
</Label>
<Select
placeholder="Pilih KPP"
className="basic-single w-100"
onChange={(e) => {
setKppSelected(e)
}}
classNamePrefix="select"
// defaultValue={kanwilSelected}
value={kppSelected}
isClearable={false}
options={kpp}
/>
</Col>
<Col md="3">
<Label className="form-label" for="Pilih Seksi">
Seksi
</Label>
<MultiSelect
className="me-1 w-full"
hasSelectAll={true}
debounceDuration={300}
options={seksi}
value={seksiSelected}
onChange={(e) => {
setSeksiSelected(e)
}}
labelledBy="Pilih Seksi"
overrideStrings={{ allItemsAreSelected: "Semua dipilih", selectSomeItems: "Pilih Seksi" }}
/>
</Col>
<Col md="3">
<Label className="form-label" for="Pilih AR">
AR Perekam
</Label>
<MultiSelect
className="me-1 w-full"
hasSelectAll={true}
debounceDuration={300}
options={ar}
value={arSelected}
onChange={(e) => {
setArSelected(e)
}}
labelledBy="Pilih AR"
overrideStrings={{ allItemsAreSelected: "Semua dipilih", selectSomeItems: "Pilih AR" }}
/>
</Col>
</Row>
<Row className="mt-2">
<Col sm="12">
<ButtonP onClick={() => buttonProsesOnClick()} label="Proses" severity="" rounded className="w-10rem text-white text-base" />
</Col>
</Row>
</>
)
}
export default NipPerekam

2
app/Views/kewilayahan/kytp/componentProgresifitas/ChartKPDL.js

@ -156,7 +156,7 @@ const ChartKpdl = ({ dataSend }) => {
<>
<Row>
<Col md="12">
<div className="d-flex justify-content-between ">
<div className="d-flex justify-content-between border-bottom-1 pb-2">
<div>
<span className="mr-2">Bulan :</span>
{bulan.map((val, idx) => {

9
app/Views/kewilayahan/kytp/componentProgresifitas/Identifikasi.js

@ -20,7 +20,6 @@ const Identifikasi = ({ dataSend }) => {
...dataSend
},
success: (data) => {
console.log(data)
setData(data.data)
}
})
@ -56,7 +55,13 @@ const Identifikasi = ({ dataSend }) => {
dataLabels: {
enabled: true,
style: { fontSize: "10px" },
format: "{point.name}: <br> {point.percentage:.1f} %"
// format: "{point.name}: {point.y} <br> {point.percentage:.1f} %"
formatter: function () {
return `${this.key} : ${Number(this.y).toLocaleString("id-ID", {
minimumFractionDigits: 0,
maximumFractionDigits: 0
})} <br> ${Number(this.percentage).toLocaleString("id-ID")}%`
}
}
}
// series: pie_click

2
app/Views/kewilayahan/kytp/componentProgresifitas/Pengampu.js

@ -44,7 +44,7 @@ const Pengampu = ({ dataSend }) => {
style: { fontSize: "10px" }
},
tooltip: {
pointFormat: "<b>{point.percentage:.1f}%</b><br>: {point.y} dari " + format_angka(total_wp) + " total lokasi KPDL"
pointFormat: "<b>{point.percentage:.1f}%</b><br>: {point.y} dari " + format_angka(total_wp) + " total NPWP yang ada"
},
accessibility: {
point: {

1
app/Views/kewilayahan/kytp/componentProgresifitas/Sof.js

@ -23,7 +23,6 @@ const Sof = ({ dataSend }) => {
bulan: cBulan
},
success: (data) => {
console.log(data)
setData(data.data)
setTotal({
totalC: collect(data.data).sum("JML_C"),

91
app/Views/kewilayahan/kytp/kpdl.js

@ -14,6 +14,8 @@ import "primereact/resources/themes/bootstrap4-light-blue/theme.css"
import "primeflex/primeflex.css"
import TabProgresifitas from "./TabProgresifitas"
import TabPenugasan from "./TabPenugasan"
import NipPerekam from "./componentDepan/NipPerekam"
import NipPengampu from "./componentDepan/NipPengampu"
// import 'bootstrap/dist/css/bootstrap.m in.css';
// let datasend = {}
@ -22,6 +24,8 @@ const Root = () => {
const refChart1 = useRef(null)
const toast = useRef(null)
const [active, setActive] = useState("wilayah")
const [hiddenGraphMatoa, setHiddenGraphMatoa] = useState(false)
const toggle = (tab) => {
setActive(tab)
}
@ -48,9 +52,11 @@ const Root = () => {
const [arSelected, setArSelected] = useState([])
const [zpSelected, setZpSelected] = useState([])
const [dataSend, setDataSend] = useState({ opsiWilZona: null, adm4_pcode: [], id_poly_zona: [] })
const [dataSend, setDataSend] = useState({ opsiWilZona: null, adm4_pcode: [], id_poly_zona: [], nip_ar_perekam: [], nip_ar_pengampu: [] })
const [dataGraphMatoa, setDataGraphMatoa] = useState({ poi_agg: [], kpdl_agg: [] })
const [nipArPengampu, setNipArPengampu] = useState([])
useEffect(() => {
$.ajax({
url: base_url + "kewilayahan/ref/propinsi",
@ -69,6 +75,9 @@ const Root = () => {
setKanwil(data)
}
})
let judul = document.getElementById("judul")
judul.innerHTML = "<h3><b><strong>E-Geospatial Thematic Tax</strong></b></h3>"
}, [])
useEffect(() => {
@ -114,10 +123,8 @@ const Root = () => {
useEffect(() => {
setKel([])
setKelSelected([])
console.log({ kecSelected })
if (kecSelected.length && !isObjEmpty(kecSelected)) {
const kec = collect(kecSelected).pluck("value").all()
console.log({ kec })
$.ajax({
url: base_url + "kewilayahan/ref/kelurahan",
method: "GET",
@ -205,7 +212,7 @@ const Root = () => {
const ar = collect(arSelected).pluck("value").all()
$.ajax({
url: base_url + "kewilayahan/ref/zpzp",
method: "GET",
method: "POST",
dataType: "json",
data: { kpp, seksi, ar },
success: (data) => {
@ -219,11 +226,13 @@ const Root = () => {
const opsiWilZona = active
const adm4_pcode = collect(kelSelected).pluck("value").all()
const id_poly_zona = collect(zpSelected).pluck("value").all()
const nip_ar_pengampu = collect().pluck("value").all()
switch (opsiWilZona) {
case "wilayah":
if (adm4_pcode.length) {
setDataSend({ opsiWilZona: "wilayah", adm4_pcode, id_poly_zona: [] })
setHiddenGraphMatoa(false)
} else {
toast.current.show({ severity: "info", summary: "Info", detail: "Kelurahan harus dipilih" })
}
@ -231,10 +240,12 @@ const Root = () => {
case "zona":
if (id_poly_zona.length) {
setDataSend({ opsiWilZona: "zona", adm4_pcode: [], id_poly_zona })
setHiddenGraphMatoa(false)
} else {
toast.current.show({ severity: "info", summary: "Info", detail: "Zona harus dipilih" })
}
break
default:
break
}
@ -270,8 +281,8 @@ const Root = () => {
height: "320"
},
title: {
text: "Poi Google dan Matoa"
// align: 'center'
text: "Poi Google Vs Matoa",
style: { fontSize: "14px" }
},
xAxis: [
@ -413,11 +424,6 @@ const Root = () => {
return (
<>
<Row className="text-center">
<Col>
<h2>E-Geospatial Thematic Tax</h2>
</Col>
</Row>
<Row>
<Col sm="12">
<Card>
@ -445,6 +451,28 @@ const Root = () => {
Zona Pengawasan
</NavLink>
</NavItem>
<NavItem>
<NavLink
style={{ cursor: "pointer" }}
active={active === "perekam"}
onClick={() => {
toggle("perekam")
}}
>
Perekam
</NavLink>
</NavItem>
<NavItem>
<NavLink
style={{ cursor: "pointer" }}
active={active === "pengampu"}
onClick={() => {
toggle("pengampu")
}}
>
Pengampu
</NavLink>
</NavItem>
</Nav>
<TabContent className="py-3" activeTab={active}>
<TabPane tabId="wilayah">
@ -526,7 +554,7 @@ const Root = () => {
</TabPane>
<TabPane tabId="zona">
<Row>
<Col md="2">
<Col md="3">
<Label className="form-label" for="basicInput">
Kanwil
</Label>
@ -543,7 +571,7 @@ const Root = () => {
options={kanwil}
/>
</Col>
<Col md="2">
<Col md="3">
<Label className="form-label" for="Pilih KPP">
KPP
</Label>
@ -559,20 +587,8 @@ const Root = () => {
isClearable={false}
options={kpp}
/>
{/* <MultiSelect
className="me-1 w-full"
hasSelectAll={true}
debounceDuration={300}
options={kpp}
value={kppSelected}
onChange={(e) => {
setKppSelected(e)
}}
labelledBy="Pilih KPP"
overrideStrings={{ allItemsAreSelected: "Semua dipilih", selectSomeItems: "Pilih KPP" }}
/> */}
</Col>
<Col md="2">
<Col md="3">
<Label className="form-label" for="Pilih Seksi">
Seksi
</Label>
@ -606,6 +622,8 @@ const Root = () => {
overrideStrings={{ allItemsAreSelected: "Semua dipilih", selectSomeItems: "Pilih AR" }}
/>
</Col>
</Row>
<Row className="mt-2">
<Col md="3">
<Label className="form-label" for="Pilih Zona">
Zona Pengawasan
@ -623,23 +641,32 @@ const Root = () => {
overrideStrings={{ allItemsAreSelected: "Semua dipilih", selectSomeItems: "Pilih Zona" }}
/>
</Col>
</Row>
<Row className="mt-2">
<Col sm="12">
<Col md="3" className="pt-4">
<ButtonP onClick={() => buttonProsesOnClick()} label="Proses" severity="" rounded className="w-10rem text-white text-base" />
</Col>
</Row>
</TabPane>
<TabPane tabId="perekam">
<NipPerekam dataSend={dataSend} setDataSend={setDataSend} activeTab={active} toast={toast} setHiddenGraphMatoa={setHiddenGraphMatoa} />
</TabPane>
<TabPane tabId="pengampu">
<NipPengampu dataSend={dataSend} setDataSend={setDataSend} activeTab={active} toast={toast} setHiddenGraphMatoa={setHiddenGraphMatoa} />
</TabPane>
</TabContent>
</CardBody>
</Card>
</Col>
</Row>
<Row>
<Row hidden={hiddenGraphMatoa}>
<Col sm="12">
<Card>
<CardBody>
<CardHeader className="d-flex justify-content-center p-2">
<CardTitle tag={"h1"} className="font-weight-bold">
Statistik Penguasaan Wilayah
</CardTitle>
</CardHeader>
<CardBody className="p-1">
<div id="graph_matoa_agg">
<HighchartsReact ref={refChart1} highcharts={Highcharts} options={optionsGraphMatoaAgg} />
</div>
@ -650,7 +677,7 @@ const Root = () => {
<Row>
<Col sm="12">
<Card>
<CardHeader className="d-flex justify-content-center">
<CardHeader className="d-flex justify-content-center p-2">
<CardTitle tag={"h1"} className="font-weight-bold">
Statistik Progresifitas Hasil Kegiatan Matoa
</CardTitle>

Loading…
Cancel
Save