diff --git a/app/Controllers/Kewilayahan/Kytp.php b/app/Controllers/Kewilayahan/Kytp.php
index a7671e4f..04213e8b 100644
--- a/app/Controllers/Kewilayahan/Kytp.php
+++ b/app/Controllers/Kewilayahan/Kytp.php
@@ -5,6 +5,7 @@ use App\Controllers\Kewilayahan\Sebaran\Identifikasi;
use App\Controllers\Kewilayahan\Sebaran\JenisStatus;
use App\Controllers\Kewilayahan\Sebaran\PayComp;
use App\Controllers\Kewilayahan\Sebaran\Pembayaran;
+use App\Controllers\Kewilayahan\Sebaran\Pengampu;
use App\Controllers\Kewilayahan\Sebaran\Sof;
use CodeIgniter\API\ResponseTrait;
use CodeIgniter\Controller;
@@ -97,6 +98,16 @@ class Kytp extends Controller
return $this->respond($dataReturn, 200);
}
+ public function sebaranPengampu()
+ {
+
+ $sebaran = new Pengampu;
+ $dataReturn['assign'] = $sebaran->data($this->request, 'assign');
+ $dataReturn['unassign'] = $sebaran->data($this->request, 'unassign');
+
+ return $this->respond($dataReturn, 200);
+ }
+
private function get_poi_agg()
{
diff --git a/app/Controllers/Kewilayahan/Sebaran/Pengampu.php b/app/Controllers/Kewilayahan/Sebaran/Pengampu.php
new file mode 100644
index 00000000..6fa40300
--- /dev/null
+++ b/app/Controllers/Kewilayahan/Sebaran/Pengampu.php
@@ -0,0 +1,54 @@
+getPost('opsiWilZona');
+ $adm4_pcode = $request->getPost('adm4_pcode') ?? [];
+ $id_poly_zona = $request->getPost('id_poly_zona') ?? [];
+
+ $db = \Config\Database::connect();
+
+ $npwp = $db->table('KPDL_MV_LOKASI_SUBJEK')->select("NM_KPP_ADM, count(1) JML", false)
+ ->groupBy("NM_KPP_ADM")->orderBy("JML", 'desc');
+ $kolom = "JNS_WP_MFWP";
+
+ switch ($jenis) {
+ case 'assign':
+
+ break;
+ case 'unassign':
+ $npwp = $npwp->where("NIP_AR_PENGAMPU", "NPWP TIDAK DITEMUKAN");
+ break;
+ default:
+
+ break;
+ }
+
+ if ($opsiWilZona == 'wilayah') {
+ $npwp->whereIn('ADM4_PCODE', $adm4_pcode);
+ }
+
+ if ($opsiWilZona == 'zona') {
+ $npwp->whereIn('ID_POLY_ZONA', $id_poly_zona);
+ }
+
+ $data = $npwp->get()->getResult();
+
+ $ret = [];
+
+ foreach ($data as $b) {
+
+ array_push($ret, ['name' => $b->NM_KPP_ADM,
+ // 'color' => ,
+ 'y' => floatval($b->JML),
+ ]
+ );
+ }
+
+ return $ret;
+ }
+}
diff --git a/app/Views/kewilayahan/dist/kpdl.js b/app/Views/kewilayahan/dist/kpdl.js
index 0ac5b6d4..f689e8cc 100644
--- a/app/Views/kewilayahan/dist/kpdl.js
+++ b/app/Views/kewilayahan/dist/kpdl.js
@@ -62325,6 +62325,95 @@ const JenisStatusWp = ({
}))));
};
/* harmony default export */ const componentProgresifitas_JenisStatusWp = (JenisStatusWp);
+;// CONCATENATED MODULE: ./app/Views/kewilayahan/kytp/componentProgresifitas/Pengampu.js
+
+
+
+
+
+
+const Pengampu = ({
+ dataSend
+}) => {
+ const base_url = "=base_url()?>";
+ const refChart = (0,react.useRef)(null);
+ const refChart2 = (0,react.useRef)(null);
+ const [dataAssign, setDataAssign] = (0,react.useState)(null);
+ const [dataUnAssign, setDataUnAssign] = (0,react.useState)(null);
+ (0,react.useEffect)(() => {
+ jQuery.get({
+ url: base_url + "kewilayahan/kytp/sebaranPengampu",
+ dataType: "json",
+ type: "POST",
+ data: {
+ ...dataSend
+ },
+ success: data => {
+ setDataAssign(data.assign);
+ setDataUnAssign(data.unassign);
+ }
+ });
+ }, [dataSend]);
+ const optionsChart = (data, title) => {
+ const total_wp = dist_default()(data).sum("y");
+ return {
+ chart: {
+ plotBackgroundColor: null,
+ plotBorderWidth: null,
+ plotShadow: false,
+ type: "pie",
+ zoomType: "xy",
+ height: "300"
+ },
+ title: {
+ text: title,
+ style: {
+ fontSize: "10px"
+ }
+ },
+ tooltip: {
+ pointFormat: "{point.percentage:.1f}%
: {point.y} dari " + format_angka(total_wp) + " total NPWP"
+ },
+ accessibility: {
+ point: {
+ valueSuffix: "%"
+ }
+ },
+ plotOptions: {
+ pie: {
+ allowPointSelect: true,
+ cursor: "pointer",
+ dataLabels: {
+ enabled: true,
+ style: {
+ fontSize: "10px"
+ },
+ format: "{point.name}:
{point.percentage:.1f} %"
+ }
+ }
+ // series: pie_click
+ },
+ series: [{
+ name: "",
+ data
+ }]
+ };
+ };
+ return /*#__PURE__*/react.createElement(react.Fragment, null, /*#__PURE__*/react.createElement(es_Row, null, /*#__PURE__*/react.createElement(es_Col, {
+ md: "6"
+ }, /*#__PURE__*/react.createElement((highcharts_react_min_default()), {
+ ref: refChart,
+ highcharts: (highcharts_default()),
+ options: optionsChart(dataAssign, "KPP Terdaftar")
+ })), /*#__PURE__*/react.createElement(es_Col, {
+ md: "6"
+ }, /*#__PURE__*/react.createElement((highcharts_react_min_default()), {
+ ref: refChart2,
+ highcharts: (highcharts_default()),
+ options: optionsChart(dataUnAssign, "Status UnAssign")
+ }))));
+};
+/* harmony default export */ const componentProgresifitas_Pengampu = (Pengampu);
;// CONCATENATED MODULE: ./app/Views/kewilayahan/kytp/TabProgresifitas.js
@@ -62334,6 +62423,7 @@ const JenisStatusWp = ({
+
function TabProgresifitas({
dataSend
}) {
@@ -62367,7 +62457,9 @@ function TabProgresifitas({
})), /*#__PURE__*/react.createElement(TabPanel, {
id: "tab_5",
header: "Pengampu"
- }), /*#__PURE__*/react.createElement(TabPanel, {
+ }, /*#__PURE__*/react.createElement(componentProgresifitas_Pengampu, {
+ dataSend: dataSend
+ })), /*#__PURE__*/react.createElement(TabPanel, {
id: "tab_6",
header: "KLU"
})));
@@ -62382,10 +62474,10 @@ function TabPenugasan({
className: "card"
}, /*#__PURE__*/react.createElement(TabView, null, /*#__PURE__*/react.createElement(TabPanel, {
id: "tab_1",
- header: "Penugasan"
+ header: "Identifikasi Lapangan (KPDL)"
}), /*#__PURE__*/react.createElement(TabPanel, {
id: "tab_2",
- header: "Aktifitas"
+ header: "Aktifitas pasca identifikasi"
}), /*#__PURE__*/react.createElement(TabPanel, {
id: "tab_3",
header: "Hasil"
diff --git a/app/Views/kewilayahan/kytp/TabPenugasan.js b/app/Views/kewilayahan/kytp/TabPenugasan.js
index e1f45287..88b0349a 100644
--- a/app/Views/kewilayahan/kytp/TabPenugasan.js
+++ b/app/Views/kewilayahan/kytp/TabPenugasan.js
@@ -5,8 +5,8 @@ export default function TabPenugasan({ dataSend }) {
return (