From d259a66586750fc09bce3ce378844cbe6328ecee Mon Sep 17 00:00:00 2001 From: Abah Roland Date: Tue, 1 Oct 2024 15:28:43 +0700 Subject: [PATCH] Rilis v2410.0.0 --- .gitignore | 9 + Modules/Anjungan/Config/anjungan.php | 40 + Modules/Anjungan/Config/index.html | 10 + .../Http/Controllers/Admin/Anjungan.php | 207 +++ .../Http/Controllers/Admin/Anjungan_menu.php | 235 ++++ .../Controllers/Admin/Anjungan_pengaturan.php | 96 ++ .../Anjungan/Http/Controllers/Anjungan.php | 79 ++ .../Http/Controllers/AnjunganBeranda.php | 58 + .../Http/Controllers/AnjunganSurat.php | 269 ++++ .../Http/Controllers/Surat_anjungan.php | 131 ++ Modules/Anjungan/Http/Controllers/index.html | 10 + Modules/Anjungan/Http/index.html | 10 + .../Anjungan/Models/Anjungan.php | 24 +- Modules/Anjungan/Models/AnjunganMenu.php | 147 +++ Modules/Anjungan/Models/index.html | 10 + Modules/Anjungan/Routes/index.html | 10 + Modules/Anjungan/Routes/web.php | 41 + .../Views}/admin/anjungan/form.blade.php | 0 .../Views}/admin/anjungan/index.blade.php | 0 .../admin/anjungan/peringatan.blade.php | 0 .../Views}/admin/anjungan_menu/form.blade.php | 0 .../admin/anjungan_menu/index.blade.php | 0 .../admin/anjungan_pengaturan/index.blade.php | 0 .../Views}/anjungan/beranda/content.blade.php | 2 +- .../Views}/anjungan/beranda/index.blade.php | 0 .../Anjungan/Views}/anjungan/index.blade.php | 0 .../Views}/anjungan/potrait.blade.php | 0 .../Views}/anjungan/surat/buat.blade.php | 2 +- .../Views}/anjungan/surat/form.blade.php | 2 +- .../anjungan/surat/permohonan.blade.php | 2 +- Modules/Anjungan/composer.json | 28 + Modules/Anjungan/index.html | 10 + Modules/Anjungan/module.json | 14 + app/Enums/StatusKawinSpesifikEnum.php | 2 +- app/Libraries/Rekap.php | 393 ++++++ .../Libraries/Stunting.php | 108 +- app/Libraries/TinyMCE.php | 2 +- app/Libraries/TinyMCE/FakeDataIsian.php | 2 +- app/Libraries/TinyMCE/KodeIsianPenduduk.php | 2 +- .../TinyMCE/KodeIsianPendudukLuar.php | 2 +- app/Libraries/TinyMCE/KodeIsianWilayah.php | 2 +- app/Models/Anak.php | 2 +- app/Models/FormatSurat.php | 2 +- app/Models/{AnjunganMenu.php => Gawai.php} | 60 +- app/Models/JamKerja.php | 2 +- app/Models/Keluarga.php | 2 +- app/Models/LogSurat.php | 2 +- app/Models/LogSuratDinas.php | 2 +- app/Models/Penduduk.php | 2 +- app/Models/Rtm.php | 2 +- app/Models/SettingAplikasi.php | 2 +- app/Models/SuratDinas.php | 2 +- app/Models/Theme.php | 2 +- app/Scopes/AccessWilayahScope.php | 2 +- app/Services/DTKSRegsosEk2022k.php | 2 +- assets/anjungan/css/style.css | 2 +- assets/import/template_surat_tinymce.json | 84 +- catatan_rilis.md | 43 +- composer.lock | 364 ++--- config/app.php | 3 + donjo-app/Routes/Web/admin.php | 36 +- donjo-app/Routes/Web/mandiri.php | 10 - donjo-app/Routes/web.php | 2 + .../Analisis_statistik_jawaban.php | 2 +- donjo-app/controllers/Anjungan.php | 481 ------- donjo-app/controllers/Buku_kepuasan.php | 2 +- donjo-app/controllers/First.php | 2 +- donjo-app/controllers/Gallery.php | 2 +- donjo-app/controllers/Gawai_layanan.php | 2 +- donjo-app/controllers/Inventaris_asset.php | 2 +- donjo-app/controllers/Kategori.php | 2 +- donjo-app/controllers/Komentar.php | 2 +- donjo-app/controllers/Man_user.php | 2 +- donjo-app/controllers/Menu.php | 2 +- donjo-app/controllers/Penduduk.php | 2 +- donjo-app/controllers/Penduduk_log.php | 2 +- donjo-app/controllers/Periksa.php | 2 +- donjo-app/controllers/Rtm.php | 2 +- donjo-app/controllers/Setting.php | 2 +- donjo-app/controllers/Stunting.php | 2 +- donjo-app/controllers/Surat_dinas.php | 2 +- donjo-app/controllers/Surat_master.php | 2 +- donjo-app/controllers/Wilayah.php | 2 +- .../auth/AuthenticatedSessionController.php | 2 +- donjo-app/controllers/fmandiri/Dokumen.php | 2 +- .../controllers/fmandiri/Surat_anjungan.php | 601 --------- .../fmandiri/anjungan/AnjunganSurat.php | 665 ---------- donjo-app/controllers/fweb/Kesehatan.php | 529 ++++++++ donjo-app/controllers/kehadiran/Perangkat.php | 2 +- donjo-app/core/AdminModulController.php | 2 +- .../AnjunganModulController.php} | 140 +- donjo-app/core/MY_Model.php | 2 +- .../core/MandiriModulController.php | 148 ++- .../ModulTrait.php} | 132 +- .../WebModulController.php} | 124 +- donjo-app/helpers/cek_helper.php | 2 +- donjo-app/helpers/general_helper.php | 53 +- donjo-app/helpers/illuminate_helper.php | 2 +- donjo-app/helpers/opensid_helper.php | 2 +- donjo-app/libraries/Log_Viewer.php | 2 +- donjo-app/libraries/Rekap.php | 795 ----------- donjo-app/models/Database_model.php | 2 +- donjo-app/models/Impor_model.php | 2 +- .../models/Keuangan_grafik_manual_model.php | 2 +- donjo-app/models/Keuangan_grafik_model.php | 2 +- donjo-app/models/Laporan_penduduk_model.php | 2 +- donjo-app/models/Penomoran_surat_model.php | 2 +- donjo-app/models/Program_bantuan_model.php | 2 +- donjo-app/models/Referensi_model.php | 2 +- donjo-app/models/Setting_model.php | 2 +- donjo-app/models/Statistik_penduduk_model.php | 2 +- donjo-app/models/Track_model.php | 2 +- .../models/migrations/Migrasi_2024090171.php | 2 +- .../models/migrations/Migrasi_2024091151.php | 110 -- .../models/migrations/Migrasi_2024100171.php | 247 ++++ donjo-app/models/migrations/Migrasi_beta.php | 6 +- .../seeders/dataAwal/SettingAplikasi.php | 2 +- .../controllers/Pelanggan_Controller.php | 2 +- .../analisis_statistik_jawaban/table.php | 2 +- package-lock.json | 1170 ++++++++++++----- resources/views/admin/auth/login.blade.php | 26 +- .../penduduk/rekapitulasi/cetak.blade.php | 2 +- .../views/admin/komentar/index.blade.php | 4 +- .../admin/laporan/rentan/cetak.blade.php | 2 +- .../admin/laporan/rentan/index.blade.php | 2 +- .../layouts/components/format_cetak.blade.php | 2 +- .../partials/control_sidebar.blade.php | 11 +- .../views/admin/penduduk/impor.blade.php | 2 +- .../admin/penduduk/rtm/anggota.blade.php | 12 +- .../views/admin/penduduk/rtm/index.blade.php | 11 +- .../admin/penduduk_log/ajax_edit.blade.php | 4 +- .../views/admin/penduduk_log/cetak.blade.php | 6 +- .../admin/pengaturan/modal_form.blade.php | 4 +- .../pengaturan_surat/asset_tinymce.blade.php | 2 +- .../admin/pengaturan_surat/form.blade.php | 35 + .../admin/pengaturan_surat/index.blade.php | 7 - .../admin/pengaturan_surat/kembali.blade.php | 8 - .../admin/pengaturan_surat/umum.blade.php | 29 +- .../views/admin/stunting/cetak.blade.php | 10 +- .../scorcard-konvergensi-desa.blade.php | 10 +- .../surat_dinas/pengaturan/form.blade.php | 35 + .../surat_dinas/pengaturan/index.blade.php | 7 - .../surat_dinas/pengaturan/kembali.blade.php | 11 +- .../surat_dinas/pengaturan/umum.blade.php | 26 +- .../views/admin/web/artikel/index.blade.php | 2 + .../views/admin/web/gallery/index.blade.php | 10 +- .../views/admin/web/kategori/index.blade.php | 9 +- .../views/admin/web/menu/ajax_form.blade.php | 15 + .../views/admin/web/widget/index.blade.php | 2 + resources/views/admin/wilayah/index.blade.php | 9 +- .../views/installer/steps/database.blade.php | 6 - .../views/installer/steps/welcome.blade.php | 2 +- .../layanan_mandiri/auth/index.blade.php | 2 +- storage/app/template/lampiran/f-1.01/view.php | 2 +- vendor/composer/installed.json | 202 +-- vendor/composer/installed.php | 96 +- .../src/Drive/Resource/Files.php | 20 +- .../LocalFilesystemAdapter.php | 2 +- .../src/ExtensionMimeTypeDetector.php | 2 +- .../src/FinfoMimeTypeDetector.php | 2 +- .../src/GeneratedExtensionToMimeTypeMap.php | 16 +- vendor/openspout/openspout/composer.json | 8 +- .../src/Common/Entity/Style/Style.php | 28 + .../Reader/SheetWithMergeCellsInterface.php | 18 + .../src/Reader/XLSX/Manager/SheetManager.php | 18 +- .../src/Reader/XLSX/Manager/StyleManager.php | 3 +- .../openspout/src/Reader/XLSX/Options.php | 1 + .../openspout/src/Reader/XLSX/Sheet.php | 38 +- .../src/Reader/XLSX/SheetMergeCellsReader.php | 69 + .../Common/Manager/Style/StyleMerger.php | 3 + .../XLSX/Manager/Style/StyleManager.php | 5 +- vendor/symfony/console/Terminal.php | 3 +- .../http-foundation/BinaryFileResponse.php | 8 +- vendor/symfony/http-foundation/Request.php | 7 +- .../EventListener/DebugHandlersListener.php | 14 + vendor/symfony/http-kernel/Kernel.php | 6 +- vendor/symfony/http-kernel/Log/Logger.php | 2 +- .../Profiler/FileProfilerStorage.php | 6 +- vendor/symfony/process/PhpSubprocess.php | 2 +- vendor/symfony/process/Process.php | 5 +- .../Resources/data/wcswidth_table_wide.php | 46 +- .../Resources/data/wcswidth_table_zero.php | 52 +- .../translation/Dumper/CsvFileDumper.php | 2 +- .../themes/esensi/layouts/kesehatan.tpl.php | 29 + vendor/themes/esensi/layouts/stat.tpl.php | 2 +- .../kesehatan/chart_stunting_posyandu.php | 27 + .../kesehatan/chart_stunting_umur.php | 48 + .../esensi/partials/kesehatan/index.php | 55 + .../esensi/partials/kesehatan/scorecard.php | 412 ++++++ .../esensi/partials/kesehatan/widget.php | 15 + .../peta/components/content_dusun.php | 2 +- .../esensi/partials/statistics/default.php | 31 +- vendor/themes/natra/layouts/kesehatan.tpl.php | 37 + vendor/themes/natra/partials/artikel.php | 2 +- .../kesehatan/chart_stunting_posyandu.php | 27 + .../kesehatan/chart_stunting_umur.php | 48 + .../themes/natra/partials/kesehatan/index.php | 51 + .../natra/partials/kesehatan/scorecard.php | 412 ++++++ .../natra/partials/kesehatan/widget.php | 23 + .../peta/components/content_dusun.php | 2 +- vendor/themes/natra/partials/statistik.php | 32 +- vendor/themes/natra/partials/wilayah.php | 2 +- 202 files changed, 5873 insertions(+), 4271 deletions(-) create mode 100644 Modules/Anjungan/Config/anjungan.php create mode 100644 Modules/Anjungan/Config/index.html create mode 100644 Modules/Anjungan/Http/Controllers/Admin/Anjungan.php create mode 100644 Modules/Anjungan/Http/Controllers/Admin/Anjungan_menu.php create mode 100644 Modules/Anjungan/Http/Controllers/Admin/Anjungan_pengaturan.php create mode 100644 Modules/Anjungan/Http/Controllers/Anjungan.php create mode 100644 Modules/Anjungan/Http/Controllers/AnjunganBeranda.php create mode 100644 Modules/Anjungan/Http/Controllers/AnjunganSurat.php create mode 100644 Modules/Anjungan/Http/Controllers/Surat_anjungan.php create mode 100644 Modules/Anjungan/Http/Controllers/index.html create mode 100644 Modules/Anjungan/Http/index.html rename donjo-app/models/migrations/Migrasi_2024091851.php => Modules/Anjungan/Models/Anjungan.php (78%) create mode 100644 Modules/Anjungan/Models/AnjunganMenu.php create mode 100644 Modules/Anjungan/Models/index.html create mode 100644 Modules/Anjungan/Routes/index.html create mode 100644 Modules/Anjungan/Routes/web.php rename {resources/views => Modules/Anjungan/Views}/admin/anjungan/form.blade.php (100%) rename {resources/views => Modules/Anjungan/Views}/admin/anjungan/index.blade.php (100%) rename {resources/views => Modules/Anjungan/Views}/admin/anjungan/peringatan.blade.php (100%) rename {resources/views => Modules/Anjungan/Views}/admin/anjungan_menu/form.blade.php (100%) rename {resources/views => Modules/Anjungan/Views}/admin/anjungan_menu/index.blade.php (100%) rename {resources/views => Modules/Anjungan/Views}/admin/anjungan_pengaturan/index.blade.php (100%) rename {resources/views/layanan_mandiri => Modules/Anjungan/Views}/anjungan/beranda/content.blade.php (98%) rename {resources/views/layanan_mandiri => Modules/Anjungan/Views}/anjungan/beranda/index.blade.php (100%) rename {resources/views/layanan_mandiri => Modules/Anjungan/Views}/anjungan/index.blade.php (100%) rename {resources/views/layanan_mandiri => Modules/Anjungan/Views}/anjungan/potrait.blade.php (100%) rename {resources/views/layanan_mandiri => Modules/Anjungan/Views}/anjungan/surat/buat.blade.php (97%) rename {resources/views/layanan_mandiri => Modules/Anjungan/Views}/anjungan/surat/form.blade.php (99%) rename {resources/views/layanan_mandiri => Modules/Anjungan/Views}/anjungan/surat/permohonan.blade.php (98%) create mode 100644 Modules/Anjungan/composer.json create mode 100644 Modules/Anjungan/index.html create mode 100644 Modules/Anjungan/module.json create mode 100644 app/Libraries/Rekap.php rename donjo-app/controllers/Anjungan_menu.php => app/Libraries/Stunting.php (57%) rename app/Models/{AnjunganMenu.php => Gawai.php} (73%) delete mode 100644 donjo-app/controllers/Anjungan.php delete mode 100644 donjo-app/controllers/fmandiri/Surat_anjungan.php delete mode 100644 donjo-app/controllers/fmandiri/anjungan/AnjunganSurat.php create mode 100644 donjo-app/controllers/fweb/Kesehatan.php rename donjo-app/{controllers/fmandiri/anjungan/AnjunganBeranda.php => core/AnjunganModulController.php} (80%) rename app/Models/Anjungan.php => donjo-app/core/MandiriModulController.php (76%) rename donjo-app/{controllers/Anjungan_pengaturan.php => core/ModulTrait.php} (74%) rename donjo-app/{controllers/fmandiri/anjungan/Anjungan.php => core/WebModulController.php} (76%) delete mode 100644 donjo-app/libraries/Rekap.php delete mode 100644 donjo-app/models/migrations/Migrasi_2024091151.php create mode 100644 donjo-app/models/migrations/Migrasi_2024100171.php create mode 100644 vendor/openspout/openspout/src/Reader/SheetWithMergeCellsInterface.php create mode 100644 vendor/openspout/openspout/src/Reader/XLSX/SheetMergeCellsReader.php create mode 100644 vendor/themes/esensi/layouts/kesehatan.tpl.php create mode 100644 vendor/themes/esensi/partials/kesehatan/chart_stunting_posyandu.php create mode 100644 vendor/themes/esensi/partials/kesehatan/chart_stunting_umur.php create mode 100644 vendor/themes/esensi/partials/kesehatan/index.php create mode 100644 vendor/themes/esensi/partials/kesehatan/scorecard.php create mode 100644 vendor/themes/esensi/partials/kesehatan/widget.php create mode 100644 vendor/themes/natra/layouts/kesehatan.tpl.php create mode 100644 vendor/themes/natra/partials/kesehatan/chart_stunting_posyandu.php create mode 100644 vendor/themes/natra/partials/kesehatan/chart_stunting_umur.php create mode 100644 vendor/themes/natra/partials/kesehatan/index.php create mode 100644 vendor/themes/natra/partials/kesehatan/scorecard.php create mode 100644 vendor/themes/natra/partials/kesehatan/widget.php diff --git a/.gitignore b/.gitignore index c7bbdceaa..7a221eed3 100644 --- a/.gitignore +++ b/.gitignore @@ -65,8 +65,17 @@ storage/logs php.ini +# Ignore all files in Modules Modules/* + +# Do not ignore Anjungan folder and its contents +!Modules/Anjungan/ +!Modules/Anjungan/** + +# Do not ignore specific files !Modules/.gitkeep !Modules/.htaccess !Modules/index.html + +# Ignore PHPUnit result cache file .phpunit.result.cache diff --git a/Modules/Anjungan/Config/anjungan.php b/Modules/Anjungan/Config/anjungan.php new file mode 100644 index 000000000..543045a2b --- /dev/null +++ b/Modules/Anjungan/Config/anjungan.php @@ -0,0 +1,40 @@ + 'anjungan', +]; diff --git a/Modules/Anjungan/Config/index.html b/Modules/Anjungan/Config/index.html new file mode 100644 index 000000000..c942a79ce --- /dev/null +++ b/Modules/Anjungan/Config/index.html @@ -0,0 +1,10 @@ + + + 403 Forbidden + + + +

