From ebb8202244de90e6d9c2e869ac126af26b6290d6 Mon Sep 17 00:00:00 2001 From: sarwono <68048807+scqolbu24@users.noreply.github.com> Date: Thu, 1 Dec 2022 10:38:11 +0700 Subject: [PATCH] Rilis v22.12.01 * #72 Amankan route api penduduk dengan middleware. * Update phpcs.yml * #302 Pengaturan peta kecamatan yang sesuai perda setempat pada data kecamatan. Co-authored-by: Andi Fahruddin Akas * Sesuaikan sebutan desa yang tidak muncul. * #333 Sinkronisasi Data Pembangunan OpenSID ke OpenDK. Co-authored-by: Andi Fahruddin Akas * #401 Perbaiki tidak bisa ubah gambar slider. * #391 Perbaiki gagal upload foto profil user. Co-authored-by: Andi Fahruddin Akas * #384 Sediakan ganti password saat selesai login jika menggunakan password masih default. * #402 Perbaiki artikel baru tidak tampil dan sesuaikan urutannya. * #400 Perbaiki select data penyakit tidak sesuai dengan inputan pada form ubah data modul Epidemi Penyakit. * docs: update .all-contributorsrc * #416 Sinkronisasi Data Program Bantuan OpenSID ke OpenDK. Sesuaikan tampilan, perbaiki data yang tidak tampil * #368 Sediakan impor data Bantuan dari OpenSID. Co-authored-by: Andi Fahruddin Akas * Update DataDesa.php * perbaikan api pembangunan (#418) * Sesuaikan middleware API kirim data dari OpenSID * #412 Perbaiki error contoh data website demo saat intalasi awal. * perbaiki peta tidak tampil (#419) * Susulan : sinkronsisai bantuan dan sinkronisasi program (#422) * perbaikan detail bantuan * Fix styling Co-authored-by: apidong * pr susulan : peta wilayah (#423) * Update edit.blade.php * pindahkan peta wilayah ke tab lainnnya * Update edit.blade.php Co-authored-by: Andi Fahruddin Akas * Susulan perbaikan (#421) * Perbaiki dan hapus yang tidak digunakan * Update program_bantuan_22_12_2020_opendk.zip * Hapus yang tidak digunakan * Update 2022_04_20_115358_alter_programbantuan.php * Fix styling * Update 2022_04_20_115358_alter_programbantuan.php * Revert "Update 2022_04_20_115358_alter_programbantuan.php" This reverts commit efbfb3a2991531429e4df0e0d129867de7f31647. * Revert "Update 2022_04_20_115358_alter_programbantuan.php" This reverts commit d84c3ee5e9eec63a4a39e7a8b1efe4abf8688872. * Update ProgramBantuanController.php * Ganti kode_desa jadi desa_id * Update SinkronPesertaBantuan.php * Update SinkronPembangunan.php * Update PembangunanController.php Co-authored-by: andifahruddinakas * Gunakan contoh impor dari OpenSID * Sesuaikan tampilan tabel data pembangunan * Default foto jika null * update v22.06.01 * Menambahkan Solusi penambahan widget photo camat * Penambahan Keterangan Solusi * Penambahan Foto Camat Pada Sidebar * Solusi Eror 500 Ketika Klik lihat prosedur * ignore `.phpcs-cache` * mengembalikan code dan hanya update untuk photo camat saja * mengembalikan code dan hanya update untuk photo camat saja * error 500 setelah login (#427) * Update web.php * [ci skip] Mutakhirkan catatan rilis Co-authored-by: Agung Sugiarto * [ci skip] Mutakhirkan catatan rilis * perbaiki lihat daftar prosedur pada web di menu unduhan - error 500 (#442) * perbaikan slug untuk prosedur * Fix styling * [ci skip] Mutakhirkan catatan rilis Co-authored-by: apidong Co-authored-by: Agung Sugiarto * update catatan rilis * perbaikan status pengunjung tidak bertambah (#443) * perbaiki counter pengunjung * Fix styling * [ci skip] Mutakhirkan catatan rilis Co-authored-by: apidong Co-authored-by: Agung Sugiarto * update versi dan catatan rilis (#444) * Catatan rilis * Perbaiki tidak ada kepala keluarga di kk * [ci skip] memutakhirkan catatan rilis * Tambah tombol filter berdasarkan tanggal (#449) * Tambah tombol filter berdasarkan tanggal * Fix styling * Sesuaikan value * Perbaiki tidak ada kepala keluarga di kk * [ci skip] memutakhirkan catatan rilis * u * Fix styling Co-authored-by: yogiperdana Co-authored-by: vickyrolanda Co-authored-by: Vicky Rolanda <59082428+vickyrolanda@users.noreply.github.com> Co-authored-by: firlianif Co-authored-by: FirlianiF * Ubah versi ke 22.08 * Laravel v7.x (#318) * update version - cviebrock/eloquent-sluggable - laravel/framework - guzzlehttp/guzzle - mockery/mockery * update Handler.php * sesuaikan dengan Laravel v7.x * add laravel ui Co-authored-by: Afila * susulan upgrade v7.0 (#460) * upgrade v7.0 * update * Update catatan_rilis.md * Update catatan_rilis.md Co-authored-by: Afila * Terapkan sentry untuk menangkap log (#409) * tambahkan sentry sebagai loging * Fix styling * tatapkan nilai default * Update sentry.php Co-authored-by: apidong Co-authored-by: Yogi Perdana * mutakhirkan catatan rilis * Tombol jalankan queue listener (#451) * Tambahkan tombol gunakan queue * Berhenti ketika queue selesai * Gunakan ajax untuk menjalankan artisan * Fix styling * Tambah alert ketika queue sukses * Buat state on progress * Tambah alert berhasil Co-authored-by: yogiperdana * Media sosial widget (#455) * Buat migrasi dan seeder media sosial * Atur menu dan route media sosial * Buat menu navigasi pengaturan media sosial * Buat modal media sosial * Buat form facebook * Buat form update facebook * Buat fungsi edit facebook * Buat update medsos lainnya * Sesuaikan gitignore * Sesuaikan gitignore * Tampilkan widget di halaman depan * Fix styling * Sesuaikan migrasi dan seeder * Sesuaikan routes dan model * Fix styling * Gunakan datatable * Buat fungsi tambah * Buat fungsi delete * Buat fungsi edit * Fix styling * Hapus kolom mime_type * Sesuaikan tombol url * Sesuaikan tampilan medsos di front web * Sesuaikan gitignore * Sesuaikan gitignore storage * Hapus helper yang tidak digunakan * Fix styling * [ci skip] memutakhirkan catatan rilis Co-authored-by: yogiperdana Co-authored-by: vickyrolanda * Perbaiki sinkronisasi berita OpenSID ke OpenDK (#465) * Perbaiki sinkronisasi berita OpenSID ke OpenDK * [ci skip] memutakhirkan catatan rilis Co-authored-by: vickyrolanda * 267 data suplemen (#459) * Buat migrasi suplemen dan suplemen terdata * Buat model suplemen dan suplemen terdata * Buat controller suplemen * Buat menu data suplemen * Tampilkan data suplemen * Buat relasi suplemen dan suplemen terdata * Atur setting db menjadi strict kembali * Buat form data suplemen * Buat fungsi update data suplemen * Sesuaikan nama fungsi suplemen * Buat fungsi tambah suplemen * Buat fungsi hapus data suplemen * Sesuaikan nama fungsi get data suplemen * Buat halaman detail data suplemen * Buat relasi suplemen terdata dengan penduduk * Buat relasi penduduk dengan desa * Sesuaikan datatable suplemen terdata * Tambah tombol tambah suplemen terdata * Buat fungsi tambah penduduk terdata * Validasi datatable detail data suplemen * Buat fungsi tambah keluarga terdata * Buat form untuk tambah desa * Buat fungsi tambah suplemen terdata desa * Buat kolom keterangan boleh tidak diisi * Perbaiki menu navigasi data suplemen * Buat fungsi hapus suplemen terdata * Tambah notifikasi berhasil atau gagal di suplemen terdata * Perbaiki breadcrumb data suplemen * Buat fungsi edit * Perbaiki form edit * Sesuaikan sebuatan suplemen terdata * Fix styling * Hapus sasaran desa * Disable form penduduk sebelum desa dipilih * Perbaiki terdapat penduduk ganda dalam satu suplemen * Fix styling * Rapikan cek anggota ganda * Fix styling * Perbaiki penduduk tidak muncul * Perbaiki sub judul berantakan * Perbaiki get penduduk * Perbaiki url tombol batal * Perbaiki penduduk ganda * Buat validasi hapus data suplemen yang tidak kosong * [ci skip] memutakhirkan catatan rilis Co-authored-by: yogiperdana Co-authored-by: Yogi Perdana Co-authored-by: vickyrolanda * Perbaiki peta koordinat data umum kosong (#467) * Perbaiki peta koordinat data umum kosong * Perbaiki keterangan setter * perbaiki peta * Fix styling * Update catatan_rilis.md Co-authored-by: Afila Co-authored-by: apidong * Susulan medsos (#469) * Perbaiki validasi gambar * Sesuaikan agar widget tidak tampil ketika kosong * Susulan tombol queue (#470) * Buat component sweetalert * Jalankan sweetalert * Hapus yang tidak digunakan Co-authored-by: vickyrolanda * 463 sinergi program (#468) * Buat migrasi * Buat routes * Buat controller * Buat model * Buat menu sinergi program * Buat halaman tampilkan data * Sesuaikan nama variabel * Buat fungsi tambah * Tampilkan gambar di datatable * Buat fungsi edit * Buat fungsi urutan otomatis * Buat fungsi urutan data * Tampilkan widget * Fix styling * Perbaiki nama variabel * Fix styling * Perbaiki komentar * Perbaiki redirect urutan * Perbaiki validasi gambar * Perbaiki padding dan margin widget * Perbaiki urutan widget * [ci skip] Memutakhirkan catatan rilis Co-authored-by: yogiperdana Co-authored-by: vickyrolanda * Perbaiki penduduk tetap masuk ketika desa kosong (#472) * Perbaiki penduduk tetap masuk ketika desa kosong * Fix styling * [ci skip] Mutakhirkan catatan rilis Co-authored-by: yogiperdana Co-authored-by: Agung Sugiarto * 476 logo medsos (#477) * Perbaiki logo medsos ketarik * Buat cropping di tengah * - gunakan width agar tidak terpotong * - mutakhirkan catatan rilis * [ci skip] Mutakhirkan catatan rilis Co-authored-by: unknown Co-authored-by: Afila Co-authored-by: Agung Sugiarto * 475 gambar sinergi program (#478) * Perbaiki gambar sinergi program berantakan * [ci skip] Mutakhirkan catatan rilis Co-authored-by: Agung Sugiarto * Hapus peserta program bantuan ketika melakukan impor (#481) * Hapus peserta program bantuan ketika melakukan impor * Fix styling * Hapus program ketika impor program * [ci skip] Mutakhirkan catatan rilis Co-authored-by: yogiperdana Co-authored-by: Agung Sugiarto * Tambah caption gambar di artikel (#485) * Tambah caption gambar di artikel * [ci skip] memutakhirkan catatan rilis Co-authored-by: vickyrolanda * 486 komplain (#488) * Perbaiki daftar komplain terjawab * [ci skip] memutakhirkan catatan rilis Co-authored-by: vickyrolanda * Admin komplain (#492) * Buat super admin dan admin kecamatan dapat membalas keluhan * Perbaiki error ketika membuka admin komplain membuka komplain * Fix styling * [ci skip] memutakhirkan catatan rilis Co-authored-by: yogiperdana Co-authored-by: vickyrolanda * 432 profil (#489) * Buat validasi clien side data profil * Hapus helper validasi * Perbaiki validasi digit * [ci skip] memutakhirkan catatan rilis Co-authored-by: vickyrolanda * pantau opendk (#495) * track * Fix styling * Update Controller.php * [ci skip] memutahirkan catatan rilis Co-authored-by: apidong Co-authored-by: vickyrolanda * Error feeds (#496) * Perbaiki feeds tidak dapat di get * [ci skip] memutakhirkan catatan rilis Co-authored-by: vickyrolanda * perubahan title issue #504 * nonaktifkan jawab keluhan jika status Selesai * fix issue #499 * Sesuaikan redaksi * Mutakhirkan catatan rilis * Mutakhirkan catatan rilis * Mutakhirkan catatan rilis * penambahan fitur komentar keluhan pada dashboard admin * - penambahan foto penduduk pada detail keluhan - fix typo - ubah beri komentar menjadi jawab * Perbaiki relasi pembangunan (#524) * Perbaiki relasi pembangunan * Update catatan_rilis.md Co-authored-by: Afila * Perbaiki relasi potensi (#526) * Perbaiki relasi potensi * Update catatan_rilis.md Co-authored-by: Afila * Perbaiki foto penduduk (#530) * Perbaiki foto penduduk * Merge branch 'dev' into foto-komplain * Update catatan_rilis.md Co-authored-by: Afila * Jabatan (#527) * Buat routes * Buat migrasi * Buat data awal * Buat fungsi pengaturan jabatan * Fix styling * Perbaiki kolom id * Gunakan enums * Buat validasi client-side * Refactor pesan error * Gunakan route resource * Fix styling * Sesuaikan penggunaan enum * Fix styling * memutakhirkan catatan rilis * memutakhirkan catatan rilis Co-authored-by: yogiperdana Co-authored-by: vickyrolanda * perbaikan ubah jawaban pada halaman depan * Pengguna (#533) * Buat routes * Buat migrasi * Buat data awal * Buat fungsi pengaturan jabatan * Fix styling * Buat migrasi * Buat model * Sesuaikan menu * Buat form * Buat fungsi tambah * Tampilkan data * Sesuaikan form dan tabel * Buat fungsi edit dan hapus * Batasi camat dan sekcam hanya 1 orang * Buat validasi * Buat validasi client-side * Buat fungsi aktif dan non aktifkan status * Fix styling * Buat migrasi * Hubungkan pengguna dengan pengurus * Fix styling * Sesuaikan migrasi * Perbaiki validasi * Fix styling * Perbaiki kolom id * Gunakan enums * Buat validasi client-side * Refactor pesan error * Gunakan route resource * Fix styling * Sesuaikan penggunaan enum * Refactor routes dan validasi * Gunakan enum * Fix styling * Refactor upload file * Fix styling * Fix styling * Sesuaikan route * Perbaiki salah resolve conflict * Perbaiki validasi edit * mutahirkan catatan rilis Co-authored-by: yogiperdana Co-authored-by: Raka Priyo * Perangkat kecamatan (#531) * Buat routes * Buat migrasi * Buat data awal * Buat fungsi pengaturan jabatan * Fix styling * Buat migrasi * Buat model * Sesuaikan menu * Buat form * Buat fungsi tambah * Tampilkan data * Sesuaikan form dan tabel * Buat fungsi edit dan hapus * Batasi camat dan sekcam hanya 1 orang * Buat validasi * Buat validasi client-side * Buat fungsi aktif dan non aktifkan status * Fix styling * Sesuaikan migrasi * Perbaiki validasi * Perbaiki kolom id * Gunakan enums * Buat validasi client-side * Refactor pesan error * Gunakan route resource * Fix styling * Sesuaikan penggunaan enum * Refactor routes dan validasi * Gunakan enum * Fix styling * Refactor upload file * Fix styling * Sesuaikan route * Perbaiki salah resolve conflict * Perbaiki validasi edit * Perbaiki foto default * mutahirkan catatan rilis Co-authored-by: yogiperdana Co-authored-by: Raka Priyo * Susulan pengurus (#550) * Perbaikan catatan rilis * Buat filter status * Validasi camat dan sekretaris * Fix styling * Validasi perubahan status * Fix styling * Validasi hanya pengurus aktif yang dapat ditambahkan * Perbaiki validasi * Refactor cek pengurus aktif * Fix styling Co-authored-by: yogiperdana * Preview foto user (#551) * Perbaikan catatan rilis * Buat filter status * Validasi camat dan sekretaris * Fix styling * Validasi perubahan status * Fix styling * Validasi hanya pengurus aktif yang dapat ditambahkan * Perbaiki validasi * Refactor cek pengurus aktif * Buat preview foto di user * Fix styling * Susulan pengurus (#550) * Perbaikan catatan rilis * Buat filter status * Validasi camat dan sekretaris * Fix styling * Validasi perubahan status * Fix styling * Validasi hanya pengurus aktif yang dapat ditambahkan * Perbaiki validasi * Refactor cek pengurus aktif * Fix styling Co-authored-by: yogiperdana * mutakhirkan catatan rilis Co-authored-by: yogiperdana Co-authored-by: sarwono * penambahan fitur komentar keluhan pada dashboard admin (#508) * penambahan fitur komentar keluhan pada dashboard admin * - penambahan foto penduduk pada detail keluhan - fix typo - ubah beri komentar menjadi jawab * perbaikan ubah jawaban pada halaman depan * Mutakhirkan catatan rilis * Perbaiki foto artikel tidak terhapus (#536) * Perbaiki foto artikel tidak terhapus * Fix styling * Update catatan_rilis.md Co-authored-by: Afila Co-authored-by: apidong * Perbaiki format tanggal (#560) * Perbaiki format tanggal * Perbaiki tanggal cetak kk * Perbaiki format tanggal cetak kk detail * Perbaiki format tanggal lahir penduduk * Perbaiki tanggal terbit artikel * penduduk - tanggal nikah, tgl cerai, tgl pasport * perbaikan * Update catatan_rilis.md Co-authored-by: Afila * Tambahkan data untuk di kirim ke tracksid (#537) * tambahkan data untuk di kirim * Update Controller.php * Update catatan_rilis.md * Perbaiki foto sinergi tidak tampil dihalaman lain selain halaman utama (#564) * Perbaiki foto sinergi tidak tampil dihalaman lain selain halaman utama * Update catatan_rilis.md Co-authored-by: Afila * Perbaiki foto media sosial tidak muncul di halaman lain (#566) * Perbaiki foto media sosial tidak muncul di halaman lain * Update catatan_rilis.md Co-authored-by: Afila * Perbaiki edit grup pengguna selalu admin desa (#568) * Perbaiki edit grup pengguna selalu admin desa * Update catatan_rilis.md Co-authored-by: Afila * Perbaiki kolom id kartu peserta (#569) * Perbaiki kolom id kartu peserta * Fix styling * Update catatan_rilis.md Co-authored-by: yogiperdana Co-authored-by: Afila * tambahkan jumlah bantuan * perbaikan kirim tracksid * Update Controller.php * Refactor sidebar admin (#563) * Refactor sidebar admin * Fix styling * mutakhirkan catatan rilis Co-authored-by: yogiperdana Co-authored-by: sarwono * 570 kolom perangkat (#571) * Buat migrasi * Perbaiki migrasi * Sesuaikan form, validasi, controller dan model * Sesuaikan widget camat * Fix styling * Gunakan enum * Fix styling * Sesuaikan pemanggilan camat * Fix styling * Refactor sidebar admin (#563) * Refactor sidebar admin * Fix styling * mutakhirkan catatan rilis Co-authored-by: yogiperdana Co-authored-by: sarwono Co-authored-by: yogiperdana Co-authored-by: sarwono * Rilis v22.12.01 * Mutakhirkan catatan rilis Co-authored-by: Afila Co-authored-by: Andi Fahruddin Akas Co-authored-by: Andi Fahruddin Akas <57283157+andifahruddinakas@users.noreply.github.com> Co-authored-by: widoagus17 <87120968+widoagus17@users.noreply.github.com> Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com> Co-authored-by: apidong Co-authored-by: andifahruddinakas Co-authored-by: vickyrolanda <59082428+vickyrolanda@users.noreply.github.com> Co-authored-by: Toto Prayogo Co-authored-by: Agung Sugiarto Co-authored-by: Yogi Perdana Co-authored-by: vickyrolanda Co-authored-by: yogiperdana Co-authored-by: firlianif Co-authored-by: FirlianiF Co-authored-by: Yogi Perdana Co-authored-by: Yonathan Rizky Co-authored-by: Raka Priyo Co-authored-by: yonathanrizky <58940381+yonathanrizky@users.noreply.github.com> --- app/Enums/JenisJabatan.php | 44 ++ app/Enums/Status.php | 43 ++ app/Http/Controllers/Controller.php | 42 +- .../Data/AdminKomplainController.php | 55 +++ .../Data/DataPembangunanController.php | 3 + .../Controllers/Data/JabatanController.php | 155 ++++++++ .../Controllers/Data/KeluargaController.php | 2 + .../Controllers/Data/PengurusController.php | 260 ++++++++++++ .../Controllers/Data/ProfilController.php | 8 - .../Data/ProgramBantuanController.php | 2 +- .../Informasi/ArtikelController.php | 6 +- .../SistemKomplainController.php | 3 +- app/Http/Controllers/User/UserController.php | 7 +- app/Http/Requests/JabatanRequest.php | 60 +++ app/Http/Requests/PengurusRequest.php | 81 ++++ app/Http/Requests/ProfilRequest.php | 10 +- app/Http/Requests/UserRequest.php | 2 +- app/Http/Requests/UserUpdateRequest.php | 2 +- app/Models/DataDesa.php | 5 + app/Models/Jabatan.php | 61 +++ app/Models/Komplain.php | 7 + app/Models/Pembangunan.php | 7 +- app/Models/PembangunanDokumentasi.php | 5 + app/Models/Pengurus.php | 112 ++++++ app/Models/Potensi.php | 2 +- app/Models/Profil.php | 8 - app/Models/TipePotensi.php | 5 + app/Models/User.php | 12 + catatan_rilis.md | 43 +- composer.json | 1 + config/app.php | 4 +- ..._11_06_191838_create_ref_jabatan_table.php | 72 ++++ ...022_11_09_143029_create_pengurus_table.php | 81 ++++ .../2022_11_14_131235_add_pengurus_user.php | 63 +++ ...181234_update_id_kartu_program_bantuan.php | 61 +++ ...2_11_26_160652_delete_perangkat_profil.php | 78 ++++ helpers/general_helper.php | 13 +- resources/views/data/jabatan/create.blade.php | 45 +++ resources/views/data/jabatan/edit.blade.php | 48 +++ resources/views/data/jabatan/form.blade.php | 21 + resources/views/data/jabatan/index.blade.php | 62 +++ .../views/data/keluarga/form_show.blade.php | 12 +- .../views/data/penduduk/form_show.blade.php | 10 +- .../views/data/pengurus/create.blade.php | 80 ++++ resources/views/data/pengurus/edit.blade.php | 83 ++++ resources/views/data/pengurus/form.blade.php | 143 +++++++ resources/views/data/pengurus/index.blade.php | 108 +++++ .../views/data/profil/form_edit.blade.php | 65 +-- .../views/data/program_bantuan/show.blade.php | 2 +- resources/views/forms/suspend-modal.blade.php | 2 +- .../layouts/fragments/error_message.blade.php | 10 + .../views/layouts/fragments/sidebar.blade.php | 109 ++--- resources/views/pages/berita/detail.blade.php | 4 +- resources/views/pages/berita/index.blade.php | 4 +- .../admin_komplain/index.blade.php | 2 +- .../admin_komplain/show.blade.php | 376 ++++++++++++++++++ .../sistem_komplain/komplain/index.blade.php | 2 +- .../komplain/jawabans.blade.php | 15 + .../sistem_komplain/komplain/show.blade.php | 105 ++++- resources/views/user/form.blade.php | 62 ++- resources/views/widgets/camat.blade.php | 7 +- .../views/widgets/media_sosial.blade.php | 2 +- .../views/widgets/sinergi_program.blade.php | 2 +- routes/web.php | 15 +- 64 files changed, 2626 insertions(+), 195 deletions(-) create mode 100644 app/Enums/JenisJabatan.php create mode 100644 app/Enums/Status.php create mode 100644 app/Http/Controllers/Data/JabatanController.php create mode 100644 app/Http/Controllers/Data/PengurusController.php create mode 100644 app/Http/Requests/JabatanRequest.php create mode 100644 app/Http/Requests/PengurusRequest.php create mode 100644 app/Models/Jabatan.php create mode 100644 app/Models/Pengurus.php create mode 100644 database/migrations/2022_11_06_191838_create_ref_jabatan_table.php create mode 100644 database/migrations/2022_11_09_143029_create_pengurus_table.php create mode 100644 database/migrations/2022_11_14_131235_add_pengurus_user.php create mode 100644 database/migrations/2022_11_24_181234_update_id_kartu_program_bantuan.php create mode 100644 database/migrations/2022_11_26_160652_delete_perangkat_profil.php create mode 100644 resources/views/data/jabatan/create.blade.php create mode 100644 resources/views/data/jabatan/edit.blade.php create mode 100644 resources/views/data/jabatan/form.blade.php create mode 100644 resources/views/data/jabatan/index.blade.php create mode 100644 resources/views/data/pengurus/create.blade.php create mode 100644 resources/views/data/pengurus/edit.blade.php create mode 100644 resources/views/data/pengurus/form.blade.php create mode 100644 resources/views/data/pengurus/index.blade.php create mode 100644 resources/views/layouts/fragments/error_message.blade.php create mode 100644 resources/views/sistem_komplain/admin_komplain/show.blade.php diff --git a/app/Enums/JenisJabatan.php b/app/Enums/JenisJabatan.php new file mode 100644 index 000000000..e93320a8c --- /dev/null +++ b/app/Enums/JenisJabatan.php @@ -0,0 +1,44 @@ +profil = Profil::first(); + $this->profil = Profil::first(); + $this->umum = DataUmum::first(); + $this->nama_camat = Pengurus::status()->whereHas('jabatan', function ($query) { + $query->where('jenis', JenisJabatan::Camat); + })->first(); if (in_array($this->profil->provinsi_id, [91, 92])) { $this->sebutan_wilayah = 'Distrik'; @@ -98,40 +106,52 @@ public function __construct() 'medsos' => $medsos, 'navdesa' => $navdesa, 'navpotensi' => $navpotensi, + 'camat' => $this->nama_camat, ]); } protected function kirimTrack() { - if (config('app.demo') == true) { // jika posisi demo, matikan tracking - return; - } + // if (config('app.demo') == true) { // jika posisi demo, matikan tracking + // return; + // } - if (session('track') != null && session('track') == date('Y m d')) { - return; - } + // if (session('track') != null && session('track') == date('Y m d')) { + // return; + // } $host_pantau = config('app.host_pantau'); $data = [ 'url' => url('/'), 'versi' => config('app.version'), - 'jml_desa' => DataDesa::count(), + 'jumlah_desa' => DataDesa::count(), + 'desa' => json_encode(DataDesa::select(['desa_id', 'nama', 'sebutan_desa', 'path', 'website'])->get()), + 'jumlahdesa_sinkronisasi' => DataDesa::count(), 'jumlah_penduduk' => Penduduk::where('status_dasar', 1)->count(), 'jumlah_keluarga' => Keluarga::count(), - 'peta_wilayah' => DataUmum::first()->path ?? '[[[[]]]]', + 'peta_wilayah' => $this->umum->path ?? '[[[[]]]]', + 'batas_wilayah' => json_encode([ + 'bts_wil_utara' => $this->umum->bts_wil_utara, + 'bts_wil_timur' => $this->umum->bts_wil_timur, + 'bts_wil_selatan' => $this->umum->bts_wil_selatan, + 'bts_wil_barat' => $this->umum->bts_wil_barat + ]), 'sebutan_wilayah' => $this->sebutan_wilayah, + 'alamat' => $this->profil->alamat, + 'jumlah_bantuan' => Program::count(), 'kode_kecamatan' => $this->profil->kecamatan_id, 'kode_kabupaten' => $this->profil->kabupaten_id, 'kode_provinsi' => $this->profil->provinsi_id, 'nama_kecamatan' => $this->profil->nama_kecamatan, 'nama_kabupaten' => $this->profil->nama_kabupaten, 'nama_provinsi' => $this->profil->nama_provinsi, + 'nama_camat' => $this->nama_camat ]; try { - Http::withHeaders([ + $response = Http::withHeaders([ 'token' => config('app.token_pantau') - ])->post($host_pantau.'track/opendk?token='.config('app.token_pantau'), $data); + ])->post($host_pantau . 'track/opendk?token=' . config('app.token_pantau'), $data); session(['track' => date('Y m d')]); return; } catch (Exception $e) { diff --git a/app/Http/Controllers/Data/AdminKomplainController.php b/app/Http/Controllers/Data/AdminKomplainController.php index 956066978..6377da9f9 100755 --- a/app/Http/Controllers/Data/AdminKomplainController.php +++ b/app/Http/Controllers/Data/AdminKomplainController.php @@ -33,6 +33,7 @@ use App\Http\Controllers\Controller; use App\Models\DataDesa; +use App\Models\JawabKomplain; use App\Models\KategoriKomplain; use App\Models\Komplain; use App\Models\Penduduk; @@ -64,6 +65,7 @@ public function getDataKomplain() $data['agree_url'] = route('admin-komplain.setuju', $row->id); } + $data['show_url'] = route('admin-komplain.show', $row->id); $data['edit_url'] = route('admin-komplain.edit', $row->id); $data['delete_url'] = route('admin-komplain.destroy', $row->id); @@ -110,6 +112,16 @@ public function disetujui(Request $request, $id) return redirect()->route('admin-komplain.index')->with('success', 'Status Keluhan berhasil disimpan!'); } + public function show($id) + { + $komplain = Komplain::findOrFail($id); + $page_title = 'Detail Keluhan'; + $page_description = 'Detail Keluhan : ' . $komplain->judul; + $penduduk = Penduduk::where('nik', $komplain->nik)->first(); + + return view('sistem_komplain.admin_komplain.show', compact('page_title', 'page_description', 'komplain', 'penduduk')); + } + /** * Display the specified resource. * @@ -186,6 +198,27 @@ public function update(Request $request, $id) return redirect()->route('admin-komplain.index')->with('success', 'Keluhan berhasil dikirim!'); } + public function updateKomentar(Request $request, $id) + { + $jawabKomplain = JawabKomplain::findOrFail($id); + + try { + $jawabKomplain->jawaban = $request->jawaban; + $jawabKomplain->save(); + $response = [ + 'status' => 'success', + 'msg' => 'Jawaban berhasil disimpan!', + ]; + return response()->json($response); + } catch (Exception $e) { + $response = [ + 'status' => 'success', + 'msg' => 'Jawaban Gagal disimpan!', + ]; + return response()->json($response); + } + } + public function statistik() { $page_title = 'Statistik Keluhan'; @@ -241,6 +274,16 @@ protected function getChartDesa() return $data_chart; } + public function getKomentar($id) + { + $jawab = JawabKomplain::findOrFail($id); + $response = [ + 'status' => 'success', + 'data' => $jawab, + ]; + return response()->json($response); + } + /** * Display the specified resource. * @@ -258,4 +301,16 @@ public function destroy($id) return redirect()->route('admin-komplain.index')->with('success', 'Keluhan sukses dihapus!'); } + + public function deletekomentar($id) + { + try { + JawabKomplain::findOrFail($id)->delete(); + } catch (\Exception $e) { + report($e); + return back()->with('error', 'Komentar Keluhan gagal dihapus!'); + } + + return back()->with('success', 'Komentar Keluhan sukses dihapus!'); + } } diff --git a/app/Http/Controllers/Data/DataPembangunanController.php b/app/Http/Controllers/Data/DataPembangunanController.php index 723d2cb40..27f63f34e 100644 --- a/app/Http/Controllers/Data/DataPembangunanController.php +++ b/app/Http/Controllers/Data/DataPembangunanController.php @@ -83,6 +83,9 @@ public function getrinciandata($id, $desa_id) $pembangunanDokumentasi = PembangunanDokumentasi::where('desa_id', $desa_id)->where('id_pembangunan', $id)->get(); return DataTables::of($pembangunanDokumentasi) ->addIndexColumn() + ->editColumn('created_at', function ($row) { + return format_datetime($row->created_at); + }) ->make(); } } diff --git a/app/Http/Controllers/Data/JabatanController.php b/app/Http/Controllers/Data/JabatanController.php new file mode 100644 index 000000000..7d1c4c523 --- /dev/null +++ b/app/Http/Controllers/Data/JabatanController.php @@ -0,0 +1,155 @@ +ajax()) { + return DataTables::of(Jabatan::all()) + ->addIndexColumn() + ->addColumn('aksi', function ($row) { + if (! auth()->guest()) { + $data['edit_url'] = route('data.jabatan.edit', $row->id); + if ($row->jenis == JenisJabatan::JabatanLainnya) { + $data['delete_url'] = route('data.jabatan.destroy', $row->id); + } + } + + return view('forms.aksi', $data); + }) + ->escapeColumns([]) + ->make(true); + } + + return view('data.jabatan.index', compact('page_title', 'page_description')); + } + + /** + * Show the form for creating a new resource. + * + * @return Response + */ + public function create() + { + $page_title = 'Jabatan'; + $page_description = 'Tambah Jabatan'; + + return view('data.jabatan.create', compact('page_title', 'page_description')); + } + + /** + * Store a newly created resource in storage. + * + * @return Response + */ + public function store(JabatanRequest $request) + { + try { + Jabatan::create($request->all()); + } catch (\Exception $e) { + report($e); + return back()->withInput()->with('error', 'Jabatan gagal ditambah!'); + } + + return redirect()->route('data.jabatan.index')->with('success', 'Jabatan berhasil ditambah!'); + } + + /** + * Show the form for editing the specified resource. + * + * @param int $id + * @return Response + */ + public function edit($id) + { + $jabatan = Jabatan::findOrFail($id); + $page_title = 'Jabatan'; + $page_description = 'Ubah Jabatan : ' . $jabatan->nama; + + return view('data.jabatan.edit', compact('page_title', 'page_description', 'jabatan')); + } + + /** + * Update the specified resource in storage. + * + * @param int $id + * @return Response + */ + + public function update(JabatanRequest $request, $id) + { + try { + Jabatan::findOrFail($id)->update($request->all()); + } catch (\Exception $e) { + report($e); + return back()->withInput()->with('error', 'Jabatan gagal diubah!'); + } + + return redirect()->route('data.jabatan.index')->with('success', 'Jabatan berhasil diubah!'); + } + + /** + * Remove the specified resource from storage. + * + * @param int $id + * @return Response + */ + public function destroy($id) + { + try { + Jabatan::findOrFail($id)->delete(); + } catch (\Exception $e) { + report($e); + return redirect()->route('data.jabatan.index')->with('error', 'Jabatan gagal dihapus!'); + } + + return redirect()->route('data.jabatan.index')->with('success', 'Jabatan berhasil dihapus!'); + } +} diff --git a/app/Http/Controllers/Data/KeluargaController.php b/app/Http/Controllers/Data/KeluargaController.php index 92b3dfce7..3f2329302 100755 --- a/app/Http/Controllers/Data/KeluargaController.php +++ b/app/Http/Controllers/Data/KeluargaController.php @@ -66,6 +66,8 @@ public function getKeluarga() }) ->addColumn('foto', function ($row) { return 'Foto Penduduk'; + })->editColumn('tgl_cetak_kk', function ($row) { + return format_datetime($row->tgl_cetak_kk); }) ->rawColumns(['foto']) ->make(); diff --git a/app/Http/Controllers/Data/PengurusController.php b/app/Http/Controllers/Data/PengurusController.php new file mode 100644 index 000000000..b97436620 --- /dev/null +++ b/app/Http/Controllers/Data/PengurusController.php @@ -0,0 +1,260 @@ +ajax()) { + $status = $request->input('status'); + + return DataTables::of(Pengurus::where('status', $status)) + ->addIndexColumn() + ->addColumn('aksi', function ($row) { + if (! auth()->guest()) { + $data['edit_url'] = route('data.pengurus.edit', $row->id); + $data['delete_url'] = route('data.pengurus.destroy', $row->id); + if ($row->status == Status::Aktif) { + $data['suspend_url'] = route('data.pengurus.lock', [$row->id, Status::TidakAktif]); + } else { + $data['active_url'] = route('data.pengurus.lock', [$row->id, Status::Aktif]); + } + } + + return view('forms.aksi', $data); + }) + ->editColumn('foto', function ($row) { + return 'Foto Penduduk'; + }) + ->editColumn('identitas', function ($row) { + return $row->namaGelar . ',
NIP: ' . $row->nip . ',
NIK: ' . $row->nik; + }) + ->editColumn('ttl', function ($row) { + return $row->tempat_lahir . ',' . format_date($row->tanggal_lahir); + }) + ->editColumn('sex', function ($row) { + $sex = ['1' => 'Laki-laki', '2' => 'Perempuan']; + return $sex[$row->sex]; + }) + ->editColumn('tanggal_sk', function ($row) { + return format_date($row->tanggal_sk); + }) + ->editColumn('tanggal_henti', function ($row) { + return format_date($row->tanggal_sk); + }) + ->editColumn('status', function ($row) { + if ($row->status == 0) { + return 'Tidak Aktif'; + } else { + return 'Aktif'; + } + }) + ->rawColumns(['foto', 'identitas', 'status']) + ->make(true); + } + + return view('data.pengurus.index', compact('page_title', 'page_description')); + } + + /** + * Show the form for creating a new resource. + * + * @return Response + */ + public function create() + { + $page_title = 'Pengurus'; + $page_description = 'Tambah Pengurus'; + $pendidikan = PendidikanKK::pluck('nama', 'id'); + $agama = Agama::pluck('nama', 'id'); + $pengurus = new Pengurus(); + $kecuali = $pengurus->cekPengurus(); + + $jabatan = Jabatan::whereNotIn('id', $kecuali)->pluck('nama', 'id'); + + return view('data.pengurus.create', compact('page_title', 'page_description', 'pendidikan', 'agama', 'jabatan')); + } + + /** + * Store a newly created resource in storage. + * + * @return Response + */ + public function store(PengurusRequest $request) + { + try { + $input = $request->all(); + if ($request->hasFile('foto')) { + $file = $request->file('foto'); + $original_name = strtolower(trim($file->getClientOriginalName())); + $file_name = time() . '_' . $original_name; + Storage::putFileAs('public/pengurus', $file, $file_name); + $input['foto'] = $file_name; + } + Pengurus::create($input); + } catch (\Exception $e) { + report($e); + return back()->withInput()->with('error', 'Pengurus gagal ditambah!'); + } + + return redirect()->route('data.pengurus.index')->with('success', 'Pengurus berhasil ditambah!'); + } + + /** + * Show the form for editing the specified resource. + * + * @param int $id + * @return Response + */ + public function edit($id) + { + $pengurus = Pengurus::findOrFail($id); + $page_title = 'Pengurus'; + $page_description = 'Ubah Pengurus : ' . $pengurus->nama; + $pendidikan = PendidikanKK::pluck('nama', 'id'); + $agama = Agama::pluck('nama', 'id'); + $kecuali = $pengurus->cekPengurus(); + + $jabatan = Jabatan::whereNotIn('id', $kecuali)->orWhere('jenis', $pengurus->jabatan->jenis) + ->pluck('nama', 'id'); + + return view('data.pengurus.edit', compact('page_title', 'page_description', 'pengurus', 'pendidikan', 'agama', 'jabatan')); + } + + /** + * Update the specified resource in storage. + * + * @param int $id + * @return Response + */ + + public function update(PengurusRequest $request, $id) + { + $pengurus = Pengurus::findOrFail($id); + + try { + $input = $request->all(); + + if ($request->hasFile('foto')) { + $file = $request->file('foto'); + $original_name = strtolower(trim($file->getClientOriginalName())); + $file_name = time() . '_' . $original_name; + Storage::putFileAs('public/pengurus', $file, $file_name); + if ($pengurus->foto) { + Storage::delete('public/pengurus/' . $pengurus->getRawOriginal('foto')); + } + $input['foto'] = $file_name; + } + + $pengurus->update($input); + } catch (\Exception $e) { + report($e); + return back()->withInput()->with('error', 'Pengurus gagal diubah!'); + } + + return redirect()->route('data.pengurus.index')->with('success', 'Pengurus berhasil diubah!'); + } + + /** + * Remove the specified resource from storage. + * + * @param int $id + * @return Response + */ + public function destroy($id) + { + try { + $pengurus = Pengurus::findOrFail($id); + if ($pengurus->foto) { + Storage::delete('public/pengurus/' . $pengurus->getRawOriginal('foto')); + } + $pengurus->delete(); + } catch (\Exception $e) { + report($e); + return redirect()->route('data.pengurus.index')->with('error', 'Pengurus gagal dihapus!'); + } + + return redirect()->route('data.pengurus.index')->with('success', 'Pengurus berhasil dihapus!'); + } + + /** + * Update status resource from storage. + * + * @param int $id + * @return Response + */ + public function lock($id, $status) + { + try { + $pengurus = Pengurus::findOrFail($id); + + if ($status == Status::Aktif) { + if ($pengurus->jabatan->id == JenisJabatan::Camat && Pengurus::where('jabatan_id', JenisJabatan::Camat)->where('status', Status::Aktif)->exists()) { + return redirect()->route('data.pengurus.index')->with('error', 'Camat aktif sudah ditetapkan!'); + } + + if ($pengurus->jabatan->id == JenisJabatan::Sekretaris && Pengurus::where('jabatan_id', JenisJabatan::Sekretaris)->where('status', Status::Aktif)->exists()) { + return redirect()->route('data.pengurus.index')->with('error', 'Sekretaris aktif sudah ditetapkan!'); + } + } + + $pengurus->update(['status' => $status]); + } catch (\Exception $e) { + report($e); + return redirect()->route('data.pengurus.index')->with('error', 'Status Pengurus gagal diubah!'); + } + + return redirect()->route('data.pengurus.index')->with('success', 'Status Pengurus berhasil diubah!'); + } +} diff --git a/app/Http/Controllers/Data/ProfilController.php b/app/Http/Controllers/Data/ProfilController.php index 4e87801a8..c5e39cc7f 100644 --- a/app/Http/Controllers/Data/ProfilController.php +++ b/app/Http/Controllers/Data/ProfilController.php @@ -84,14 +84,6 @@ public function update(ProfilRequest $request, $id) $request->file('file_logo')->move("storage/profil/file_logo/", $fileLogoName); $profil->file_logo = 'storage/profil/file_logo/' . $fileLogoName; } - if ($request->file('foto_kepala_wilayah') == "") { - $profil->foto_kepala_wilayah = $profil->foto_kepala_wilayah; - } else { - $fileFoto = $request->file('foto_kepala_wilayah'); - $fileFotoName = $fileFoto->getClientOriginalName(); - $request->file('foto_kepala_wilayah')->move("storage/profil/pegawai/", $fileFotoName); - $profil->foto_kepala_wilayah = 'storage/profil/pegawai/' . $fileFotoName; - } $profil->update(); $dataumum->update(); diff --git a/app/Http/Controllers/Data/ProgramBantuanController.php b/app/Http/Controllers/Data/ProgramBantuanController.php index 3845aa6bb..8e2643134 100644 --- a/app/Http/Controllers/Data/ProgramBantuanController.php +++ b/app/Http/Controllers/Data/ProgramBantuanController.php @@ -61,7 +61,7 @@ public function getaProgramBantuan(Request $request) return view('forms.aksi', $data); }) ->addColumn('masa_berlaku', function ($row) { - return $row->start_date . ' - ' . $row->end_date; + return format_date($row->start_date) . ' - ' . format_date($row->end_date); }) ->editColumn('sasaran', function ($row) { $sasaran = [1 => 'Penduduk/Perorangan', 2 => 'Keluarga-KK']; diff --git a/app/Http/Controllers/Informasi/ArtikelController.php b/app/Http/Controllers/Informasi/ArtikelController.php index e5fdc94eb..5c03b2ed4 100644 --- a/app/Http/Controllers/Informasi/ArtikelController.php +++ b/app/Http/Controllers/Informasi/ArtikelController.php @@ -66,6 +66,8 @@ public function getDataArtikel(Request $request) } else { return 'Aktif'; } + })->editColumn('created_at', function ($row) { + return format_datetime($row->created_at); }) ->rawColumns(['status']) ->make(true); @@ -111,7 +113,7 @@ public function update(ArtikelRequest $request, Artikel $artikel) $file = $request->file('gambar'); $path = Storage::putFile('public/artikel', $file); - Storage::delete('public/artikel/' . $artikel->getOriginal('gambar')); + Storage::delete('public/artikel/' . $artikel->getRawOriginal('gambar')); $input['gambar'] = substr($path, 15) ; } @@ -129,7 +131,7 @@ public function destroy(Artikel $artikel) { try { if ($artikel->delete()) { - Storage::delete('public/artikel/' . $artikel->getOriginal('gambar')); + Storage::delete('public/artikel/' . $artikel->getRawOriginal('gambar')); } } catch (\Exception $e) { report($e); diff --git a/app/Http/Controllers/SistemKomplain/SistemKomplainController.php b/app/Http/Controllers/SistemKomplain/SistemKomplainController.php index 28decde0c..2a23d077e 100755 --- a/app/Http/Controllers/SistemKomplain/SistemKomplainController.php +++ b/app/Http/Controllers/SistemKomplain/SistemKomplainController.php @@ -348,7 +348,8 @@ public function reply(Request $request, $id) public function getJawabans(Request $request) { $jawabans = JawabKomplain::where('komplain_id', $request->input('id'))->orderBy('id', 'desc')->get(); + $komplain = Komplain::where('komplain_id', $request->input('id'))->get()[0]; - return view('sistem_komplain.komplain.jawabans', compact('jawabans'))->render(); + return view('sistem_komplain.komplain.jawabans', compact('jawabans', 'komplain'))->render(); } } diff --git a/app/Http/Controllers/User/UserController.php b/app/Http/Controllers/User/UserController.php index 4a3ac6bdb..feb9ca215 100755 --- a/app/Http/Controllers/User/UserController.php +++ b/app/Http/Controllers/User/UserController.php @@ -34,6 +34,7 @@ use App\Http\Controllers\Controller; use App\Http\Requests\UserRequest; use App\Http\Requests\UserUpdateRequest; +use App\Models\Pengurus; use App\Models\User; use Illuminate\Http\Request; use Illuminate\Http\Response; @@ -66,8 +67,9 @@ public function create() $page_title = 'Pengguna'; $page_description = 'Tambah Data'; $item = Role::where('name', '!=', 'super-admin')->pluck('name', 'name')->toArray(); + $pengurus = Pengurus::status()->doesntHave('user')->get(); - return view('user.create', compact('page_title', 'page_description', 'item')); + return view('user.create', compact('page_title', 'page_description', 'item', 'pengurus')); } /** @@ -120,8 +122,9 @@ public function edit($id) $page_description = 'Ubah Data'; $user = User::findOrFail($id); $item = Role::where('name', '!=', 'super-admin')->pluck('name', 'name')->toArray(); + $pengurus = Pengurus::status()->doesntHave('user')->orWhere('id', $user->pengurus_id)->get(); - return view('user.edit', compact('page_title', 'page_description', 'user', 'item')); + return view('user.edit', compact('page_title', 'page_description', 'user', 'item', 'pengurus')); } /** diff --git a/app/Http/Requests/JabatanRequest.php b/app/Http/Requests/JabatanRequest.php new file mode 100644 index 000000000..f9df6fe1e --- /dev/null +++ b/app/Http/Requests/JabatanRequest.php @@ -0,0 +1,60 @@ + 'required|regex:/^[a-zA-Z\s]*$/', + 'tupoksi' => 'nullable|string', + ]; + } +} diff --git a/app/Http/Requests/PengurusRequest.php b/app/Http/Requests/PengurusRequest.php new file mode 100644 index 000000000..e891e968b --- /dev/null +++ b/app/Http/Requests/PengurusRequest.php @@ -0,0 +1,81 @@ +isMethod('put')) { + $id = "," . $this->penguru; + } else { + $id = ""; + } + + return [ + 'foto' => 'nullable|image|mimes:jpg,jpeg,png|max:1024', + 'nama' => "required|regex:/^[a-zA-Z '\.,\-]+$/|max:150", + 'gelar_depan' => "nullable|regex:/^[a-zA-Z '\.,\-]+$/|max:150", + 'gelar_belakang' => "nullable|regex:/^[a-zA-Z '\.,\-]+$/|max:150", + 'nik' => 'required|integer|digits:16|unique:das_pengurus,nik' . $id, + 'nip' => 'nullable|integer|digits:18|unique:das_pengurus,nip' . $id, + 'tempat_lahir' => "required|regex:/^[a-zA-Z0-9 '\.,\-\/]+$/", + 'tanggal_lahir' => "required|date", + 'jenis_kelamin' => 'integer', + 'pendidikan' => 'integer', + 'agama' => 'integer', + 'pangkat' => 'nullable|regex:/^[a-zA-Z0-9 \.\-\/]+$/|max:50', + 'no_sk' => 'nullable|regex:/^[a-zA-Z0-9 \.\-\/]+$/|max:50', + 'tanggal_sk' => 'nullable|date', + 'no_henti' => 'nullable|regex:/^[a-zA-Z0-9 \.\-\/]+$/|max:50', + 'tanggal_henti' => 'nullable|date', + 'masa_jabatan' => 'required|regex:/^[a-zA-Z0-9 \.\-\/]+$/|max:50', + ]; + } +} diff --git a/app/Http/Requests/ProfilRequest.php b/app/Http/Requests/ProfilRequest.php index fb3ca3edc..2dddf338e 100644 --- a/app/Http/Requests/ProfilRequest.php +++ b/app/Http/Requests/ProfilRequest.php @@ -61,20 +61,12 @@ public function rules() 'nama_kecamatan' => 'required|string', 'alamat' => "required|regex:/^[a-zA-Z0-9 '\.,\-\/]+$/", 'kode_pos' => 'required|integer|digits_between:4,12', - 'telepon' => 'required|integer|digits_between:5,14', + 'telepon' => 'required|numeric|digits_between:5,14', 'email' => 'required|email', 'tahun_pembentukan' => 'required|integer', 'dasar_pembentukan' => 'required|regex:/^[a-zA-Z0-9 \.\-\/]+$/|max:50', - 'nama_camat' => "required|regex:/^[a-zA-Z '\.,\-]+$/|max:150", - 'sekretaris_camat' => "required|regex:/^[a-zA-Z '\.,\-]+$/|max:150", - 'kepsek_pemerintahan_umum' => "required|regex:/^[a-zA-Z '\.,\-]+$/|max:150", - 'kepsek_kesejahteraan_masyarakat' => "required|regex:/^[a-zA-Z '\.,\-]+$/|max:150", - 'kepsek_pemberdayaan_masyarakat' => "required|regex:/^[a-zA-Z '\.,\-]+$/|max:150", - 'kepsek_pelayanan_umum' => "required|regex:/^[a-zA-Z '\.,\-]+$/|max:150", - 'kepsek_trantib' => "required|regex:/^[a-zA-Z '\.,\-]+$/|max:150", 'file_logo' => 'image|mimes:jpg,jpeg,bmp,png,gif|max:1024', 'file_struktur_organisasi' => 'image|mimes:jpg,jpeg,png,bmp,gif|max:1024', - 'foto_kepala_wilayah' => 'image|mimes:jpg,jpeg,png,bmp,gif|max:1024', // 'visi' => 'required', // 'misi' => 'required', ]; diff --git a/app/Http/Requests/UserRequest.php b/app/Http/Requests/UserRequest.php index 0b3644dfd..b98e790bf 100755 --- a/app/Http/Requests/UserRequest.php +++ b/app/Http/Requests/UserRequest.php @@ -60,7 +60,7 @@ public function rules() return [ 'name' => 'required|regex:/^[A-Za-z\.\']+(?:\s[A-Za-z\.\']+)*$/u|max:255', 'email' => 'required|email|unique:users,email' . $id, - 'phone' => 'numeric|digits_between:10,13', + 'phone' => 'nullable|numeric|digits_between:10,13', 'password' => 'required|min:8|max:32', 'address' => 'required', ]; diff --git a/app/Http/Requests/UserUpdateRequest.php b/app/Http/Requests/UserUpdateRequest.php index 131bb0826..b526afd6a 100755 --- a/app/Http/Requests/UserUpdateRequest.php +++ b/app/Http/Requests/UserUpdateRequest.php @@ -60,7 +60,7 @@ public function rules() return [ 'name' => 'required|regex:/^[A-Za-z\.\']+(?:\s[A-Za-z\.\']+)*$/u|max:255', 'email' => 'required|email|unique:users,email' . $id, - 'phone' => 'numeric|digits_between:10,13', + 'phone' => 'nullable|numeric|digits_between:10,13', 'address' => 'required', ]; } diff --git a/app/Models/DataDesa.php b/app/Models/DataDesa.php index f0fe9c0c5..74d915c95 100755 --- a/app/Models/DataDesa.php +++ b/app/Models/DataDesa.php @@ -168,4 +168,9 @@ public function penduduk() { return $this->hasMany(Penduduk::class, 'desa_id', 'desa_id'); } + + public function pembangunan() + { + return $this->hasMany(Pembangunan::class, 'desa_id', 'desa_id'); + } } diff --git a/app/Models/Jabatan.php b/app/Models/Jabatan.php new file mode 100644 index 000000000..2914506c7 --- /dev/null +++ b/app/Models/Jabatan.php @@ -0,0 +1,61 @@ +attributes['jenis'] = $value ?? JenisJabatan::JabatanLainnya; + } + + public function pengurus() + { + return $this->hasMany(Pengurus::class, 'jabatan_id', 'id'); + } +} diff --git a/app/Models/Komplain.php b/app/Models/Komplain.php index 482cebdce..475880d1d 100755 --- a/app/Models/Komplain.php +++ b/app/Models/Komplain.php @@ -52,6 +52,8 @@ class Komplain extends Model 'lampiran4', ]; + protected $with = ['penduduk']; + public function kategori_komplain() { return $this->hasOne(KategoriKomplain::class, 'id', 'kategori'); @@ -61,4 +63,9 @@ public function jawabs() { return $this->hasMany(JawabKomplain::class, 'komplain_id', 'komplain_id'); } + + public function penduduk() + { + return $this->hasOne(Penduduk::class, 'nik', 'nik'); + } } diff --git a/app/Models/Pembangunan.php b/app/Models/Pembangunan.php index 15225b106..5ec9021ee 100644 --- a/app/Models/Pembangunan.php +++ b/app/Models/Pembangunan.php @@ -41,6 +41,11 @@ class Pembangunan extends Model public function dokumentasi() { - return $this->hasOne(PembangunanDokumentasi::class, 'id', 'id_pembangunan'); + return $this->hasMany(PembangunanDokumentasi::class, 'id_pembangunan'); + } + + public function desa() + { + return $this->hasOne(DataDesa::class, 'desa_id', 'desa_id'); } } diff --git a/app/Models/PembangunanDokumentasi.php b/app/Models/PembangunanDokumentasi.php index 12f626b70..a35b7c53a 100644 --- a/app/Models/PembangunanDokumentasi.php +++ b/app/Models/PembangunanDokumentasi.php @@ -38,4 +38,9 @@ class PembangunanDokumentasi extends Model protected $table = 'das_pembangunan_dokumentasi'; protected $fillable = []; protected $guarded = []; + + public function pembangunan() + { + return $this->hasOne(Pembangunan::class, 'id', 'id_pembangunan'); + } } diff --git a/app/Models/Pengurus.php b/app/Models/Pengurus.php new file mode 100644 index 000000000..5b1397020 --- /dev/null +++ b/app/Models/Pengurus.php @@ -0,0 +1,112 @@ +attributes['foto'] ? Storage::url('pengurus/' . $this->attributes['foto']) : null; + } + + /** + * Setter untuk membuat nama dan gelar. + * + * @return string + */ + public function getNamaGelarAttribute() + { + return $this->attributes['gelar_depan'] . ' ' . $this->attributes['nama'] . ' ' . $this->attributes['gelar_belakang']; + } + + public function jabatan() + { + return $this->hasOne(Jabatan::class, 'id', 'jabatan_id'); + } + + public function pendidikan() + { + return $this->hasOne(PendidikanKK::class, 'id', 'pendidikan_id'); + } + + public function agama() + { + return $this->hasOne(Agama::class, 'id', 'agama_id'); + } + + public function user() + { + return $this->hasOne(User::class, 'pengurus_id', 'id'); + } + + public function scopeStatus($query, $value = 1) + { + return $query->where('status', $value); + } + + /** + * Cek pengurus aktif. + * + * @return ( description_of_the_return_value ) + */ + public function cekPengurus() + { + $kecuali = []; + + // Cek apakah kades + if (Pengurus::where('jabatan_id', JenisJabatan::Camat)->where('status', Status::Aktif)->exists()) { + $kecuali[] = 1; + } + + // Cek apakah sekdes + if (Pengurus::where('jabatan_id', JenisJabatan::Sekretaris)->where('status', Status::Aktif)->exists()) { + $kecuali[] = 2; + } + + return $kecuali; + } +} diff --git a/app/Models/Potensi.php b/app/Models/Potensi.php index b316b673d..fa30f1b63 100755 --- a/app/Models/Potensi.php +++ b/app/Models/Potensi.php @@ -49,6 +49,6 @@ class Potensi extends Model public function tipe() { - return $this->hasOne(App\Models\TipePotensi::class, 'id', 'tipe_id'); + return $this->hasOne(TipePotensi::class, 'id', 'kategori_id'); } } diff --git a/app/Models/Profil.php b/app/Models/Profil.php index 2cae6c29d..0c4ae8a80 100755 --- a/app/Models/Profil.php +++ b/app/Models/Profil.php @@ -51,22 +51,14 @@ class Profil extends Model 'kode_pos', 'telepon', 'email', - 'nama_camat', 'tahun_pembentukan', 'dasar_pembentukan', - 'sekretaris_camat', - 'kepsek_pemerintahan_umum', - 'kepsek_kesejahteraan_masyarakat', - 'kepsek_pemberdayaan_masyarakat', - 'kepsek_pelayanan_umum', - 'kepsek_trantib', 'file_struktur_organisasi', 'file_logo', 'sambutan', 'socialmedia', 'visi', 'misi', - 'foto_kepala_wilayah', ]; protected $cast = [ diff --git a/app/Models/TipePotensi.php b/app/Models/TipePotensi.php index 3ea077454..011c2f229 100755 --- a/app/Models/TipePotensi.php +++ b/app/Models/TipePotensi.php @@ -41,4 +41,9 @@ class TipePotensi extends Model 'nama_kategori', 'slug', ]; + + public function potensi() + { + return $this->hasMany(Potensi::class, 'kategori_id', 'id'); + } } diff --git a/app/Models/User.php b/app/Models/User.php index f93bce659..a9840ae89 100755 --- a/app/Models/User.php +++ b/app/Models/User.php @@ -36,6 +36,7 @@ use Illuminate\Notifications\Notifiable; use Illuminate\Support\Facades\File; use Illuminate\Support\Facades\Hash; +use Illuminate\Support\Facades\Storage; use Intervention\Image\Facades\Image; use Spatie\Permission\Traits\HasRoles; use Tymon\JWTAuth\Contracts\JWTSubject; @@ -67,6 +68,7 @@ class User extends Authenticatable implements JWTSubject 'gender', 'status', 'last_login', + 'pengurus_id', ]; /** @@ -98,6 +100,11 @@ public static function datatables() return static::select('name', 'address', 'status', 'id', 'email', 'created_at', 'phone'); } + public function getFotoAttribute() + { + return $this->attributes['image'] ? Storage::url('user/' . $this->attributes['image']) : null; + } + /** * Uploads an image. * @@ -151,4 +158,9 @@ public function getJWTCustomClaims() { return []; } + + public function pengurus() + { + return $this->hasOne(Pengurus::class, 'id', 'pengurus_id'); + } } diff --git a/catatan_rilis.md b/catatan_rilis.md index 309b72daf..50de4af7b 100644 --- a/catatan_rilis.md +++ b/catatan_rilis.md @@ -1,10 +1,39 @@ -#### [v22.11.01] +#### [v22.12.01] -Di rilis v22.11.01 berisi perbaikan yang diminta Komunitas OpenDK. +Di rilis v22.12.01 berisi perbaikan yang diminta Komunitas OpenDK. -Terima kasih pada yonathanrizky yang baru mulai berkontribusi. +Terima kasih pada yonathanrizky yang terus berkontribusi. -#### Perbaikan BUG -1. [#498](https://github.com/OpenSID/OpenDK/issues/498) Perbaikan keluhan dengan status selesai masih dapat dikomentari atau dijawab. -2. [#499](https://github.com/OpenSID/OpenDK/issues/499) Perbaikan redaksi tulisan jawab keluhan. -3. [#504](https://github.com/OpenSID/OpenDK/issues/504) Perbaikan redaksi tulisan judul komplain menjadi keluhan. +#### Penambahan Fitur + +1. [#521](https://github.com/OpenSID/OpenDK/issues/521) Penambahan fitur jabatan untuk perangkat kecamatan. +2. [#514](https://github.com/OpenSID/OpenDK/issues/514) Penambahan fitur pengaturan perangkat kecamatan. +3. [#519](https://github.com/OpenSID/OpenDK/issues/519) Penambahan fitur pengguna untuk perangkat kecamatan. +4. [#546](https://github.com/OpenSID/OpenDK/issues/546) Penambahan fitur pratinjau foto pengguna. +5. [#502](https://github.com/OpenSID/OpenDK/issues/502) Penambahan fitur komentar keluhan di halaman admin. + +#### Perbaikan bug + +1. [#529](https://github.com/OpenSID/OpenDK/issues/529) Perbaikan foto pelapor di sikema tidak menampilkan foto penduduk. +2. [#544](https://github.com/OpenSID/OpenDK/issues/544) Perbaikan form no telepon pengguna tidak bisa dikosongkan. +3. [#536](https://github.com/OpenSID/OpenDK/pull/536) Perbaikan Foto artikel tidak terhapus ketika hapus atau ganti foto. +4. [#553](https://github.com/OpenSID/OpenDK/issues/553) Perbaikan Format tanggal rekam dokumentasi pembangunan. +5. [#554](https://github.com/OpenSID/OpenDK/issues/554) Perbaikan Format tanggal masa berlaku program bantuan. +6. [#555](https://github.com/OpenSID/OpenDK/issues/555) Perbaikan Format tanggal lahir peserta program bantuan. +7. [#556](https://github.com/OpenSID/OpenDK/issues/556) Perbaikan Format tanggal di modul detail penduduk. +8. [#557](https://github.com/OpenSID/OpenDK/issues/557) Perbaikan Format tanggal di modul keluarga. +9. [#558](https://github.com/OpenSID/OpenDK/issues/558) Perbaikan Format tanggal daftar dan cetak kk di detail keluarga. +10. [#559](https://github.com/OpenSID/OpenDK/issues/559) Perbaikan Format tanggal lapor di sistem keluhan. +11. [#561](https://github.com/OpenSID/OpenDK/issues/561) Perbaikan Format tanggal terbit artikel. +12. [#549](https://github.com/OpenSID/OpenDK/issues/549) Perbaiki foto sinergi tidak tampil dihalaman lain selain halaman utama. +13. [#565](hhttps://github.com/OpenSID/OpenDK/issues/565) Perbaikan foto media sosial tidak tampil dihalaman lain selain halaman utama. +14. [#548](https://github.com/OpenSID/OpenDK/issues/548) Perbaikan modul edit grup pengguna selalu admin desa. +15. [#552](https://github.com/OpenSID/OpenDK/issues/552) Perbaikan Error sinkronisasi program bantuan saat no_id_kartu yang panjang. + +#### Perubahan Teknis + +1. [#523](https://github.com/OpenSID/OpenDK/issues/523) Perbaikan relasi tabel pembangunan. +2. [#525](https://github.com/OpenSID/OpenDK/issues/525) Perbaikan relasi tabel potensi. +3. [#125](https://github.com/OpenSID/tracksid/issues/125) Tambahkan data untuk di kirim ke tracksid. +4. [#562](https://github.com/OpenSID/OpenDK/issues/562) Penyesuaian kondisi cek menu aktif di halaman.admin. +5. [#570](https://github.com/OpenSID/OpenDK/issues/570) Perbaikan duplikasi perangkat pada halaman profil. diff --git a/composer.json b/composer.json index 7846ca533..7fb79036b 100644 --- a/composer.json +++ b/composer.json @@ -10,6 +10,7 @@ "homepage": "https://opendk.my.id/", "require": { "php": ">=7.4.0", + "bensampo/laravel-enum": "2", "cviebrock/eloquent-sluggable": "^7.0", "doctrine/dbal": "^2.9", "fideloper/proxy": "^4.0", diff --git a/config/app.php b/config/app.php index 3177ff2de..15971cd69 100644 --- a/config/app.php +++ b/config/app.php @@ -37,7 +37,7 @@ |-------------------------------------------------------------------------- */ - 'version' => 'v22.11.01', + 'version' => 'v22.12.01', /* |-------------------------------------------------------------------------- @@ -242,7 +242,7 @@ App\Providers\RouteServiceProvider::class, // iSeed Orangehill\Iseed\IseedServiceProvider::class, - //Captcha + //Captcha Mews\Captcha\CaptchaServiceProvider::class, // Visitor Counter diff --git a/database/migrations/2022_11_06_191838_create_ref_jabatan_table.php b/database/migrations/2022_11_06_191838_create_ref_jabatan_table.php new file mode 100644 index 000000000..652e9872a --- /dev/null +++ b/database/migrations/2022_11_06_191838_create_ref_jabatan_table.php @@ -0,0 +1,72 @@ +increments('id'); + $table->string('nama', 255); + $table->text('tupoksi')->nullable(); + $table->integer('jenis')->default(JenisJabatan::JabatanLainnya); + $table->timestamps(); + }); + + $data = [ + ['nama'=>'Camat', 'jenis'=> JenisJabatan::Camat], + ['nama'=>'Sekretaris', 'jenis'=> JenisJabatan::Sekretaris], + ]; + + Jabatan::insert($data); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::dropIfExists('ref_jabatan'); + } +} diff --git a/database/migrations/2022_11_09_143029_create_pengurus_table.php b/database/migrations/2022_11_09_143029_create_pengurus_table.php new file mode 100644 index 000000000..f476b6bf8 --- /dev/null +++ b/database/migrations/2022_11_09_143029_create_pengurus_table.php @@ -0,0 +1,81 @@ +increments('id'); + $table->string('nama', 255); + $table->string('gelar_depan', 255)->nullable(); + $table->string('gelar_belakang', 255)->nullable(); + $table->bigInteger('nip')->nullable()->unique(); + $table->bigInteger('nik')->unique(); + $table->boolean('status')->default(1); // 0: Tidak Aktif; 1: aktif + $table->string('foto', 255)->nullable(); + $table->string('tempat_lahir', 255); + $table->date('tanggal_lahir'); + $table->boolean('sex'); + $table->unsignedInteger('pendidikan_id'); + $table->unsignedInteger('agama_id'); + $table->string('no_sk', 255)->nullable(); + $table->date('tanggal_sk')->nullable(); + $table->string('masa_jabatan', 255); + $table->string('pangkat', 255)->nullable(); + $table->string('no_henti', 255)->nullable(); + $table->date('tanggal_henti')->nullable(); + $table->unsignedInteger('jabatan_id'); + $table->foreign('jabatan_id')->references('id')->on('ref_jabatan') + ->onDelete('restrict')->onUpdate('cascade'); + $table->timestamps(); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::dropIfExists('das_pengurus'); + } +} diff --git a/database/migrations/2022_11_14_131235_add_pengurus_user.php b/database/migrations/2022_11_14_131235_add_pengurus_user.php new file mode 100644 index 000000000..373ad459a --- /dev/null +++ b/database/migrations/2022_11_14_131235_add_pengurus_user.php @@ -0,0 +1,63 @@ +unsignedInteger('pengurus_id')->after('id')->nullable(); + $table->foreign('pengurus_id')->references('id')->on('das_pengurus') + ->onDelete('restrict')->onUpdate('cascade'); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::table('users', function (Blueprint $table) { + $table->dropColumn('pengurus_id'); + }); + } +} diff --git a/database/migrations/2022_11_24_181234_update_id_kartu_program_bantuan.php b/database/migrations/2022_11_24_181234_update_id_kartu_program_bantuan.php new file mode 100644 index 000000000..39bb35acc --- /dev/null +++ b/database/migrations/2022_11_24_181234_update_id_kartu_program_bantuan.php @@ -0,0 +1,61 @@ +string('no_id_kartu', 100)->nullable()->change(); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::table('das_peserta_program', function (Blueprint $table) { + $table->string('no_id_kartu', 30)->nullable()->change(); + }); + } +} diff --git a/database/migrations/2022_11_26_160652_delete_perangkat_profil.php b/database/migrations/2022_11_26_160652_delete_perangkat_profil.php new file mode 100644 index 000000000..f115237df --- /dev/null +++ b/database/migrations/2022_11_26_160652_delete_perangkat_profil.php @@ -0,0 +1,78 @@ +dropColumn('nama_camat'); + $table->dropColumn('sekretaris_camat'); + $table->dropColumn('kepsek_pemerintahan_umum'); + $table->dropColumn('kepsek_kesejahteraan_masyarakat'); + $table->dropColumn('kepsek_pemberdayaan_masyarakat'); + $table->dropColumn('kepsek_pelayanan_umum'); + $table->dropColumn('kepsek_trantib'); + $table->dropColumn('foto_kepala_wilayah'); + }); + + Storage::deleteDirectory('public/profil/pegawai'); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::table('das_profil', function (Blueprint $table) { + $table->string('nama_camat', 150)->nullable()->after('dasar_pembentukan'); + $table->string('sekretaris_camat', 150)->nullable()->after('nama_camat'); + $table->string('kepsek_pemerintahan_umum', 150)->nullable()->after('sekretaris_camat'); + $table->string('kepsek_kesejahteraan_masyarakat', 150)->nullable()->after('kepsek_pemerintahan_umum'); + $table->string('kepsek_pemberdayaan_masyarakat', 150)->nullable()->after('kepsek_kesejahteraan_masyarakat'); + $table->string('kepsek_pelayanan_umum', 150)->nullable()->after('kepsek_pemberdayaan_masyarakat'); + $table->string('kepsek_trantib', 150)->nullable()->after('kepsek_pelayanan_umum'); + $table->longText('foto_kepala_wilayah')->nullable()->after('misi'); + }); + } +} diff --git a/helpers/general_helper.php b/helpers/general_helper.php index ba09dfe1f..ee75e01a0 100755 --- a/helpers/general_helper.php +++ b/helpers/general_helper.php @@ -214,14 +214,17 @@ function get_words($sentence, $count = 10) function diff_for_humans($date) { - Carbon::setLocale('id'); return Carbon::parse($date)->diffForHumans(); } +function format_datetime($date) +{ + return Carbon::parse($date)->translatedFormat('d F Y H:i:s'); +} + function format_date($date) { - Carbon::setLocale('id'); - return Carbon::parse($date)->toDayDateTimeString(); + return Carbon::parse($date)->translatedFormat('d F Y'); } function kuartal_bulan() @@ -306,9 +309,9 @@ function is_logo($url = '', $file = '/img/logo.png') return is_img($url, $file); } -function is_user($url = null, $sex = 1) +function is_user($url = null, $sex = 1, $pengurus = null) { - if ($url) { + if ($url && !$pengurus) { $url = 'storage/penduduk/foto/' . $url; } diff --git a/resources/views/data/jabatan/create.blade.php b/resources/views/data/jabatan/create.blade.php new file mode 100644 index 000000000..a26f983e4 --- /dev/null +++ b/resources/views/data/jabatan/create.blade.php @@ -0,0 +1,45 @@ +@extends('layouts.dashboard_template') + +@section('content') +
+

+ {{ $page_title ?? "Page Title" }} + {{ $page_description ?? '' }} +

+ +
+ +
+
+
+
+ + {!! Form::open( [ 'route' => 'data.jabatan.store', 'method' => 'post','id' => 'form-jabatan', 'class' => 'form-horizontal form-label-left' ] ) !!} + @include('layouts.fragments.error_message') + +
+ + @include( 'flash::message' ) + @include('data.jabatan.form') + +
+ + {!! Form::close() !!} +
+
+
+
+@endsection \ No newline at end of file diff --git a/resources/views/data/jabatan/edit.blade.php b/resources/views/data/jabatan/edit.blade.php new file mode 100644 index 000000000..9864cb7f3 --- /dev/null +++ b/resources/views/data/jabatan/edit.blade.php @@ -0,0 +1,48 @@ +@extends('layouts.dashboard_template') + +@section('content') +
+

+ {{ $page_title ?? "Page Title" }} + {{ $page_description ?? '' }} +

+ +
+ +
+
+
+
+ + + {!! Form::model($jabatan, [ 'route' => ['data.jabatan.update', $jabatan->id], 'method' => 'post','id' => 'form-jabatan', 'class' => 'form-horizontal form-label-left' ] ) !!} + @include('layouts.fragments.error_message') + +
+ + {{ method_field('PUT') }} + @include( 'flash::message' ) + @include('data.jabatan.form') + +
+ + + {!! Form::close() !!} +
+
+
+
+@endsection \ No newline at end of file diff --git a/resources/views/data/jabatan/form.blade.php b/resources/views/data/jabatan/form.blade.php new file mode 100644 index 000000000..03a48895b --- /dev/null +++ b/resources/views/data/jabatan/form.blade.php @@ -0,0 +1,21 @@ +
+ + +
+ {!! Form::text('nama', null, ['placeholder' => 'Nama Jabatan','class' => 'form-control', 'required'=>true]) !!} + {{ Form::hidden('jenis') }} +
+
+
+ + +
+ {!! Form::textarea('tupoksi', null, ['class' => 'textarea', 'placeholder' => 'Tupoksi', 'style' => 'width: 100%; height: 200px; font-size: 14px; line-height: 18px; border: 1px solid #dddddd; padding: 10px;']) !!} +
+
+
+@include('partials.asset_jqueryvalidation') + +@push('scripts') +{!! JsValidator::formRequest('App\Http\Requests\JabatanRequest', '#form-jabatan') !!} +@endpush diff --git a/resources/views/data/jabatan/index.blade.php b/resources/views/data/jabatan/index.blade.php new file mode 100644 index 000000000..3aa4ed059 --- /dev/null +++ b/resources/views/data/jabatan/index.blade.php @@ -0,0 +1,62 @@ +@extends('layouts.dashboard_template') + +@section('title') Data Jabatan @endsection + +@section('content') +
+

+ {{ $page_title ?? "Page Title" }} + {{ $page_description ?? '' }} +

+ +
+ +
+ + @include('partials.flash_message') + +
+
+  Tambah +
+
+
+ + + + + + + + +
AksiNamaTupoksi
+
+
+
+
+@endsection + +@include('partials.asset_datatables') + +@push('scripts') + +@include('forms.datatable-vertical') +@include('forms.delete-modal') + +@endpush diff --git a/resources/views/data/keluarga/form_show.blade.php b/resources/views/data/keluarga/form_show.blade.php index cd2f5aae3..08c641db5 100755 --- a/resources/views/data/keluarga/form_show.blade.php +++ b/resources/views/data/keluarga/form_show.blade.php @@ -7,14 +7,14 @@
- +
+
+ + + +
+
+
+ + +
+ {!! Form::text('nama', null, ['placeholder' => 'Nama Pengurus','class' => 'form-control', 'required'=>true]) !!} +
+
+
+ +
+ {!! Form::text('gelar_depan', null, ['placeholder' => 'Gelar Depan','class' => 'form-control']) !!} +
+ +
+ {!! Form::text('gelar_belakang', null, ['placeholder' => 'Gelar Belakang','class' => 'form-control']) !!} +
+
+
+ + +
+ {!! Form::text('nik', null, ['placeholder' => 'Nomor Induk Kependudukan','class' => 'form-control', 'required'=>true]) !!} +
+
+
+ + +
+ {!! Form::text('nip', null, ['placeholder' => 'NIP','class' => 'form-control']) !!} +
+
+
+ + +
+ {!! Form::text('tempat_lahir', null, ['placeholder' => 'Tempat Lahir','class' => 'form-control', 'required'=>true]) !!} +
+
+
+ + +
+ {!! Form::text('tanggal_lahir', null, ['placeholder' => 'Tanggal Lahir','class' => 'form-control datetime', 'required'=>true]) !!} +
+
+
+ + +
+ {!! Form::select('sex', ['1' => 'LAKI-LAKI', '2' => 'PEREMPUAN'], null, ['class' => 'form-control']) !!} +
+
+
+ + +
+ {!! Form::select('pendidikan_id', $pendidikan, null, ['class' => 'form-control']) !!} +
+
+
+ + +
+ {!! Form::select('agama_id', $agama, null, ['class' => 'form-control']) !!} +
+
+
+ + +
+ {!! Form::text('pangkat', null, ['placeholder' => 'Pangkat/Golongan','class' => 'form-control']) !!} +
+
+
+ + +
+ {!! Form::text('no_sk', null, ['placeholder' => 'Nomor SK Pengangkatan','class' => 'form-control']) !!} +
+
+
+ + +
+ {!! Form::text('tanggal_sk', null, ['placeholder' => 'Tanggal SK Pengangkatan','class' => 'form-control datetime']) !!} +
+
+
+ + +
+ {!! Form::text('no_henti', null, ['placeholder' => 'Nomor SK Pemberhentian','class' => 'form-control']) !!} +
+
+
+ + +
+ {!! Form::text('tanggal_henti', null, ['placeholder' => 'Tanggal SK Pemberhentian','class' => 'form-control datetime']) !!} +
+
+
+ + +
+ {!! Form::text('masa_jabatan', null, ['placeholder' => 'Masa Jabatan','class' => 'form-control', 'required'=>true]) !!} +
+
+
+ + +
+ {!! Form::select('jabatan_id', $jabatan, null, ['class' => 'form-control']) !!} +
+
+
+@include('partials.asset_jqueryvalidation') + +@include(('partials.asset_datetimepicker')) +@push('scripts') +{!! JsValidator::formRequest('App\Http\Requests\PengurusRequest', '#form-pengurus') !!} + + +@endpush diff --git a/resources/views/data/pengurus/index.blade.php b/resources/views/data/pengurus/index.blade.php new file mode 100644 index 000000000..91c909817 --- /dev/null +++ b/resources/views/data/pengurus/index.blade.php @@ -0,0 +1,108 @@ +@extends('layouts.dashboard_template') + +@section('title') Data Pengurus @endsection + +@section('content') +
+

+ {{ $page_title ?? "Page Title" }} + {{ $page_description ?? '' }} +

+ +
+ +
+ + @include('partials.flash_message') + +
+
+  Tambah +
+
+
+
+
+ + +
+
+
+
+
+ + + + + + + + + + + + + + + + + + + + +
AksiFotoNama, NIP, NIKTempat, Tanggal LahirJenis KelaminAgamaPangkat/GolonganJabatanStatusPendidikan TerakhirNo SK PengangkatanTanggal SK PengangkatanNo SK PemberhentianTanggal SK PemberhentianMasa/Periode Jabatan
+
+
+
+
+@endsection + +@include('partials.asset_datatables') + +@push('scripts') + +@include('forms.datatable-vertical') +@include('forms.delete-modal') +@include('forms.suspend-modal') +@include('forms.active-modal', ['title'=>$page_title]) +@endpush diff --git a/resources/views/data/profil/form_edit.blade.php b/resources/views/data/profil/form_edit.blade.php index 05fb864d3..68fe6f362 100644 --- a/resources/views/data/profil/form_edit.blade.php +++ b/resources/views/data/profil/form_edit.blade.php @@ -94,67 +94,9 @@ -
- -
- {!! Form::textarea('sambutan', null, ['class' => 'textarea', 'placeholder' => 'Sambutan '.$sebutan_kepala_wilayah. ' ' .$profil->nama_kecamatan .'', 'style' => 'width: 100%; - height: 200px; font-size: 14px; line-height: 18px; border: 1px solid #dddddd; padding: 10px;']) !!} -
-
-
- -
- -
- -
-
-
- -
- {!! Form::text('nama_camat', null, ['placeholder' => 'Nama Camat', 'class' => 'form-control', 'required']) !!} -
-
-
- -
- {!! Form::text('sekretaris_camat', null, ['placeholder' => 'Sekretaris Camat', 'class' => 'form-control', 'required']) !!} -
-
-
- -
- {!! Form::text('kepsek_pemerintahan_umum', null, ['placeholder' => 'Kepala Seksi Pemerintahan Umum', 'class' => 'form-control', 'required']) !!} -
-
-
- -
- {!! Form::text('kepsek_kesejahteraan_masyarakat', null, ['placeholder' => 'Kepala Seksi Kesejahteraan Masyarakat', 'class' => 'form-control', 'required']) !!} -
-
-
- -
- {!! Form::text('kepsek_pemberdayaan_masyarakat', null, ['placeholder' => 'Kepala Seksi Pemberdayaan Masyarakat', 'class' => 'form-control', 'required']) !!} -
-
-
- -
- {!! Form::text('kepsek_pelayanan_umum', null, ['placeholder' => 'Kepala Seksi Pelayanan Umum', 'class' => 'form-control', 'required']) !!} -
-
-
- -
- {!! Form::text('kepsek_trantib', null, ['placeholder' => 'Kepala Seksi TRANTIB', 'class' => 'form-control', 'required']) !!} -
-
-
@@ -204,6 +146,13 @@ @endif
+
+ +
+ {!! Form::textarea('sambutan', null, ['class' => 'textarea', 'placeholder' => 'Sambutan '.$sebutan_kepala_wilayah. ' ' .$profil->nama_kecamatan .'', 'style' => 'width: 100%; + height: 200px; font-size: 14px; line-height: 18px; border: 1px solid #dddddd; padding: 10px;']) !!} +
+
diff --git a/resources/views/data/program_bantuan/show.blade.php b/resources/views/data/program_bantuan/show.blade.php index 69e3c8378..154d2b2b4 100644 --- a/resources/views/data/program_bantuan/show.blade.php +++ b/resources/views/data/program_bantuan/show.blade.php @@ -90,7 +90,7 @@ {!! $row->kartu_nik !!} {!! $row->kartu_nama !!} {!! $row->kartu_tempat_lahir !!} - {!! $row->kartu_tanggal_lahir !!} + {!! format_date($row->kartu_tanggal_lahir) !!} {!! $row->kartu_alamat !!} @endforeach diff --git a/resources/views/forms/suspend-modal.blade.php b/resources/views/forms/suspend-modal.blade.php index f35f7e17e..51ae83923 100755 --- a/resources/views/forms/suspend-modal.blade.php +++ b/resources/views/forms/suspend-modal.blade.php @@ -9,7 +9,7 @@

Anda yakin ingin menangguhkan data ini?

- \ No newline at end of file + diff --git a/resources/views/sistem_komplain/admin_komplain/index.blade.php b/resources/views/sistem_komplain/admin_komplain/index.blade.php index 040045cfa..8c250396a 100755 --- a/resources/views/sistem_komplain/admin_komplain/index.blade.php +++ b/resources/views/sistem_komplain/admin_komplain/index.blade.php @@ -22,7 +22,7 @@ - + diff --git a/resources/views/sistem_komplain/admin_komplain/show.blade.php b/resources/views/sistem_komplain/admin_komplain/show.blade.php new file mode 100644 index 000000000..2cbbf8f2e --- /dev/null +++ b/resources/views/sistem_komplain/admin_komplain/show.blade.php @@ -0,0 +1,376 @@ +@extends('layouts.dashboard_template') + +@section('content') +
+

+ {{ $page_title ?? "Page Title" }} + {{ $page_description ?? '' }} +

+ +
+ +
+
+
+
+
+ @include('partials.flash_message') + +
+ +
+
+
+ +
+
+
+
LAPORAN:
+ +

Yth: {{ config('profil.sebutan_kepala_wilayah') . ' ' . config('profil.nama_kecamatan') }}

+
+

+ {{ $komplain->laporan }} +

+
+
+
+
+
LAMPIRAN:
+ @if($komplain->lampiran1 == '' && $komplain->lampiran2 == '' && $komplain->lampiran3 == '' && $komplain->lampiran4 == '') +

+ Tidak ada lampiran. +

+ @else + @if(! $komplain->lampiran1 == '') + + {{ $komplain->komplain_id}}-Lampiran1 + + @endif + @if(! $komplain->lampiran2 == '') + + {{ $komplain->komplain_id}}-Lampiran2 + + @endif + @if(! $komplain->lampiran3 == '') + + {{ $komplain->komplain_id}}-Lampiran3 + + @endif + @if(! $komplain->lampiran4 == '') + + {{ $komplain->komplain_id}}-Lampiran4 + + @endif + @endif +
+
+ +
+
+
TINDAK LANJUT:
+ {{ Form::hidden('komplain_id', $komplain->komplain_id, ['id' => 'komplain_id']) }} +
+
+
+
+ +
+
+
+ user image + + TRACKING ID #{{ $komplain->komplain_id }} + + PELAPOR : {{ $komplain->nama }} +
+ +
+
AksiAksi Judul Pelapor Kategori
+ + + + + + + + + + + + +
KATEGORI{{ $komplain->kategori_komplain->nama }}
TANGGAL LAPOR{{ format_date($komplain->created_at) }}
STATUS{{ ucfirst(strtolower($komplain->status)) }}
+ +
+
+ @php $user = auth()->user(); @endphp + @if(isset($user) && $user->hasRole(['super-admin', 'admin-kecamatan', 'admin-komplain'])) + + @if($komplain->status != 'SELESAI') + Jawab + @endif + @endif +
+
+ + + + + + + + + + + + + + +@endsection + +@include('partials.asset_fancybox') +@push('scripts') + + +@endpush +@include(('partials.asset_datetimepicker')) +@push('scripts') + + + +@endpush \ No newline at end of file diff --git a/resources/views/sistem_komplain/komplain/index.blade.php b/resources/views/sistem_komplain/komplain/index.blade.php index 726b3bbbd..f9a75dcdc 100755 --- a/resources/views/sistem_komplain/komplain/index.blade.php +++ b/resources/views/sistem_komplain/komplain/index.blade.php @@ -13,7 +13,7 @@ @foreach ($komplains as $item)
- user image + user image {{ $item->judul }} {{ $item->kategori_komplain->nama }} diff --git a/resources/views/sistem_komplain/komplain/jawabans.blade.php b/resources/views/sistem_komplain/komplain/jawabans.blade.php index 868621be3..e0de7fd0f 100755 --- a/resources/views/sistem_komplain/komplain/jawabans.blade.php +++ b/resources/views/sistem_komplain/komplain/jawabans.blade.php @@ -11,6 +11,21 @@ @endif

{{ $jawab->jawaban }}

+ +
+
+ @php $user = auth()->user(); @endphp + @if(isset($user) && $user->hasRole(['super-admin', 'admin-kecamatan', 'admin-komplain']) && ($jawab->penjawab == 'Admin') && ($komplain->status != 'SELESAI')) + + Ubah Jawaban + + {!! Form::open(['method' => 'DELETE','route' => ['admin-komplain.deletekomentar', $jawab->id],'style' => 'display:inline']) !!} + + {!! Form::close() !!} + @endif +
+
@endforeach \ No newline at end of file diff --git a/resources/views/sistem_komplain/komplain/show.blade.php b/resources/views/sistem_komplain/komplain/show.blade.php index d1eafb920..9453dc1b2 100755 --- a/resources/views/sistem_komplain/komplain/show.blade.php +++ b/resources/views/sistem_komplain/komplain/show.blade.php @@ -69,7 +69,7 @@
- user image + user image TRACKING ID #{{ $komplain->komplain_id }} @@ -84,7 +84,7 @@ TANGGAL LAPOR - {{ format_date($komplain->created_at) }} + {{ format_datetime($komplain->created_at) }} STATUS @@ -211,6 +211,37 @@ class="fa fa-trash margin-r-5"> Hapus
+ + + @endsection @include('partials.asset_fancybox') @@ -341,6 +372,76 @@ class="fa fa-trash margin-r-5"> Hapus } }); }); + + $(document).on('click', '#btn-ubah-reply-admin', function(e) { + url = $(this).attr('data-href'); + $('#form-ubah-reply-admin').attr('action', url ); + + $.ajax({ + type: "GET", + url: url, + success: function( data ) { + $('#modalUbahReplyAdmin').modal({ + backdrop: 'static', + keyboard: false, + show: true + }); + $('#ubah-jawab-admin').val(data.data.jawaban); + $('#id_jawab').val(data.data.id); + }, + }); + e.preventDefault(); + }); + + $('#modalUbahReplyAdmin').on('hidden.bs.modal', function () { + $('#ubah-jawab-admin').val(''); + $('#form-errors-admin').html(''); + }) + + $('#form-ubah-reply-admin').on('submit', function(e) { + e.preventDefault(); + var jawab = $('#jawab').val(); + var komplain_id = $('#komplain_id').val(); + var id_jawab = $('#id_jawab').val(); + url = url.replace('getkomentar', 'updatekomentar'); + + $.ajax({ + type: "POST", + url: url, + data: $("#form-ubah-reply-admin").serialize(), + success: function( msg ) { + if(msg.status == 'success'){ + refresh_jawaban(id_komplain); + $('#ubah-jawab-admin').val(''); + $('#modalUbahReplyAdmin').modal('hide'); + } + }, + error :function( jqXhr ) { + if( jqXhr.status === 401 ) //redirect if not authenticated user. + $( location ).prop( 'pathname', 'auth/login' ); + if( jqXhr.status === 422 ) { + //process validation errors here. + $errors = jqXhr.responseJSON; //this will get the errors response data. + console.log($errors); + //show them somewhere in the markup + //e.g + errorsHtml = '
    '; + + $.each( $errors.errors, function( key, value ) { + errorsHtml += '
  • ' + value[0] + '
  • '; //showing only the first error. + }); + errorsHtml += '
'; + + $( '#form-errors-admin' ).html( errorsHtml ); //appending to a
inside form + } else { + /// do some thing else + } + }, + headers: { + 'X-CSRF-TOKEN': $('meta[name="_token"]').attr('content') + } + }); + }); }); function refresh_jawaban(id_komplain) diff --git a/resources/views/user/form.blade.php b/resources/views/user/form.blade.php index f06311def..7b492aa5b 100755 --- a/resources/views/user/form.blade.php +++ b/resources/views/user/form.blade.php @@ -1,4 +1,20 @@ @include('partials.flash_message') +
+ + +
+ +
+
@@ -28,7 +44,9 @@
- + +
+
@@ -72,7 +90,7 @@
- {{ Form::select('role', $item, !empty(old('role'))?old('role'):auth()->user()->roles->first()->name, ['class' => 'form-control']) }} + {{ Form::select('role', $item, $user->getRoleNames(), ['class' => 'form-control']) }}
@@ -89,3 +107,43 @@ @include('partials.asset_jqueryvalidation') + +@push( 'scripts' ) + +@endpush diff --git a/resources/views/widgets/camat.blade.php b/resources/views/widgets/camat.blade.php index f7ed29abe..4f3377dc5 100644 --- a/resources/views/widgets/camat.blade.php +++ b/resources/views/widgets/camat.blade.php @@ -1,11 +1,12 @@ - +@if ($camat)
- +

- {{ $profil->nama_camat }}
{{ $sebutan_kepala_wilayah }} {{ $profil->nama_kecamatan }}

+ {{ $camat->nama }}
{{ $sebutan_kepala_wilayah }} {{ $profil->nama_kecamatan }}
+@endif diff --git a/resources/views/widgets/media_sosial.blade.php b/resources/views/widgets/media_sosial.blade.php index 2294b8702..7aa73eac3 100644 --- a/resources/views/widgets/media_sosial.blade.php +++ b/resources/views/widgets/media_sosial.blade.php @@ -5,7 +5,7 @@ @foreach($medsos as $key => $data)
  • - Media Sosial Image + Media Sosial Image
  • @endforeach diff --git a/resources/views/widgets/sinergi_program.blade.php b/resources/views/widgets/sinergi_program.blade.php index 30799a287..1a364f264 100644 --- a/resources/views/widgets/sinergi_program.blade.php +++ b/resources/views/widgets/sinergi_program.blade.php @@ -5,7 +5,7 @@ @foreach($sinergi as $key => $data) @endforeach diff --git a/routes/web.php b/routes/web.php index b0b83f44a..8f8ab722e 100644 --- a/routes/web.php +++ b/routes/web.php @@ -311,7 +311,7 @@ }); // Data Desa - Route::group(['prefix' => 'data-desa', 'middleware' => ['role:super-admin|admin-desa']], function () { + Route::group(['prefix' => 'data-desa', 'middleware' => ['role:super-admin|admin-kecamatan']], function () { Route::get('/', ['as' => 'data.data-desa.index', 'uses' => 'DataDesaController@index']); Route::get('getdata', ['as' => 'data.data-desa.getdata', 'uses' => 'DataDesaController@getDataDesa']); Route::get('getdata/ajax', ['as' => 'data.data-desa.getdataajax', 'uses' => 'DataDesaController@getDataDesaAjax']); @@ -324,6 +324,13 @@ Route::delete('destroy/{id}', ['as' => 'data.data-desa.destroy', 'uses' => 'DataDesaController@destroy']); }); + // Jabatan + Route::resource('jabatan', 'JabatanController', ['as'=>'data'])->middleware(['role:super-admin|admin-kecamatan'])->except(['show']); + + //Pengurus + Route::post('pengurus/lock/{id}/{status}', ['as' => 'data.pengurus.lock', 'uses' => 'PengurusController@lock'])->middleware(['role:super-admin|admin-kecamatan']); + Route::resource('pengurus', 'PengurusController', ['as'=>'data'])->middleware(['role:super-admin|admin-kecamatan'])->except(['show']); + // Penduduk Route::group(['prefix' => 'penduduk', 'middleware' => ['role:super-admin|admin-desa']], function () { Route::get('/', ['as' => 'data.penduduk.index', 'uses' => 'PendudukController@index']); @@ -503,6 +510,10 @@ Route::delete('destroy/{id}', ['as' => 'admin-komplain.destroy', 'uses' => 'AdminKomplainController@destroy']); Route::put('setuju/{id}', ['as' => 'admin-komplain.setuju', 'uses' => 'AdminKomplainController@disetujui']); Route::get('statistik', ['as' => 'admin-komplain.statistik', 'uses' => 'AdminKomplainController@statistik']); + Route::get('show/{id}', ['as' => 'admin-komplain.show', 'uses' => 'AdminKomplainController@show']); + Route::delete('deletekomentar/{id}', ['as' => 'admin-komplain.deletekomentar', 'uses' => 'AdminKomplainController@deletekomentar']); + Route::get('getkomentar/{id}', ['as' => 'admin-komplain.getkomentar', 'uses' => 'AdminKomplainController@getKomentar']); + Route::put('updatekomentar/{id}', ['as' => 'admin-komplain.updatekomentar', 'uses' => 'AdminKomplainController@updateKomentar']); }); }); @@ -539,7 +550,7 @@ Route::put('update/{id}', ['as' => 'setting.user.update', 'uses' => 'User\UserController@update']); Route::put('updatePassword/{id}', ['as' => 'setting.user.updatePassword', 'uses' => 'User\UserController@updatePassword']); Route::put('password/{id}', ['as' => 'setting.user.password', 'uses' => 'User\UserController@password']); - Route::delete('destroy/{id}', ['as' => 'setting.user.destroy', 'uses' => 'User\UserController@destroy']); + Route::post('destroy/{id}', ['as' => 'setting.user.destroy', 'uses' => 'User\UserController@destroy']); Route::post('active/{id}', ['as' => 'setting.user.active', 'uses' => 'User\UserController@active']); Route::get('photo-profil/{id}', ['as' => 'setting.user.photo', 'uses' => 'User\UserController@photo']); Route::put('update-photo/{id}', ['as' => 'setting.user.uphoto', 'uses' => 'User\UserController@updatePhoto']);