Directory access is forbidden.

+ + + \ No newline at end of file diff --git a/Modules/Anjungan/Http/Controllers/Admin/Anjungan.php b/Modules/Anjungan/Http/Controllers/Admin/Anjungan.php new file mode 100644 index 000000000..65dd09043 --- /dev/null +++ b/Modules/Anjungan/Http/Controllers/Admin/Anjungan.php @@ -0,0 +1,207 @@ +input->is_ajax_request()) { + return datatables()->of(AnjunganModel::query()) + ->addColumn('ceklist', static function ($row) { + if (can('h')) { + return ''; + } + }) + ->addIndexColumn() + ->addColumn('aksi', static function ($row) use ($status): string { + $aksi = ''; + + if (can('u')) { + $aksi .= ' '; + $url_kunci = site_url("anjungan/kunci/{$row->id}"); + $disabled = $status !== '' && $status !== '0' ? '' : 'disabled'; + + if ($status === '' || $status === '0') { + $aksi .= ' '; + } elseif ($row->status) { + $aksi .= ' '; + } else { + $aksi .= ' '; + } + } + + if (can('h')) { + $aksi .= ' '; + } + + return $aksi; + }) + ->editColumn('ip_address_port_printer', static fn ($row) => ($row->printer_ip ?: '-:' . $row->printer_port) ?: '-') + ->editColumn('keyboard', static fn ($row): string => '' . StatusEnum::valueOf($row->keyboard) . '') + ->editColumn('status', static function ($row) use ($status): string { + if ($status === '' || $status === '0') { + $row->status = StatusEnum::TIDAK; + } + + return '' . StatusEnum::valueOf($row->status) . ''; + }) + ->rawColumns(['ceklist', 'aksi', 'keyboard', 'status']) + ->make(); + } + + return show_404(); + } + + public function form($id = null) + { + isCan('u'); + + if ($id) { + $data['action'] = 'Ubah'; + $data['form_action'] = ci_route('anjungan.update', $id); + $data['anjungan'] = AnjunganModel::findOrFail($id); + } else { + $data['action'] = 'Tambah'; + $data['form_action'] = ci_route('anjungan.insert'); + $data['anjungan'] = null; + } + + return view('admin.anjungan.form', $data); + } + + public function insert(): void + { + isCan('u'); + + if (AnjunganModel::create(static::validate($this->request))) { + redirect_with('success', 'Berhasil Tambah Data'); + } + redirect_with('error', 'Gagal Tambah Data'); + } + + public function update($id = null): void + { + isCan('u'); + + $data = AnjunganModel::findOrFail($id); + + if ($data->update(static::validate($this->request, $id))) { + redirect_with('success', 'Berhasil Ubah Data'); + } + redirect_with('error', 'Gagal Ubah Data'); + } + + public function delete($id = null): void + { + isCan('h'); + + if (AnjunganModel::destroy($id ?? $this->request['id_cb']) !== 0) { + redirect_with('success', 'Berhasil Hapus Data'); + } + redirect_with('error', 'Gagal Hapus Data'); + } + + public function kunci($id = null, $val = StatusEnum::TIDAK): void + { + isCan('u'); + + if (cek_anjungan() === '' || cek_anjungan() === '0') { + redirect_with('warning', 'Untuk mengaktifkan harus memesan anjungan terlebih dahulu.'); + } + + $kunci = AnjunganModel::findOrFail($id); + $kunci->update(['status' => ($val == StatusEnum::YA) ? StatusEnum::TIDAK : StatusEnum::YA, 'status_alasan' => null]); + + redirect_with('success', 'Berhasil Ubah Data'); + } + + // Hanya filter inputan + protected static function validate(array $request = [], $id = null): array + { + $anjungan = AnjunganModel::find($id); + $ip_address = AnjunganModel::where('ip_address', $request['ip_address'])->first(); + $mac_address = AnjunganModel::where('mac_address', $request['mac_address'])->first(); + $id_pengunjung = AnjunganModel::where('id_pengunjung', $request['id_pengunjung'])->first(); + + if ($ip_address && $anjungan->ip_address != $request['ip_address']) { + redirect_with('error', 'IP Address telah digunakan'); + } + + if ($mac_address && $anjungan->mac_address != $request['mac_address']) { + redirect_with('error', 'Mac Address telah digunakan'); + } + + if ($id_pengunjung && $anjungan->id_pengunjung != $request['id_pengunjung']) { + redirect_with('error', 'ID Pengunjung telah digunakan'); + } + + $validated = [ + 'ip_address' => strip_tags($request['ip_address']), + 'mac_address' => alfanumerik_kolon($request['mac_address']), + 'id_pengunjung' => alfanumerik($request['id_pengunjung']), + 'printer_ip' => bilangan_titik($request['printer_ip']), + 'printer_port' => bilangan($request['printer_port']), + 'keyboard' => bilangan($request['keyboard']), + 'keterangan' => htmlentities($request['keterangan']), + ]; + + $validated['created_by'] = $id ? $validated['updated_by'] = ci_auth()->id : ci_auth()->id; + + return $validated; + } +} diff --git a/Modules/Anjungan/Http/Controllers/Admin/Anjungan_menu.php b/Modules/Anjungan/Http/Controllers/Admin/Anjungan_menu.php new file mode 100644 index 000000000..551ce9248 --- /dev/null +++ b/Modules/Anjungan/Http/Controllers/Admin/Anjungan_menu.php @@ -0,0 +1,235 @@ +input->is_ajax_request()) { + $order = $this->input->get('order') ?? false; + + return datatables()->of(Menu::when(! $order, static fn ($q) => $q->orderBy('urut'))) + ->addColumn('drag-handle', static fn (): string => '') + ->addColumn('ceklist', static function ($row) { + if (can('h')) { + return ''; + } + }) + ->addIndexColumn() + ->addColumn('aksi', static function ($row): string { + $aksi = ''; + + if (can('u')) { + $aksi .= ' '; + + if ($row->status == StatusEnum::YA) { + $aksi .= ' '; + } else { + $aksi .= ' '; + } + } + + if (can('h')) { + $aksi .= ' '; + } + + return $aksi; + }) + ->rawColumns(['drag-handle', 'ceklist', 'aksi']) + ->make(); + } + + return show_404(); + } + + public function form($id = null) + { + isCan('u'); + $tipe_link = $this->referensi_model->list_ref(LINK_TIPE); + + $data['link_tipe'] = $tipe_link; + $data['artikel_statis'] = Artikel::statis()->get(); + $data['kategori_artikel'] = Kategori::where('enabled', 1)->get(); + $data['statistik_penduduk'] = $this->referensi_model->list_ref(STAT_PENDUDUK); + $data['statistik_keluarga'] = $this->referensi_model->list_ref(STAT_KELUARGA); + $data['statistik_kategori_bantuan'] = $this->referensi_model->list_ref(STAT_BANTUAN); + $data['statistik_program_bantuan'] = Bantuan::get(); + $data['kelompok'] = Kelompok::tipe('kelompok')->get(); + $data['lembaga'] = Kelompok::tipe('lembaga')->get(); + $data['suplemen'] = Suplemen::get(); + $data['statis_lainnya'] = $this->referensi_model->list_ref(STAT_LAINNYA); + $data['artikel_keuangan'] = Artikel::keuangan()->get(); + + if ($id) { + $data['action'] = 'Ubah'; + $data['form_action'] = ci_route('anjungan_menu.update', $id); + $data['menu'] = Menu::findOrFail($id); + } else { + $data['action'] = 'Tambah'; + $data['form_action'] = ci_route('anjungan_menu.insert'); + $data['menu'] = null; + } + + return view('admin.anjungan_menu.form', $data); + } + + public function insert(): void + { + isCan('u'); + + if (Menu::create(static::validate($this->request))) { + redirect_with('success', 'Berhasil Tambah Data'); + } + redirect_with('error', 'Gagal Tambah Data'); + } + + public function update($id = null): void + { + isCan('u'); + + $data = Menu::findOrFail($id); + + if ($data->update(static::validate($this->request, $id))) { + redirect_with('success', 'Berhasil Ubah Data'); + } + redirect_with('error', 'Gagal Ubah Data'); + } + + public function delete($id = null): void + { + isCan('h'); + + if (Menu::destroy($id ?? $this->request['id_cb']) !== 0) { + redirect_with('success', 'Berhasil Hapus Data'); + } + redirect_with('error', 'Gagal Hapus Data'); + } + + public function lock($id = 0): void + { + isCan('u'); + + if (Menu::gantiStatus($id, 'status')) { + redirect_with('success', 'Berhasil Ubah Status'); + } + + redirect_with('error', 'Gagal Ubah Status'); + } + + public function tukar() + { + isCan('u'); + + $menu = $this->input->post('data'); + Menu::setNewOrder($menu); + + return json(['status' => 1]); + } + + protected static function validate(array $request = [], $id = null): array + { + $urut = $id ? Menu::find($id)->urut : Menu::max('urut') + 1; + + return [ + 'nama' => htmlentities($request['nama']), + 'link' => $request['link'], + 'icon' => static::unggah('icon'), + 'link_tipe' => $request['link_tipe'], + 'urut' => $urut, + 'status' => 1, + ]; + } + + protected static function unggah($jenis = '') + { + $CI = &get_instance(); + $CI->load->library('MY_Upload', null, 'upload'); + folder(LOKASI_ICON_MENU_ANJUNGAN); + + $CI->uploadConfig = [ + 'upload_path' => LOKASI_ICON_MENU_ANJUNGAN, + 'allowed_types' => 'gif|jpg|jpeg|png', + 'max_size' => max_upload() * 1024, + ]; + // Adakah berkas yang disertakan? + if (empty($_FILES[$jenis]['name'])) { + return null; + } + // Tes tidak berisi script PHP + if (isPHP($_FILES[$jenis]['tmp_name'], $_FILES[$jenis]['name'])) { + redirect_with('error', 'Jenis file ini tidak diperbolehkan'); + } + $uploadData = null; + // Inisialisasi library 'upload' + $CI->upload->initialize($CI->uploadConfig); + // Upload sukses + if ($CI->upload->do_upload($jenis)) { + $uploadData = $CI->upload->data(); + $tipe_file = TipeFile($_FILES['icon']); + resizeImage(LOKASI_ICON_MENU_ANJUNGAN . $uploadData['file_name'], $tipe_file, ['width' => 100, 'height' => 100]); + + return $uploadData['file_name']; + } + redirect_with('error', $CI->upload->display_errors(null, null)); + + return null; + } +} diff --git a/Modules/Anjungan/Http/Controllers/Admin/Anjungan_pengaturan.php b/Modules/Anjungan/Http/Controllers/Admin/Anjungan_pengaturan.php new file mode 100644 index 000000000..5ac218617 --- /dev/null +++ b/Modules/Anjungan/Http/Controllers/Admin/Anjungan_pengaturan.php @@ -0,0 +1,96 @@ +pluck('value', 'key')->toArray(); + $data['anjungan_artikel'] = json_decode($data['pengaturan']['anjungan_artikel'], null); + $data['slides'] = Galery::where('parrent', 0)->where('enabled', 1)->get(); + + return view('admin.anjungan_pengaturan.index', $data); + } + + public function update(): void + { + isCan('u'); + + $data = static::validate($this->request); + + foreach ($data as $key => $value) { + SettingAplikasi::where('key', '=', $key)->update(['value' => $value]); + } + (new SettingAplikasi())->flushQueryCache(); + redirect_with('success', 'Berhasil Ubah Data'); + } + + protected static function validate(array $request = []): array + { + return [ + 'sebutan_anjungan_mandiri' => strip_tags($request['sebutan_anjungan_mandiri']), + 'anjungan_artikel' => json_encode($request['artikel'], JSON_THROW_ON_ERROR), + 'anjungan_teks_berjalan' => strip_tags($request['teks_berjalan']), + 'anjungan_profil' => bilangan($request['tampilan_profil']), + 'anjungan_video' => strip_tags($request['video']), + 'anjungan_youtube' => strip_tags($request['youtube']), + 'anjungan_slide' => bilangan($request['slide']), + 'tampilan_anjungan' => bilangan($request['screensaver']), + 'tampilan_anjungan_waktu' => bilangan($request['screensaver_waktu']), + 'tampilan_anjungan_slider' => bilangan($request['screensaver_slide']), + 'tampilan_anjungan_video' => strip_tags($request['screensaver_video']), + 'anjungan_layar' => bilangan($request['layar']), + ]; + } +} diff --git a/Modules/Anjungan/Http/Controllers/Anjungan.php b/Modules/Anjungan/Http/Controllers/Anjungan.php new file mode 100644 index 000000000..5b8ce1194 --- /dev/null +++ b/Modules/Anjungan/Http/Controllers/Anjungan.php @@ -0,0 +1,79 @@ +load->helper('web'); + $this->load->model('pamong_model'); + if (! cek_anjungan() || $this->cek_anjungan['tipe'] != 1) { + redirect('layanan-mandiri/beranda'); + } + } + + public function index() + { + $menu = AnjunganMenu::where('status', 1)->get(); + + $jumlah_artikel = setting('anjungan_layar') == 1 ? 4 : 6; + + $data = [ + 'cek_anjungan' => $this->cek_anjungan, + 'arsip_terkini' => Artikel::arsip()->orderBy('tgl_upload', 'DESC')->limit($jumlah_artikel)->get(), + 'arsip_populer' => Artikel::arsip()->orderBy('hit', 'DESC')->limit($jumlah_artikel)->get(), + 'tanggal' => Carbon::now()->dayName . ', ' . date('d/m/Y'), + 'menu' => $menu, + 'slides' => count($menu) > 5 ? 5 : count($menu), + 'teks_berjalan' => setting('anjungan_teks_berjalan'), + 'gambar' => Galery::where('parrent', setting('anjungan_slide'))->where('enabled', 1)->get(), + 'pamong' => $this->pamong_model->list_aparatur_desa()['daftar_perangkat'], + ]; + + $layar = setting('anjungan_layar') == 1 ? 'index' : 'potrait'; + + return view("anjungan.{$layar}", $data); + } +} diff --git a/Modules/Anjungan/Http/Controllers/AnjunganBeranda.php b/Modules/Anjungan/Http/Controllers/AnjunganBeranda.php new file mode 100644 index 000000000..df071627a --- /dev/null +++ b/Modules/Anjungan/Http/Controllers/AnjunganBeranda.php @@ -0,0 +1,58 @@ +session->is_anjungan) { + redirect(route('layanan-mandiri.beranda.index')); + } + } + + public function index() + { + $data['beranda'] = true; + + return view('anjungan.beranda.content', $data); + } +} diff --git a/Modules/Anjungan/Http/Controllers/AnjunganSurat.php b/Modules/Anjungan/Http/Controllers/AnjunganSurat.php new file mode 100644 index 000000000..ae4cd5349 --- /dev/null +++ b/Modules/Anjungan/Http/Controllers/AnjunganSurat.php @@ -0,0 +1,269 @@ +session->is_anjungan) { + redirect(route('layanan-mandiri.beranda.index')); + } + } + + public function buat($id = '') + { + $id_pend = $this->is_login->id_pend; + $permohonan = []; + // Cek hanya status = 0 (belum lengkap) yg boleh di ubah + if ($id) { + $obj = PermohonanSurat::where(['id' => $id, 'id_pemohon' => $id_pend, 'status' => 0])->first(); + + if (! $obj) { + redirect(route('anjungan.surat.buat')); + } + + $permohonan = $obj->toArray(); + $form_action = route('anjungan.surat.form', $id); + } else { + $form_action = route('anjungan.surat.form'); + } + + $data = [ + 'menu_surat_mandiri' => FormatSurat::kunci(FormatSurat::KUNCI_DISABLE)->mandiri()->get(), + 'menu_dokumen_mandiri' => SyaratSurat::get()->toArray(), + 'permohonan' => $permohonan, + 'form_action' => $form_action, + ]; + + return view('anjungan.surat.buat', $data); + } + + public function form($id = '') + { + $id_pend = $this->is_login->id_pend; + $surat = FormatSurat::find($id); + $syarat_surat = $this->getSyarat($surat->syarat_surat); + $penduduk = Penduduk::find($id_pend) ?? show_404(); + $individu = $penduduk->formIndividu(); + $data = []; + $data = array_merge($data, [ + 'syarat_surat' => $syarat_surat, + 'url' => $surat->url_surat, + 'individu' => $individu, + 'anggota' => $penduduk?->keluarga?->anggota?->toArray(), + 'surat_url' => rtrim($_SERVER['REQUEST_URI'], '/clear'), + 'form_action' => ci_route("surat/cetak/{$surat->url_surat}"), + 'anjungan' => true, + ]); + $this->get_data_untuk_form($surat->url_surat, $data); + + return view('anjungan.surat.form', $data); + } + + public function getSyarat($suratMaster) + { + $syaratSurat = SyaratSurat::query()->get(); + + $data = []; + + $syaratSuratList = json_decode($suratMaster, true); + + foreach ($syaratSurat as $baris) { + if (is_array($syaratSuratList) && in_array($baris->ref_syarat_id, $syaratSuratList)) { + + $data[] = $baris->ref_syarat_nama; + } + } + + return $data; + } + + private function get_data_untuk_form($url, array &$data): void + { + // Panggil 1 penduduk berdasarkan datanya sendiri + $data['penduduk'] = [$data['periksa']['penduduk']]; + + $data['surat_terakhir'] = LogSurat::lastNomerSurat($url); + $data['surat'] = FormatSurat::where('url_surat', $url)->first()->toArray(); + $data['input'] = $this->input->post(); + $data['input']['nomor'] = $data['surat_terakhir']['no_surat_berikutnya']; + $data['format_nomor_surat'] = FormatSurat::format_penomoran_surat($data); + } + + public function permohonan() + { + if ($this->input->is_ajax_request()) { + $printer = $this->print_connector(); + + return datatables(PermohonanSurat::with(['logSurat', 'surat'])->where('id_pemohon', $this->is_login->id_pend)->orWhereHas('logSurat', function ($q) { + $q->where('id_pend', $this->is_login->id_pend) + ->where('deleted_at', null); + })) + ->addIndexColumn() + ->addColumn('aksi', function ($item) use ($printer) { + $aksi = ''; + + if ($item->status == 0) { + $url = site_url("layanan-mandiri/surat/buat/{$item->id}"); + $aksi .= "Lengkapi Surat "; + } elseif ($item->status == 1) { + $aksi .= "{$item->statusPermohonan} "; + } elseif ($item->status == 2) { + $aksi .= "{$item->statusPermohonan} "; + } elseif ($item->status == 3) { + $aksi .= "{$item->statusPermohonan} "; + } elseif ($item->status == 4) { + $aksi .= "{$item->statusPermohonan} "; + } else { + $aksi .= " + {$item->statusPermohonan} + + "; + } + + if (in_array($item->status, ['0', '1'])) { + $url = site_url(MANDIRI . "/surat/proses/{$item->id}"); + $aksi .= " "; + } + + if ($item->no_antrian && $this->cek_anjungan && $printer) { + $url = site_url(MANDIRI . "/surat/cetak_no_antrian/{$item->no_antrian}"); + $aksi .= "No. Antrean "; + } + + if ($item->status == 3 && $item->logSurat?->last()?->tte != null) { + $url = site_url("layanan-mandiri/surat/cetak/{$item->logSurat?->last()?->id}"); + $aksi .= ""; + } + + return $aksi; + }) + ->editColumn('no_antrian', static fn ($item) => get_antrian($item->no_antrian)) + ->editColumn('created_at', static fn ($item) => tgl_indo2($item->created_at)) + ->rawColumns(['aksi']) + ->make(); + } + + return view('anjungan.surat.permohonan'); + } + + protected function print_connector() + { + if (null === ($anjungan = $this->cek_anjungan)) { + return; + } + + try { + $connector = new NetworkPrintConnector($anjungan['printer_ip'], $anjungan['printer_port'], 5); + } catch (Exception $e) { + log_message('error', $e->getMessage()); + + return false; + } + + return $connector; + } + + public function kirim($id = ''): void + { + $this->load->library('Telegram/telegram'); + $post = $this->input->post(); + + $surat = FormatSurat::where('url_surat', $post['url_surat'])->first(); + + $syrat = collect(json_decode($surat->syarat_surat, true)) + ->mapWithKeys(static fn ($item, $key) => [(string) ($key + 1) => $item]) + ->all(); + + $data = [ + 'config_id' => identitas('id'), + 'id_pemohon' => bilangan($post['nik']), + 'id_surat' => $surat->id, + 'isian_form' => json_encode($post, JSON_THROW_ON_ERROR), + 'status' => 1, // Selalu 1 bagi pengguna layanan mandiri + 'keterangan' => 'Permohonan Surat dari Anjungan Mandiri', + 'no_hp_aktif' => bilangan($post['no_hp_aktif']), + 'syarat' => json_encode($syrat, JSON_THROW_ON_ERROR), + 'updated_at' => date('Y-m-d H:i:s'), + ]; + + if ($id) { + PermohonanSurat::whereId($id)->update($data); + } else { + $data['created_at'] = $data['updated_at']; + + PermohonanSurat::insert($data); + + if (setting('telegram_notifikasi') && cek_koneksi_internet()) { + try { + // Data pesan telegram yang akan digantikan + $pesanTelegram = [ + '[nama_penduduk]' => $this->is_login->nama, + '[judul_surat]' => FormatSurat::find($post['id_surat'])->nama, + '[tanggal]' => tgl_indo2(date('Y-m-d H:i:s')), + '[melalui]' => 'Layanan Mandiri', + '[website]' => APP_URL, + ]; + + $kirimPesan = setting('notifikasi_pengajuan_surat'); + $kirimPesan = str_replace(array_keys($pesanTelegram), array_values($pesanTelegram), $kirimPesan); + $this->telegram->sendMessage([ + 'text' => $kirimPesan, + 'parse_mode' => 'Markdown', + 'chat_id' => $this->setting->telegram_user_id, + ]); + } catch (Exception $e) { + log_message('error', $e->getMessage()); + } + } + } + + $this->session->unset_userdata('data_permohonan'); + + redirect(route('anjungan.permohonan')); + } +} diff --git a/Modules/Anjungan/Http/Controllers/Surat_anjungan.php b/Modules/Anjungan/Http/Controllers/Surat_anjungan.php new file mode 100644 index 000000000..b9d07b608 --- /dev/null +++ b/Modules/Anjungan/Http/Controllers/Surat_anjungan.php @@ -0,0 +1,131 @@ +is_login->id_pend; + $permohonan = []; + // Cek hanya status = 0 (belum lengkap) yg boleh di ubah + if ($id) { + $obj = PermohonanSurat::where(['id' => $id, 'id_pemohon' => $id_pend, 'status' => 0])->first(); + + if (! $obj) { + redirect('layanan-mandiri/surat_anjungan/buat'); + } + $permohonan = $obj->toArray(); + $form_action = ci_route("layanan-mandiri/surat/form/{$id}"); + } else { + $form_action = ci_route('layanan-mandiri/surat/form'); + } + + $data = [ + 'penduduk_login' => Penduduk::find($id_pend), + 'menu_surat_mandiri' => FormatSurat::kunci(0)->mandiri()->get(), + 'menu_dokumen_mandiri' => SyaratSurat::get()->toArray(), + 'permohonan' => $permohonan, + 'form_action' => $form_action, + ]; + + return view('layanan_mandiri.surat.buat', $data); + } + + public function form($id = '') + { + $id_pend = $this->is_login->id_pend; + + $surat = FormatSurat::find($id); + $syarat_surat = $this->getSyarat($surat->syarat_surat); + $penduduk = Penduduk::find($id_pend) ?? show_404(); + $individu = $penduduk->formIndividu(); + $data = []; + $data = array_merge($data, [ + 'penduduk_login' => $penduduk, + 'syarat_surat' => $syarat_surat, + 'url' => $surat->url_surat, + 'individu' => $individu, + 'anggota' => $penduduk?->keluarga?->anggota?->toArray(), + 'surat_url' => rtrim($_SERVER['REQUEST_URI'], '/clear'), + 'form_action' => ci_route("surat/cetak/{$surat->url_surat}"), + 'cek_anjungan' => $this->cek_anjungan, + 'mandiri' => 1, + 'kembali' => 'Layanan Surat', + ]); + $this->get_data_untuk_form($surat->url_surat, $data); + + return view('layanan_mandiri.surat.form', $data); + } + + public function getSyarat($suratMaster) + { + $syaratSurat = SyaratSurat::query()->get(); + + $data = []; + + $syaratSuratList = json_decode($suratMaster, true); + + foreach ($syaratSurat as $baris) { + if (is_array($syaratSuratList) && in_array($baris->ref_syarat_id, $syaratSuratList)) { + + $data[] = $baris->ref_syarat_nama; + } + } + + return $data; + } + + private function get_data_untuk_form($url, array &$data): void + { + // Panggil 1 penduduk berdasarkan datanya sendiri + $data['penduduk'] = [$data['periksa']['penduduk']]; + + $data['surat_terakhir'] = LogSurat::lastNomerSurat($url); + $data['surat'] = FormatSurat::where('url_surat', $url)->first()->toArray(); + $data['input'] = $this->input->post(); + $data['input']['nomor'] = $data['surat_terakhir']['no_surat_berikutnya']; + $data['format_nomor_surat'] = FormatSurat::format_penomoran_surat($data); + } +} diff --git a/Modules/Anjungan/Http/Controllers/index.html b/Modules/Anjungan/Http/Controllers/index.html new file mode 100644 index 000000000..c942a79ce --- /dev/null +++ b/Modules/Anjungan/Http/Controllers/index.html @@ -0,0 +1,10 @@ + + + 403 Forbidden + + + +

Directory access is forbidden.

+ + + \ No newline at end of file diff --git a/Modules/Anjungan/Http/index.html b/Modules/Anjungan/Http/index.html new file mode 100644 index 000000000..c942a79ce --- /dev/null +++ b/Modules/Anjungan/Http/index.html @@ -0,0 +1,10 @@ + + + 403 Forbidden + + + +

Directory access is forbidden.

+ + + \ No newline at end of file diff --git a/donjo-app/models/migrations/Migrasi_2024091851.php b/Modules/Anjungan/Models/Anjungan.php similarity index 78% rename from donjo-app/models/migrations/Migrasi_2024091851.php rename to Modules/Anjungan/Models/Anjungan.php index 05bb513da..7d36beed2 100644 --- a/donjo-app/models/migrations/Migrasi_2024091851.php +++ b/Modules/Anjungan/Models/Anjungan.php @@ -35,25 +35,27 @@ * */ -use Illuminate\Database\Schema\Blueprint; -use Illuminate\Support\Facades\DB; -use Illuminate\Support\Facades\Schema; +namespace Modules\Anjungan\Models; + +use App\Models\Gawai; +use Illuminate\Database\Eloquent\Builder; defined('BASEPATH') || exit('No direct script access allowed'); -class Migrasi_2024091851 extends MY_model +class Anjungan extends Gawai { - public function up() + public function setTipeAttribute($value) { - return $this->migrasi_2024091251(true); + $this->attributes['tipe'] = self::ANJUNGAN; } - protected function migrasi_2024091251($hasil) + /** + * Apply a global scope to only include active status. + */ + protected static function booted() { - Schema::table('log_notifikasi_admin', static function (Blueprint $table) { - $table->longText('device')->nullable()->change(); + static::addGlobalScope('tipe', function (Builder $builder) { + $builder->where('tipe', self::ANJUNGAN); }); - - return $hasil; } } diff --git a/Modules/Anjungan/Models/AnjunganMenu.php b/Modules/Anjungan/Models/AnjunganMenu.php new file mode 100644 index 000000000..963361b52 --- /dev/null +++ b/Modules/Anjungan/Models/AnjunganMenu.php @@ -0,0 +1,147 @@ + + */ + protected $fillable = [ + 'nama', + 'icon', + 'link', + 'link_tipe', + 'urut', + 'status', + 'created_by', + 'updated_by', + ]; + + /** + * The relations to eager load on every query. + * + * @var array + */ + protected $with = [ + // 'createdBy', + // 'updatedBy', + ]; + + protected $appends = ['link_url']; + + /** + * {@inheritDoc} + */ + public $sortable = [ + 'order_column_name' => 'urut', + 'sort_when_creating' => true, + ]; + + /** + * Define a one-to-one relationship. + * + * @return \Illuminate\Database\Eloquent\Relations\hasOne + */ + public function createdBy() + { + return $this->hasOne(User::class, 'id', 'created_by'); + } + + /** + * Define a one-to-one relationship. + * + * @return \Illuminate\Database\Eloquent\Relations\hasOne + */ + public function updatedBy() + { + return $this->hasOne(User::class, 'id', 'updated_by'); + } + + /** + * The "booted" method of the model. + */ + public static function boot(): void + { + parent::boot(); + + static::updating(static function ($model): void { + static::deleteFile($model, 'icon'); + }); + + static::deleting(static function ($model): void { + static::deleteFile($model, 'icon', true); + }); + } + + public static function deleteFile($model, ?string $file, $deleting = false): void + { + if ($model->isDirty($file) || $deleting) { + $logo = LOKASI_ICON_MENU_ANJUNGAN . $model->getOriginal($file); + if (file_exists($logo)) { + unlink($logo); + } + } + } + + public function getLinkUrlAttribute() + { + return $this->attributes['link_tipe'] == 99 ? $this->attributes['link'] : menu_slug($this->attributes['link']); + } +} diff --git a/Modules/Anjungan/Models/index.html b/Modules/Anjungan/Models/index.html new file mode 100644 index 000000000..c942a79ce --- /dev/null +++ b/Modules/Anjungan/Models/index.html @@ -0,0 +1,10 @@ + + + 403 Forbidden + + + +

Directory access is forbidden.

+ + + \ No newline at end of file diff --git a/Modules/Anjungan/Routes/index.html b/Modules/Anjungan/Routes/index.html new file mode 100644 index 000000000..c942a79ce --- /dev/null +++ b/Modules/Anjungan/Routes/index.html @@ -0,0 +1,10 @@ + + + 403 Forbidden + + + +

Directory access is forbidden.

+ + + \ No newline at end of file diff --git a/Modules/Anjungan/Routes/web.php b/Modules/Anjungan/Routes/web.php new file mode 100644 index 000000000..bcf693770 --- /dev/null +++ b/Modules/Anjungan/Routes/web.php @@ -0,0 +1,41 @@ + Daftar Anjungan +Route::group('anjungan', ['namespace' => 'Anjungan/Admin'], static function (): void { + Route::get('/', 'Anjungan@index')->name('admin.anjungan.index'); + Route::get('/datatables', 'Anjungan@datatables')->name('admin.anjungan.datatables'); + Route::get('/form/{id?}', 'Anjungan@form')->name('admin.anjungan.form'); + Route::post('/insert', 'Anjungan@insert')->name('admin.anjungan.insert'); + Route::post('/update/{id?}', 'Anjungan@update')->name('admin.anjungan.update'); + Route::get('/delete/{id?}', 'Anjungan@delete')->name('admin.anjungan.delete'); + Route::post('/delete', 'Anjungan@delete')->name('admin.anjungan.delete-all'); + Route::get('/kunci/{id?}/{val?}', 'Anjungan@kunci')->name('admin.anjungan.kunci'); +}); + +// Anjungan > Menu +Route::group('anjungan_menu', ['namespace' => 'Anjungan/Admin'], static function (): void { + Route::get('/', 'Anjungan_menu@index')->name('anjungan_menu.index'); + Route::get('/datatables', 'Anjungan_menu@datatables')->name('anjungan_menu.datatables'); + Route::get('/form/{id?}', 'Anjungan_menu@form')->name('anjungan_menu.form'); + Route::post('/insert', 'Anjungan_menu@insert')->name('anjungan_menu.insert'); + Route::post('/update/{id?}', 'Anjungan_menu@update')->name('anjungan_menu.update'); + Route::get('/delete/{id?}', 'Anjungan_menu@delete')->name('anjungan_menu.delete'); + Route::post('/delete', 'Anjungan_menu@delete')->name('anjungan_menu.delete-all'); + Route::get('/lock/{id?}', 'Anjungan_menu@lock')->name('anjungan_menu.lock'); + Route::post('/tukar', 'Anjungan_menu@tukar')->name('anjungan_menu.tukar'); +}); + +// Anjungan > Pengaturan +Route::group('anjungan_pengaturan', ['namespace' => 'Anjungan/Admin'], static function (): void { + Route::get('/', 'Anjungan_pengaturan@index')->name('anjungan_pengaturan.index'); + Route::post('/update', 'Anjungan_pengaturan@update')->name('anjungan_pengaturan.update'); +}); + +Route::group('anjungan-mandiri', ['namespace' => 'Anjungan'], static function (): void { + Route::get('/', 'Anjungan@index')->name('anjungan.index'); + Route::get('/beranda', 'AnjunganBeranda@index')->name('anjungan.beranda.index'); + Route::get('/surat/{id?}', 'AnjunganSurat@buat')->name('anjungan.surat'); + Route::get('/surat/form/{id?}', 'AnjunganSurat@form')->name('anjungan.surat.form'); + Route::post('/surat/kirim', 'AnjunganSurat@kirim')->name('anjungan.surat.kirim'); + Route::get('/permohonan', 'AnjunganSurat@permohonan')->name('anjungan.permohonan'); +}); \ No newline at end of file diff --git a/resources/views/admin/anjungan/form.blade.php b/Modules/Anjungan/Views/admin/anjungan/form.blade.php similarity index 100% rename from resources/views/admin/anjungan/form.blade.php rename to Modules/Anjungan/Views/admin/anjungan/form.blade.php diff --git a/resources/views/admin/anjungan/index.blade.php b/Modules/Anjungan/Views/admin/anjungan/index.blade.php similarity index 100% rename from resources/views/admin/anjungan/index.blade.php rename to Modules/Anjungan/Views/admin/anjungan/index.blade.php diff --git a/resources/views/admin/anjungan/peringatan.blade.php b/Modules/Anjungan/Views/admin/anjungan/peringatan.blade.php similarity index 100% rename from resources/views/admin/anjungan/peringatan.blade.php rename to Modules/Anjungan/Views/admin/anjungan/peringatan.blade.php diff --git a/resources/views/admin/anjungan_menu/form.blade.php b/Modules/Anjungan/Views/admin/anjungan_menu/form.blade.php similarity index 100% rename from resources/views/admin/anjungan_menu/form.blade.php rename to Modules/Anjungan/Views/admin/anjungan_menu/form.blade.php diff --git a/resources/views/admin/anjungan_menu/index.blade.php b/Modules/Anjungan/Views/admin/anjungan_menu/index.blade.php similarity index 100% rename from resources/views/admin/anjungan_menu/index.blade.php rename to Modules/Anjungan/Views/admin/anjungan_menu/index.blade.php diff --git a/resources/views/admin/anjungan_pengaturan/index.blade.php b/Modules/Anjungan/Views/admin/anjungan_pengaturan/index.blade.php similarity index 100% rename from resources/views/admin/anjungan_pengaturan/index.blade.php rename to Modules/Anjungan/Views/admin/anjungan_pengaturan/index.blade.php diff --git a/resources/views/layanan_mandiri/anjungan/beranda/content.blade.php b/Modules/Anjungan/Views/anjungan/beranda/content.blade.php similarity index 98% rename from resources/views/layanan_mandiri/anjungan/beranda/content.blade.php rename to Modules/Anjungan/Views/anjungan/beranda/content.blade.php index 22f9fbf33..7129229eb 100644 --- a/resources/views/layanan_mandiri/anjungan/beranda/content.blade.php +++ b/Modules/Anjungan/Views/anjungan/beranda/content.blade.php @@ -1,4 +1,4 @@ -@extends('layanan_mandiri.anjungan.beranda.index') +@extends('anjungan.beranda.index') @push('css') \ No newline at end of file diff --git a/vendor/themes/natra/layouts/kesehatan.tpl.php b/vendor/themes/natra/layouts/kesehatan.tpl.php new file mode 100644 index 000000000..498da6fd6 --- /dev/null +++ b/vendor/themes/natra/layouts/kesehatan.tpl.php @@ -0,0 +1,37 @@ + + + + + + load->view("$folder_themes/commons/meta"); ?> + + + +
+ + +
+
+
+
+ load->view($folder_themes . '/partials/kesehatan/index'); + } else { + theme_view('partials/not_found'); + } ?> +
+
+
+
+ +load->view("$folder_themes/commons/meta_footer"); ?> + + diff --git a/vendor/themes/natra/partials/artikel.php b/vendor/themes/natra/partials/artikel.php index 5d483b9c1..dc9393669 100644 --- a/vendor/themes/natra/partials/artikel.php +++ b/vendor/themes/natra/partials/artikel.php @@ -71,7 +71,7 @@ -
+

Unduh Lampiran:
' title="">

diff --git a/vendor/themes/natra/partials/kesehatan/chart_stunting_posyandu.php b/vendor/themes/natra/partials/kesehatan/chart_stunting_posyandu.php new file mode 100644 index 000000000..a23718608 --- /dev/null +++ b/vendor/themes/natra/partials/kesehatan/chart_stunting_posyandu.php @@ -0,0 +1,27 @@ +
+
+
+ \ No newline at end of file diff --git a/vendor/themes/natra/partials/kesehatan/chart_stunting_umur.php b/vendor/themes/natra/partials/kesehatan/chart_stunting_umur.php new file mode 100644 index 000000000..70ccea3f0 --- /dev/null +++ b/vendor/themes/natra/partials/kesehatan/chart_stunting_umur.php @@ -0,0 +1,48 @@ +
+
+
+
+
+ + \ No newline at end of file diff --git a/vendor/themes/natra/partials/kesehatan/index.php b/vendor/themes/natra/partials/kesehatan/index.php new file mode 100644 index 000000000..89022d18e --- /dev/null +++ b/vendor/themes/natra/partials/kesehatan/index.php @@ -0,0 +1,51 @@ + + +
+
+

+
+
+ +
+ +
+ +
+ +
+ +
+ +
+ +
+ +
+
+
+ load->view($folder_themes . '/partials/kesehatan/widget'); ?> + load->view($folder_themes . '/partials/kesehatan/chart_stunting_umur'); ?> + load->view($folder_themes . '/partials/kesehatan/chart_stunting_posyandu'); ?> + load->view($folder_themes . '/partials/kesehatan/scorecard', $scorecard); ?> +
+
+ diff --git a/vendor/themes/natra/partials/kesehatan/scorecard.php b/vendor/themes/natra/partials/kesehatan/scorecard.php new file mode 100644 index 000000000..38becbb51 --- /dev/null +++ b/vendor/themes/natra/partials/kesehatan/scorecard.php @@ -0,0 +1,412 @@ +
+
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
TABEL 1. JUMLAH SASARAN 1.000 HPK (IBU + HAMIL DAN ANAK 0-23 BULAN)
+ Sasaran + JML TOTAL RUMAH TANGGA 1.000 HPK IBU HAMIL + ANAK 0 – + 23 BULAN
TOTALKEK/RESTITOTALGIZI KURANG/ GIZI + BURUK/STUNTING
Jumlah + + + + +
TABEL 2. HASIL PENGUKURAN TIKAR + PERTUMBUHAN (DETEKSI DINI STUNTING)
SasaranJUMLAH + TOTAL ANAK USIA 0 – 23 BULAN HIJAU + (NORMAL)Kuning (Resiko + Stunting)Merah Terindikasi + Stunting
Jumlah + + + + +
TABEL 3. KELENGKAPAN KONVERGENSI PAKET + LAYANAN PENCEGAHAN STUNTING BAGI 1.000 HPK
SasaranNoIndikatorJumlah%
Ibu Hamil + 1Ibu hamil periksa kehamilan paling sedikit 4 + kali selama kehamilan kehamilan. + + + +
2Ibu hamil mendapatkan dan minum 1 tablet + tambah darah (pil FE) setiap hari minimal selama 90 hari + + + +
3Ibu bersalin mendapatkan layanan nifas oleh + nakes dilaksanakan minimal 3 kali + + + +
4Ibu hamil mengikuti kegiatan konseling gizi + atau kelas ibu hamil minimal 4 kali selama kehamilan + + + +
5Ibu hamil dengan kondisi resiko tinggi + dan/atau Kekurangan Energi Kronis (KEK) mendapat kunjungan ke rumah oleh bidan Desa + secara terpadu minimal 1 bulan sekali + + + +
6Rumah Tangga Ibu hamil memiliki sarana akses + air minum yang aman + + + +
7Rumah Tangga Ibu hamil memiliki sarana + jamban keluarga yang layak + + + +
8Ibu hamil memiliki jaminan layanan kesehatan + + + + +
Anak 0 + sd 23 Bulan (0 sd 2 Tahun)1Bayi usia 12 bulan ke bawah mendapatkan + imunisasi dasar lengkap + + + +
2Anak usia 0-23 bulan diukur berat badannya + di posyandu secara rutin setiap bulan + + + +
3Anak usia 0-23 bulan diukur panjang/tinggi + badannya oleh tenaga kesehatan terlatih minimal 2 kali dalam setahun + + + +
4Orang tua/pengasuh yang memiliki + anak usia 0-23 bulan mengikuti kegiatan konseling gizi secara rutin minimal sebulan + sekali. LakiJumlah
000.00
5Anak usia 0-23 bulan dengan status gizi + buruk, gizi kurang, dan stunting mendapat kunjungan ke rumah secara terpadu minimal 1 + bulan sekali + + + +
6Rumah Tangga anak usia 0-23 bulan memiliki + sarana akses air minum yang aman + + + +
7Rumah Tangga anak usia 0-23 bulan memiliki + sarana jamban yang layak + + + +
8Anak usia 0-23 bulan memiliki akte kelahiran + + + + +
9Anak usia 0-23 bulan memiliki jaminan + layanan kesehatan + + + +
10Orang tua/pengasuh yang memiliki anak usia + 0-23 bulan mengikuti Kelas Pengasuhan minimal sebulan sekali + + + +
Anak 2 sd 6 Tahun + 1Anak usia 2-6 tahun terdaftar dan aktif + mengikuti kegiatan layanan PAUD + +
TABEL 4. TINGKAT KONVERGENSI DESA
+ NoSASARAN + JUMLAH + INDIKATORTINGKAT + KONVERGENSI (%)
YANG + DITERIMA + SEHARUSNYA DITERIMA
1Ibu Hamil + + +
2Anak 0 - 23 Bulan + + +
TOTAL TINGKAT + KONVERGENSI DESA + + +
TABEL 5. PENGGUNAAN DANA DESA DALAM + PENCEGAHAN STUNTING
+ No + BIDANG/KEGIATAN TOTAL + ALOKASI DANAKEGIATAN + KHUSUS PENCEGAHAN STUNTING
ALOKASI + DANA% + (PERSEN)
1Bidang Pembangunan Desa%
2Bidang Pemberdayaan Masyarakat Desa%
+
+
+
+
diff --git a/vendor/themes/natra/partials/kesehatan/widget.php b/vendor/themes/natra/partials/kesehatan/widget.php new file mode 100644 index 000000000..30bd29f63 --- /dev/null +++ b/vendor/themes/natra/partials/kesehatan/widget.php @@ -0,0 +1,23 @@ +
+ + $item): ?> +
+
+
+
+
+ +
+
+
+

+

+
+
+ +
+
+ +
diff --git a/vendor/themes/natra/partials/peta/components/content_dusun.php b/vendor/themes/natra/partials/peta/components/content_dusun.php index 5c1051540..49c79954a 100644 --- a/vendor/themes/natra/partials/peta/components/content_dusun.php +++ b/vendor/themes/natra/partials/peta/components/content_dusun.php @@ -34,7 +34,7 @@ -

" class="btn btn-social bg-navy btn-sm btn-block visible-sm-inline-block visible-md-inline-block visible-lg-inline-block" data-title="Kepala " data-remote="false" data-toggle="modal" data-target="#modalKecil">  Kepala   

+

" class="btn btn-social bg-navy btn-sm btn-block visible-sm-inline-block visible-md-inline-block visible-lg-inline-block" data-title="" data-remote="false" data-toggle="modal" data-target="#modalKecil">    

diff --git a/vendor/themes/natra/partials/statistik.php b/vendor/themes/natra/partials/statistik.php index 56746ff4e..9b4df93a6 100644 --- a/vendor/themes/natra/partials/statistik.php +++ b/vendor/themes/natra/partials/statistik.php @@ -3,7 +3,7 @@