From ed2082e075904350e5965ceff43a5f81068b665b Mon Sep 17 00:00:00 2001 From: Syahran Saputra Date: Fri, 13 Jan 2023 15:38:58 +0800 Subject: [PATCH 01/22] Update header.blade.php (#610) Fix bug Foto & Nama Camat di Menu Profil --- resources/views/layouts/frontends/header.blade.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/resources/views/layouts/frontends/header.blade.php b/resources/views/layouts/frontends/header.blade.php index 73f21eaed..4f5307634 100644 --- a/resources/views/layouts/frontends/header.blade.php +++ b/resources/views/layouts/frontends/header.blade.php @@ -32,8 +32,8 @@ {{ strip_tags($profil->sambutan) }}
  • - -
    {{ $profil->nama_camat }}
    + +
    {{ $camat->namaGelar }}
    {{ $sebutan_kepala_wilayah }} {{ $profil->nama_kecamatan }}
  • From 33c111d8f4014422cbf074c3b864e507d3400fb7 Mon Sep 17 00:00:00 2001 From: Yogi Perdana Date: Fri, 13 Jan 2023 14:41:44 +0700 Subject: [PATCH 02/22] Mutakhirkan catatan rilis --- catatan_rilis.md | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/catatan_rilis.md b/catatan_rilis.md index c86c902e9..ef683270f 100644 --- a/catatan_rilis.md +++ b/catatan_rilis.md @@ -3,12 +3,7 @@ Di rilis v23.01.01, menyediakan fitur Widget Perangkat Kecamatan dan Tombol Reset Peta. Rilis ini juga berisi perbaikan lain yang diminta Komunitas OpenDK. #### Penambahan Fitur -1. [#579](https://github.com/OpenSID/OpenDK/issues/579) Penambahan fitur tombol reset peta kecamatan. -2. [#574](https://github.com/OpenSID/OpenDK/issues/574) Penambahan widget untuk menampilkan daftar perangkat kecamatan. -3. [#576](https://github.com/OpenSID/OpenDK/issues/576) Penambahan daftar perangkat-perangkat kecamatan pada menu Struktur Pemerintahan + #### Perbaikan bug -1. [#577](https://github.com/OpenSID/OpenDK/issues/577) Perbaikan Gelar tidak muncul di widget camat. -2. [#575](https://github.com/OpenSID/OpenDK/issues/575) Perbaikan Halaman struktur pemerintahan tidak menampilkan data perangkat saat ini. -3. [#598](https://github.com/OpenSID/OpenDK/issues/598) Perbaikan gagal menjalankan seeder profil ketika install baru. -4. [#598](https://github.com/OpenSID/OpenDK/issues/601) Perbaikan Error Saat menambahkan data pengurus. +1. [#609](https://github.com/OpenSID/OpenDK/issues/609) Perbaikan foto dan nama camat di menu profil tidak tampil. From 6dc687f2dab6c48a85d1f9e26c614f5de6f79db0 Mon Sep 17 00:00:00 2001 From: Yogi Perdana Date: Sat, 14 Jan 2023 11:39:00 +0700 Subject: [PATCH 03/22] Perbaiki panjang slug prosedur (#606) * Perbaiki panjang slug prosedur * Sesuaikan migrasi * Fix styling * Update header.blade.php (#610) Fix bug Foto & Nama Camat di Menu Profil * Mutakhirkan catatan rilis * mutakhirkan catatan rilis Co-authored-by: yogiperdana Co-authored-by: Syahran Saputra Co-authored-by: sarwono --- catatan_rilis.md | 3 +- .../2022_06_22_205014_add_slug_prosedur.php | 2 +- ...2023_01_12_151140_change_slug_prosedur.php | 61 +++++++++++++++++++ 3 files changed, 64 insertions(+), 2 deletions(-) create mode 100644 database/migrations/2023_01_12_151140_change_slug_prosedur.php diff --git a/catatan_rilis.md b/catatan_rilis.md index ef683270f..b9fab8438 100644 --- a/catatan_rilis.md +++ b/catatan_rilis.md @@ -4,6 +4,7 @@ Di rilis v23.01.01, menyediakan fitur Widget Perangkat Kecamatan dan Tombol Rese #### Penambahan Fitur - #### Perbaikan bug + 1. [#609](https://github.com/OpenSID/OpenDK/issues/609) Perbaikan foto dan nama camat di menu profil tidak tampil. +2. [#605](https://github.com/OpenSID/OpenDK/issues/605) Perbaikan eror migrasi pada tabel prosedur. diff --git a/database/migrations/2022_06_22_205014_add_slug_prosedur.php b/database/migrations/2022_06_22_205014_add_slug_prosedur.php index 1cb5525d4..08c8a819f 100644 --- a/database/migrations/2022_06_22_205014_add_slug_prosedur.php +++ b/database/migrations/2022_06_22_205014_add_slug_prosedur.php @@ -44,7 +44,7 @@ class AddSlugProsedur extends Migration public function up() { Schema::table('das_prosedur', function (Blueprint $table) { - $table->char('slug', 50)->after('judul_prosedur')->nullable(false); + $table->char('slug', 150)->after('judul_prosedur')->nullable(false); }); // update data slug pada das prosedur diff --git a/database/migrations/2023_01_12_151140_change_slug_prosedur.php b/database/migrations/2023_01_12_151140_change_slug_prosedur.php new file mode 100644 index 000000000..2dd7817b1 --- /dev/null +++ b/database/migrations/2023_01_12_151140_change_slug_prosedur.php @@ -0,0 +1,61 @@ +string('slug', 150)->change(); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::table('das_prosedur', function (Blueprint $table) { + $table->string('slug', 150)->change(); + }); + } +} From 16f9c31cd8d76e44a86b3fbf60ee17738b34f4d1 Mon Sep 17 00:00:00 2001 From: Yogi Perdana Date: Mon, 16 Jan 2023 18:07:16 +0700 Subject: [PATCH 04/22] Perbaiki validasi prosedur (#616) * Perbaiki validasi prosedur * Update catatan_rilis.md Co-authored-by: Afila --- app/Http/Requests/ProsedurRequest.php | 2 +- catatan_rilis.md | 1 + resources/views/informasi/prosedur/form_create.blade.php | 7 +++++++ 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/app/Http/Requests/ProsedurRequest.php b/app/Http/Requests/ProsedurRequest.php index 36e9ebb6c..e66cf5036 100644 --- a/app/Http/Requests/ProsedurRequest.php +++ b/app/Http/Requests/ProsedurRequest.php @@ -53,7 +53,7 @@ public function authorize() public function rules() { return [ - 'judul_prosedur' => 'required|string|min:5|max:255', + 'judul_prosedur' => 'required|string|min:5|max:150', 'file_prosedur' => 'file|mimes:jpg,jpeg,png,gif,pdf|max:2048', ]; } diff --git a/catatan_rilis.md b/catatan_rilis.md index b9fab8438..c2ecf16a4 100644 --- a/catatan_rilis.md +++ b/catatan_rilis.md @@ -8,3 +8,4 @@ Di rilis v23.01.01, menyediakan fitur Widget Perangkat Kecamatan dan Tombol Rese 1. [#609](https://github.com/OpenSID/OpenDK/issues/609) Perbaikan foto dan nama camat di menu profil tidak tampil. 2. [#605](https://github.com/OpenSID/OpenDK/issues/605) Perbaikan eror migrasi pada tabel prosedur. +3. [#605](https://github.com/OpenSID/OpenDK/issues/615) Perbaikan validasi prosedur, judul prosedur tidak boleh lebih dari 150 karakter. diff --git a/resources/views/informasi/prosedur/form_create.blade.php b/resources/views/informasi/prosedur/form_create.blade.php index a488e74cd..67afec52e 100755 --- a/resources/views/informasi/prosedur/form_create.blade.php +++ b/resources/views/informasi/prosedur/form_create.blade.php @@ -17,3 +17,10 @@
    + +@include('partials.asset_jqueryvalidation') + +@push('scripts') +{!! JsValidator::formRequest('App\Http\Requests\ProsedurRequest', '#form-prosedur') !!} +@endpush + From 39ab6b46d05b2ab2793d758ad356deb072e86f0a Mon Sep 17 00:00:00 2001 From: Yogi Perdana Date: Wed, 1 Feb 2023 06:09:27 +0700 Subject: [PATCH 05/22] Perbaiki jika camat belum diisi (#623) * Perbaiki jika camat belum diisi * mutakhirkan catatan rilis --------- Co-authored-by: sarwono --- catatan_rilis.md | 1 + resources/views/layouts/frontends/header.blade.php | 8 +++++--- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/catatan_rilis.md b/catatan_rilis.md index c2ecf16a4..cdf859c97 100644 --- a/catatan_rilis.md +++ b/catatan_rilis.md @@ -9,3 +9,4 @@ Di rilis v23.01.01, menyediakan fitur Widget Perangkat Kecamatan dan Tombol Rese 1. [#609](https://github.com/OpenSID/OpenDK/issues/609) Perbaikan foto dan nama camat di menu profil tidak tampil. 2. [#605](https://github.com/OpenSID/OpenDK/issues/605) Perbaikan eror migrasi pada tabel prosedur. 3. [#605](https://github.com/OpenSID/OpenDK/issues/615) Perbaikan validasi prosedur, judul prosedur tidak boleh lebih dari 150 karakter. +4. [#622](https://github.com/OpenSID/OpenDK/issues/622) Perbaikan eror nama gelar ketika menjalankan di halaman beranda. diff --git a/resources/views/layouts/frontends/header.blade.php b/resources/views/layouts/frontends/header.blade.php index 4f5307634..a904d1269 100644 --- a/resources/views/layouts/frontends/header.blade.php +++ b/resources/views/layouts/frontends/header.blade.php @@ -32,9 +32,11 @@ {{ strip_tags($profil->sambutan) }}
  • - -
    {{ $camat->namaGelar }}
    -
    {{ $sebutan_kepala_wilayah }} {{ $profil->nama_kecamatan }}
    + @if ($camat) + +
    {{ $camat->namaGelar }}
    +
    {{ $sebutan_kepala_wilayah }} {{ $profil->nama_kecamatan }}
    + @endif
  • From 8d2c426c8e21c3c54566661337d876f63165595e Mon Sep 17 00:00:00 2001 From: Yogi Perdana Date: Wed, 1 Feb 2023 10:06:55 +0700 Subject: [PATCH 06/22] Custom error 500 (#621) * Custom error 5000 * mutakhirkan catatan rilis --------- Co-authored-by: sarwono --- catatan_rilis.md | 1 + resources/views/errors/500.blade.php | 10 ++++++++++ resources/views/errors/minimal.blade.php | 17 +++++++++++------ 3 files changed, 22 insertions(+), 6 deletions(-) diff --git a/catatan_rilis.md b/catatan_rilis.md index cdf859c97..560991fd8 100644 --- a/catatan_rilis.md +++ b/catatan_rilis.md @@ -10,3 +10,4 @@ Di rilis v23.01.01, menyediakan fitur Widget Perangkat Kecamatan dan Tombol Rese 2. [#605](https://github.com/OpenSID/OpenDK/issues/605) Perbaikan eror migrasi pada tabel prosedur. 3. [#605](https://github.com/OpenSID/OpenDK/issues/615) Perbaikan validasi prosedur, judul prosedur tidak boleh lebih dari 150 karakter. 4. [#622](https://github.com/OpenSID/OpenDK/issues/622) Perbaikan eror nama gelar ketika menjalankan di halaman beranda. +5. [#614](https://github.com/OpenSID/OpenDK/issues/614) Perbaikan informasi eror 500. diff --git a/resources/views/errors/500.blade.php b/resources/views/errors/500.blade.php index d9e95d9b9..e918a5a74 100644 --- a/resources/views/errors/500.blade.php +++ b/resources/views/errors/500.blade.php @@ -3,3 +3,13 @@ @section('title', __('Server Error')) @section('code', '500') @section('message', __('Server Error')) + +@section('custom-message') +

    + Mohon Periksa Log Error dan Laporkan Masalah di + Github + atau + Forum + dengan Melampirkan Log Error +

    +@endsection \ No newline at end of file diff --git a/resources/views/errors/minimal.blade.php b/resources/views/errors/minimal.blade.php index b63ac2b37..9269f1a5a 100644 --- a/resources/views/errors/minimal.blade.php +++ b/resources/views/errors/minimal.blade.php @@ -22,7 +22,7 @@ } .full-height { - height: 100vh; + padding: 40vh 0; } .flex-center { @@ -49,13 +49,18 @@ -
    -
    - @yield('code') +
    +
    +
    + @yield('code') +
    + +
    + @yield('message') +
    -
    - @yield('message') + @yield('custom-message')
    From 844f5653b36eeb3a5ddd3810bfa7065be43c059d Mon Sep 17 00:00:00 2001 From: sarwono <68048807+scqolbu24@users.noreply.github.com> Date: Tue, 7 Feb 2023 11:12:25 +0700 Subject: [PATCH 07/22] perbaiki eror menu keluarga (#627) * perbaiki eror menu keluarga * hapus name * meringkas script * Mutakhirkan catatan rilis --------- Co-authored-by: Yogi Perdana --- catatan_rilis.md | 6 +----- resources/views/data/keluarga/index.blade.php | 2 +- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/catatan_rilis.md b/catatan_rilis.md index 31ac1f35c..0993318ca 100644 --- a/catatan_rilis.md +++ b/catatan_rilis.md @@ -6,8 +6,4 @@ Terima kasih pada syahransaputra yang baru mulai berkontribusi. #### Perbaikan bug -1. [#609](https://github.com/OpenSID/OpenDK/issues/609) Perbaikan foto dan nama camat di menu profil tidak tampil. -2. [#605](https://github.com/OpenSID/OpenDK/issues/605) Perbaikan eror migrasi pada tabel prosedur. -3. [#605](https://github.com/OpenSID/OpenDK/issues/615) Perbaikan validasi prosedur, judul prosedur tidak boleh lebih dari 150 karakter. -4. [#622](https://github.com/OpenSID/OpenDK/issues/622) Perbaikan eror nama gelar ketika menjalankan di halaman beranda. -5. [#614](https://github.com/OpenSID/OpenDK/issues/614) Perbaikan informasi eror 500. +1. [#627](https://github.com/OpenSID/OpenDK/pull/627) Perbaiki eror menu keluarga. diff --git a/resources/views/data/keluarga/index.blade.php b/resources/views/data/keluarga/index.blade.php index a16e6b9c6..af1d687d0 100755 --- a/resources/views/data/keluarga/index.blade.php +++ b/resources/views/data/keluarga/index.blade.php @@ -59,7 +59,7 @@ {data: 'kepala_kk.nama', name: 'kepala_kk.nama'}, {data: 'tgl_daftar', name: 'tgl_daftar'}, {data: 'tgl_cetak_kk', name: 'tgl_cetak_kk'}, - {data: 'desa.nama', name: 'desa.nama'}, + {data: 'desa.nama', name: 'desa.nama', render: (data) => data == null ? '' : data}, {data: 'alamat', name: 'alamat'}, {data: 'rw', name: 'rw'}, {data: 'rt', name: 'rt'}, From 88fd179e87cdb67f8b2300ce3d5b866d98ecf780 Mon Sep 17 00:00:00 2001 From: Suyadi Date: Sun, 12 Feb 2023 11:46:51 +0700 Subject: [PATCH 08/22] Fix demo data #628 (#631) * Fix #628 * Enum jabatan_id, command bahasa indonesia * Force migrate & seed demo data * Command bahasa indonesia --- .../Commands/{dev.php => InstallDev.php} | 21 +++- app/Models/Pengurus.php | 4 + ..._add_back_missing_das_pengurus_columns.php | 98 +++++++++++++++++++ .../seeds/Demo/DemoDasPengurusTableSeeder.php | 72 ++++++++++++++ database/seeds/DemoDatabaseSeeder.php | 2 + 5 files changed, 192 insertions(+), 5 deletions(-) rename app/Console/Commands/{dev.php => InstallDev.php} (82%) create mode 100644 database/migrations/2023_02_06_061656_add_back_missing_das_pengurus_columns.php create mode 100644 database/seeds/Demo/DemoDasPengurusTableSeeder.php diff --git a/app/Console/Commands/dev.php b/app/Console/Commands/InstallDev.php similarity index 82% rename from app/Console/Commands/dev.php rename to app/Console/Commands/InstallDev.php index 5e2c0bbdd..bdacada97 100644 --- a/app/Console/Commands/dev.php +++ b/app/Console/Commands/InstallDev.php @@ -34,7 +34,7 @@ use Illuminate\Console\Command; use Illuminate\Support\Facades\Artisan; -class dev extends Command +class InstallDev extends Command { /** * The name and signature of the console command. @@ -57,16 +57,27 @@ class dev extends Command */ public function handle() { - Artisan::call('key:generate'); $this->line('Menambahkan key'); + Artisan::call('key:generate'); - Artisan::call('storage:link'); $this->line('Menambahkan storage ke public'); + Artisan::call('storage:link'); - Artisan::call('migrate'); $this->line('Menambahkan migrasi'); + Artisan::call('migrate:fresh --force'); - Artisan::call('db:seed --class="DemoDatabaseSeeder"'); $this->line('Menambahkan data demo'); + Artisan::call('db:seed --class="DemoDatabaseSeeder" --force'); + + $this->line('Kunci akses penginstal web'); + + if (!is_file($file = storage_path('installed'))) { + file_put_contents( + $file, + sprintf('%s berhasil DIPASANG pada %s', config('app.name'), now()) + ); + } + + $this->line('Selesai.'); } } diff --git a/app/Models/Pengurus.php b/app/Models/Pengurus.php index 48be18983..580bc2c46 100644 --- a/app/Models/Pengurus.php +++ b/app/Models/Pengurus.php @@ -48,6 +48,10 @@ class Pengurus extends Model 'pendidikan', ]; + protected $appends = [ + 'namaGelar' + ]; + public function getFotoAttribute() { return $this->attributes['foto'] ? Storage::url('pengurus/' . $this->attributes['foto']) : null; diff --git a/database/migrations/2023_02_06_061656_add_back_missing_das_pengurus_columns.php b/database/migrations/2023_02_06_061656_add_back_missing_das_pengurus_columns.php new file mode 100644 index 000000000..a7cffca9d --- /dev/null +++ b/database/migrations/2023_02_06_061656_add_back_missing_das_pengurus_columns.php @@ -0,0 +1,98 @@ +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'); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::table('das_profil', function (Blueprint $table) { + $table->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'); + }); + } +} diff --git a/database/seeds/Demo/DemoDasPengurusTableSeeder.php b/database/seeds/Demo/DemoDasPengurusTableSeeder.php new file mode 100644 index 000000000..2544300da --- /dev/null +++ b/database/seeds/Demo/DemoDasPengurusTableSeeder.php @@ -0,0 +1,72 @@ + 'H. Hadi Fathurrahman, S.Sos, M.AP', + 'gelar_depan' => null, + 'gelar_belakang' => null, + 'nip' => null, + 'nik' => random_int(16, 16), + 'status' => 1, + 'foto' => null, + 'tempat_lahir' => 'Mangsit', + 'tanggal_lahir' => now(), + 'sex' => 1, + 'pendidikan_id' => 1, + 'agama_id' => 1, + 'no_sk' => null, + 'tanggal_sk' => now(), + 'masa_jabatan' => 5, + 'pangkat' => 'Camat', + 'no_henti' => null, + 'tanggal_henti' => null, + 'jabatan_id' => JenisJabatan::Camat, + 'created_at' => now(), + ]; + + DB::table('das_pengurus')->insert($data); + } +} diff --git a/database/seeds/DemoDatabaseSeeder.php b/database/seeds/DemoDatabaseSeeder.php index 4653dbcb1..932a69e97 100644 --- a/database/seeds/DemoDatabaseSeeder.php +++ b/database/seeds/DemoDatabaseSeeder.php @@ -42,6 +42,7 @@ use Database\Seeds\Demo\DemoPutusSekolahSeeder; use Database\Seeds\Demo\DemoTingkatPendidikanSeeder; use Database\Seeds\Demo\DemoToiletSanitasiSeeder; +use Database\Seeds\Demo\DemoDasPengurusTableSeeder; use Illuminate\Database\Seeder; class DemoDatabaseSeeder extends Seeder @@ -69,5 +70,6 @@ public function run() $this->call(DemoPutusSekolahSeeder::class); $this->call(DemoTingkatPendidikanSeeder::class); $this->call(DemoToiletSanitasiSeeder::class); + $this->call(DemoDasPengurusTableSeeder::class); } } From 82354e008ef279a34d427949d6f54f76599845de Mon Sep 17 00:00:00 2001 From: Yogi Perdana Date: Sun, 12 Feb 2023 11:48:16 +0700 Subject: [PATCH 09/22] Mutakhirkan catatan rilis --- catatan_rilis.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/catatan_rilis.md b/catatan_rilis.md index 0993318ca..ab6e529fe 100644 --- a/catatan_rilis.md +++ b/catatan_rilis.md @@ -6,4 +6,5 @@ Terima kasih pada syahransaputra yang baru mulai berkontribusi. #### Perbaikan bug -1. [#627](https://github.com/OpenSID/OpenDK/pull/627) Perbaiki eror menu keluarga. +1. [#627](https://github.com/OpenSID/OpenDK/pull/627) Perbaikan eror menu keluarga. +1. [#628](https://github.com/OpenSID/OpenDK/issues/628) Perbaikan eror data demo. From 89b459f0d37d033b0b0ec4dc18f26a1649b4acad Mon Sep 17 00:00:00 2001 From: Yogi Perdana Date: Tue, 28 Feb 2023 02:32:54 +0700 Subject: [PATCH 10/22] Perbaiki sambutan camat kosong (#642) * Perbaiki sambutan camat kosong * Fix styling * Update catatan_rilis.md --------- Co-authored-by: yogiperdana Co-authored-by: Afila --- catatan_rilis.md | 3 ++- database/seeds/DemoDatabaseSeeder.php | 2 +- resources/views/layouts/frontends/header.blade.php | 6 ++++-- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/catatan_rilis.md b/catatan_rilis.md index ab6e529fe..a3a86ca3f 100644 --- a/catatan_rilis.md +++ b/catatan_rilis.md @@ -7,4 +7,5 @@ Terima kasih pada syahransaputra yang baru mulai berkontribusi. #### Perbaikan bug 1. [#627](https://github.com/OpenSID/OpenDK/pull/627) Perbaikan eror menu keluarga. -1. [#628](https://github.com/OpenSID/OpenDK/issues/628) Perbaikan eror data demo. +2. [#628](https://github.com/OpenSID/OpenDK/issues/628) Perbaikan eror data demo. +3. [#641](https://github.com/OpenSID/OpenDK/issues/641) Perbaiki sambutan camat kosong #642 diff --git a/database/seeds/DemoDatabaseSeeder.php b/database/seeds/DemoDatabaseSeeder.php index 932a69e97..21ff5b106 100644 --- a/database/seeds/DemoDatabaseSeeder.php +++ b/database/seeds/DemoDatabaseSeeder.php @@ -34,6 +34,7 @@ use Database\Seeds\Demo\DemoAPBDesaSeeder; use Database\Seeds\Demo\DemoDasDataDesaTableSeeder; use Database\Seeds\Demo\DemoDasDataUmumTableSeeder; +use Database\Seeds\Demo\DemoDasPengurusTableSeeder; use Database\Seeds\Demo\DemoDasProfilTableSeeder; use Database\Seeds\Demo\DemoEpidemiPenyakitSeeder; use Database\Seeds\Demo\DemoFasilitasPaudSeeder; @@ -42,7 +43,6 @@ use Database\Seeds\Demo\DemoPutusSekolahSeeder; use Database\Seeds\Demo\DemoTingkatPendidikanSeeder; use Database\Seeds\Demo\DemoToiletSanitasiSeeder; -use Database\Seeds\Demo\DemoDasPengurusTableSeeder; use Illuminate\Database\Seeder; class DemoDatabaseSeeder extends Seeder diff --git a/resources/views/layouts/frontends/header.blade.php b/resources/views/layouts/frontends/header.blade.php index a904d1269..eec87f0b3 100644 --- a/resources/views/layouts/frontends/header.blade.php +++ b/resources/views/layouts/frontends/header.blade.php @@ -28,8 +28,10 @@
  • -

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

    - {{ strip_tags($profil->sambutan) }} + @if ($profil->sambutan) +

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

    + {{ strip_tags($profil->sambutan) }} + @endif
  • @if ($camat) From aa98b5766171d1ec6176359e8430905c4030f74e Mon Sep 17 00:00:00 2001 From: Yogi Perdana Date: Tue, 28 Feb 2023 05:36:51 +0700 Subject: [PATCH 11/22] Perbaiki preview gambar slider (#644) * Perbaiki preview gambar tidak muncul * Fix styling * Update catatan_rilis.md --------- Co-authored-by: yogiperdana Co-authored-by: Afila --- .../Controllers/Setting/SlideController.php | 3 +- catatan_rilis.md | 3 +- resources/views/setting/slide/form.blade.php | 44 +++++++++++++++++-- 3 files changed, 44 insertions(+), 6 deletions(-) diff --git a/app/Http/Controllers/Setting/SlideController.php b/app/Http/Controllers/Setting/SlideController.php index 8f816a490..1cdc23b6b 100644 --- a/app/Http/Controllers/Setting/SlideController.php +++ b/app/Http/Controllers/Setting/SlideController.php @@ -63,10 +63,11 @@ public function getData() public function create() { + $slide = null; $page_title = 'Slide'; $page_description = 'Tambah Slide'; - return view('setting.slide.create', compact('page_title', 'page_description')); + return view('setting.slide.create', compact('page_title', 'page_description', 'slide')); } public function store(SlideRequest $request) diff --git a/catatan_rilis.md b/catatan_rilis.md index a3a86ca3f..6361789bd 100644 --- a/catatan_rilis.md +++ b/catatan_rilis.md @@ -8,4 +8,5 @@ Terima kasih pada syahransaputra yang baru mulai berkontribusi. 1. [#627](https://github.com/OpenSID/OpenDK/pull/627) Perbaikan eror menu keluarga. 2. [#628](https://github.com/OpenSID/OpenDK/issues/628) Perbaikan eror data demo. -3. [#641](https://github.com/OpenSID/OpenDK/issues/641) Perbaiki sambutan camat kosong #642 +3. [#641](https://github.com/OpenSID/OpenDK/issues/641) Perbaiki sambutan camat kosong +4. [#637](https://github.com/OpenSID/OpenDK/issues/637) Perbaiki preview gambar slider diff --git a/resources/views/setting/slide/form.blade.php b/resources/views/setting/slide/form.blade.php index 1a20aa527..a94c4ab29 100644 --- a/resources/views/setting/slide/form.blade.php +++ b/resources/views/setting/slide/form.blade.php @@ -12,13 +12,49 @@
  • - +
    - gambar) 'required' @endisset> + Dimensi gambar 1360 x 400 Piksel
    - + + +
    + +@push('scripts') + +@endpush From 866b97d9ca5fb54e82b27d7743dac9defb67631a Mon Sep 17 00:00:00 2001 From: Yogi Perdana Date: Tue, 28 Feb 2023 06:28:03 +0700 Subject: [PATCH 12/22] Perbaiki halaman sejarah (#645) * Perbaiki halaman sejarah * Fix styling * mutakhirkan catatan rilis --------- Co-authored-by: yogiperdana Co-authored-by: sarwono --- .../Controllers/Data/DataUmumController.php | 2 +- app/Models/DataUmum.php | 2 +- catatan_rilis.md | 1 + ...02_27_122959_rename_data_umum_tipologi.php | 61 +++++++++++++++++++ database/seeds/DasDataUmumTableSeeder.php | 2 +- .../seeds/Demo/DemoDasDataUmumTableSeeder.php | 2 +- .../views/data/data_umum/form_edit.blade.php | 4 +- .../views/pages/profil/sejarah.blade.php | 2 +- 8 files changed, 69 insertions(+), 7 deletions(-) create mode 100644 database/migrations/2023_02_27_122959_rename_data_umum_tipologi.php diff --git a/app/Http/Controllers/Data/DataUmumController.php b/app/Http/Controllers/Data/DataUmumController.php index 83e148e54..ef2d9459b 100644 --- a/app/Http/Controllers/Data/DataUmumController.php +++ b/app/Http/Controllers/Data/DataUmumController.php @@ -62,7 +62,7 @@ public function index() public function update(Request $request, $id) { request()->validate([ - 'tipologi' => 'required', + 'sejarah' => 'required', 'sumber_luas_wilayah' => 'required', 'luas_wilayah' => 'required', 'bts_wil_utara' => 'required', diff --git a/app/Models/DataUmum.php b/app/Models/DataUmum.php index 8138282bb..39117220d 100755 --- a/app/Models/DataUmum.php +++ b/app/Models/DataUmum.php @@ -39,7 +39,7 @@ class DataUmum extends Model protected $table = 'das_data_umum'; protected $fillable = [ - 'tipologi', + 'sejarah', 'ketinggian', 'sumber_luas_wilayah', 'luas_wilayah', diff --git a/catatan_rilis.md b/catatan_rilis.md index 6361789bd..1cb15db71 100644 --- a/catatan_rilis.md +++ b/catatan_rilis.md @@ -10,3 +10,4 @@ Terima kasih pada syahransaputra yang baru mulai berkontribusi. 2. [#628](https://github.com/OpenSID/OpenDK/issues/628) Perbaikan eror data demo. 3. [#641](https://github.com/OpenSID/OpenDK/issues/641) Perbaiki sambutan camat kosong 4. [#637](https://github.com/OpenSID/OpenDK/issues/637) Perbaiki preview gambar slider +5. [#639](https://github.com/OpenSID/OpenDK/issues/639) Perbaiki pengisian kolom sejarah. diff --git a/database/migrations/2023_02_27_122959_rename_data_umum_tipologi.php b/database/migrations/2023_02_27_122959_rename_data_umum_tipologi.php new file mode 100644 index 000000000..42f3e2066 --- /dev/null +++ b/database/migrations/2023_02_27_122959_rename_data_umum_tipologi.php @@ -0,0 +1,61 @@ +renameColumn('tipologi', 'sejarah'); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::table('das_data_umum', function (Blueprint $table) { + $table->renameColumn('sejarah', 'tipologi'); + }); + } +} diff --git a/database/seeds/DasDataUmumTableSeeder.php b/database/seeds/DasDataUmumTableSeeder.php index fa4118337..fbf250bc0 100755 --- a/database/seeds/DasDataUmumTableSeeder.php +++ b/database/seeds/DasDataUmumTableSeeder.php @@ -46,7 +46,7 @@ public function run() DB::table('das_data_umum')->insert([ 'id' => 1, 'profil_id' => 1, - 'tipologi' => null, + 'sejarah' => null, 'ketinggian' => 1, 'luas_wilayah' => 2.0, 'bts_wil_utara' => null, diff --git a/database/seeds/Demo/DemoDasDataUmumTableSeeder.php b/database/seeds/Demo/DemoDasDataUmumTableSeeder.php index 4b9823b2f..616a77ffc 100644 --- a/database/seeds/Demo/DemoDasDataUmumTableSeeder.php +++ b/database/seeds/Demo/DemoDasDataUmumTableSeeder.php @@ -49,7 +49,7 @@ public function run() DB::table('das_data_umum')->insert([ 'id' => 1, 'profil_id' => Profil::first()->id, - 'tipologi' => 'Kecamatan maju namun terpencil.', + 'sejarah' => 'Contoh sejarah kecamatan.', 'ketinggian' => 1, 'luas_wilayah' => 0.0, 'bts_wil_utara' => 'Kecamatan A', diff --git a/resources/views/data/data_umum/form_edit.blade.php b/resources/views/data/data_umum/form_edit.blade.php index cc277480e..8cf0d00aa 100644 --- a/resources/views/data/data_umum/form_edit.blade.php +++ b/resources/views/data/data_umum/form_edit.blade.php @@ -12,10 +12,10 @@ class="required">*
    - +
    - {!! Form::textarea('tipologi', null, ['placeholder' => 'Tipologi', 'class' => 'form-control', 'required', + {!! Form::textarea('sejarah', null, ['placeholder' => 'Sejarah', 'class' => 'form-control', 'required', 'rows'=>2]) !!}
    diff --git a/resources/views/pages/profil/sejarah.blade.php b/resources/views/pages/profil/sejarah.blade.php index 82c420bdf..cb17e2d0d 100644 --- a/resources/views/pages/profil/sejarah.blade.php +++ b/resources/views/pages/profil/sejarah.blade.php @@ -10,7 +10,7 @@
    -

    {!! $profil->dataumum->tipologi !!}

    +

    {!! $profil->dataumum->sejarah !!}

    From d52075a32d8d08671d73a7213c5fc4b94e424d91 Mon Sep 17 00:00:00 2001 From: Yogi Perdana Date: Wed, 1 Mar 2023 10:27:39 +0700 Subject: [PATCH 13/22] Security artikel (#649) * Tambah validasi upload file * Sesuaikan validasi dengan database * mutakhirkan catatan rilis --------- Co-authored-by: sarwono --- app/Http/Requests/ArtikelRequest.php | 3 ++- catatan_rilis.md | 7 ++++--- resources/views/informasi/artikel/_form.blade.php | 4 ++-- 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/app/Http/Requests/ArtikelRequest.php b/app/Http/Requests/ArtikelRequest.php index 0a6bb1605..a274f1991 100644 --- a/app/Http/Requests/ArtikelRequest.php +++ b/app/Http/Requests/ArtikelRequest.php @@ -53,9 +53,10 @@ public function authorize() public function rules() { return [ - 'judul' => 'required', + 'judul' => 'required|string|max:191', 'isi' => 'required', 'status' => 'required', + 'gambar' => 'nullable|image|mimes:jpg,jpeg,png|max:1024', ]; } } diff --git a/catatan_rilis.md b/catatan_rilis.md index 1cb15db71..4f47164da 100644 --- a/catatan_rilis.md +++ b/catatan_rilis.md @@ -8,6 +8,7 @@ Terima kasih pada syahransaputra yang baru mulai berkontribusi. 1. [#627](https://github.com/OpenSID/OpenDK/pull/627) Perbaikan eror menu keluarga. 2. [#628](https://github.com/OpenSID/OpenDK/issues/628) Perbaikan eror data demo. -3. [#641](https://github.com/OpenSID/OpenDK/issues/641) Perbaiki sambutan camat kosong -4. [#637](https://github.com/OpenSID/OpenDK/issues/637) Perbaiki preview gambar slider -5. [#639](https://github.com/OpenSID/OpenDK/issues/639) Perbaiki pengisian kolom sejarah. +3. [#641](https://github.com/OpenSID/OpenDK/issues/641) Perbaikan sambutan camat kosong +4. [#637](https://github.com/OpenSID/OpenDK/issues/637) Perbaikan preview gambar slider +5. [#639](https://github.com/OpenSID/OpenDK/issues/639) Perbaikan pengisian kolom sejarah. +6. [#2089](https://github.com/OpenSID/premium/issues/2089) Perbaikan validasi saat unggah gambar di artikel. diff --git a/resources/views/informasi/artikel/_form.blade.php b/resources/views/informasi/artikel/_form.blade.php index 5225958e0..2e01c9e49 100644 --- a/resources/views/informasi/artikel/_form.blade.php +++ b/resources/views/informasi/artikel/_form.blade.php @@ -31,7 +31,7 @@ - {!! Form::file('gambar', ['placeholder' => 'Gambar', 'class' => 'form-control', 'id' => 'file-artikel']) !!} + {!! Form::file('gambar', ['placeholder' => 'Gambar', 'class' => 'form-control', 'id' => 'file-artikel', 'accept' => 'jpg,jpeg,png']) !!} @if ($errors->has('gambar')) {{ $errors->first('gambar') }} @endif @@ -58,7 +58,7 @@ $('.textarea').wysihtml5(); - var fileTypes = ['jpg', 'jpeg', 'png', 'jpg']; //acceptable file types + var fileTypes = ['jpg', 'jpeg', 'png']; //acceptable file types function readURL(input) { if (input.files && input.files[0]) { From 83de156e43899d4f3796d5855b5cb3790c947264 Mon Sep 17 00:00:00 2001 From: Yogi Perdana Date: Mon, 6 Mar 2023 14:22:26 +0700 Subject: [PATCH 14/22] Perbaiki slider tidak bisa lebih dari 4 (#646) * Perbaiki slider tidak bisa lebih dari 4 * Fix styling * Pindah script ke controller * Sesuaikan deskripsi * Fix styling * Update catatan_rilis.md --------- Co-authored-by: yogiperdana Co-authored-by: Afila --- app/Http/Controllers/Controller.php | 28 ++ catatan_rilis.md | 10 +- public/css/slider.css | 384 ++---------------- .../views/layouts/frontends/slider.blade.php | 122 ++---- 4 files changed, 107 insertions(+), 437 deletions(-) diff --git a/app/Http/Controllers/Controller.php b/app/Http/Controllers/Controller.php index efedc93de..450a987fe 100644 --- a/app/Http/Controllers/Controller.php +++ b/app/Http/Controllers/Controller.php @@ -42,6 +42,7 @@ use App\Models\Program; use App\Models\SettingAplikasi; use App\Models\SinergiProgram; +use App\Models\Slide; use App\Models\TipePotensi; use Exception; use Illuminate\Foundation\Auth\Access\AuthorizesRequests; @@ -93,6 +94,32 @@ public function __construct() $navdesa = DataDesa::all(); $navpotensi = TipePotensi::orderby('nama_kategori', 'ASC')->get(); $pengurus = Pengurus::status()->get(); + $slides = Slide::orderBy('created_at', 'DESC')->get(); + + if (count($slides) < 1) { + $slides = collect([ + (object) [ + 'judul' => 'Pantai Garassikang', + 'deskripsi' => 'Lokasi: Bulu Jaya, Kecamatan Bangkala Barat, Kabupaten Jeneponto, Sulawesi Selatan', + 'gambar' => '/slide/slide-1.png', + ], + (object) [ + 'judul' => 'Batu Siping', + 'deskripsi' => 'Lokasi: Karampuang, Desa Garassikang, Kecamatan Bangkala Barat, Kabupaten Jeneponto, Sulawesi Selatan', + 'gambar' => '/slide/slide-2.png', + ], + (object) [ + 'judul' => 'Bukit Sinalu Bulu Jaya', + 'deskripsi' => 'Lokasi: Bulu Jaya, Kecamatan Bangkala Barat, Kabupaten Jeneponto, Sulawesi Selatan', + 'gambar' => '/slide/slide-3.png', + ], + (object) [ + 'judul' => 'Pantai Tamarunang', + 'deskripsi' => 'Lokasi: Tamarunang, Pabiringa, Kecamatan Binamu, Kabupaten Jeneponto, Sulawesi Selatan', + 'gambar' => '/slide/slide-4.png', + ], + ]); + } View::share([ 'profil' => $this->profil, @@ -106,6 +133,7 @@ public function __construct() 'navpotensi' => $navpotensi, 'camat' => $this->nama_camat, 'pengurus' => $pengurus->sortBy('jabatan.jenis'), + 'slides' => $slides, ]); } diff --git a/catatan_rilis.md b/catatan_rilis.md index 0c7e5ef1a..3e4bf5a09 100644 --- a/catatan_rilis.md +++ b/catatan_rilis.md @@ -4,9 +4,7 @@ Di rilis v23.03.01 berisi perbaikan yang diminta Komunitas OpenDK. #### Perbaikan bug -1. [#626](https://github.com/OpenSID/OpenDK/issues/626) Perbaikan eror menu keluarga. -2. [#628](https://github.com/OpenSID/OpenDK/issues/628) Perbaikan eror data demo. -3. [#641](https://github.com/OpenSID/OpenDK/issues/641) Perbaikan sambutan camat kosong -4. [#637](https://github.com/OpenSID/OpenDK/issues/637) Perbaikan preview gambar slider -5. [#639](https://github.com/OpenSID/OpenDK/issues/639) Perbaikan pengisian kolom sejarah. -6. [#2089](https://github.com/OpenSID/premium/issues/2089) Perbaikan validasi saat unggah gambar di artikel. +1. [#638](https://github.com/OpenSID/OpenDK/issues/638) Perbaiki slider tidak bisa lebih dari 4. + +#### Teknis +1. [#2089](https://github.com/OpenSID/premium/issues/2089) Perbaikan validasi saat unggah gambar di artikel. diff --git a/public/css/slider.css b/public/css/slider.css index 87c117c22..34638c25e 100644 --- a/public/css/slider.css +++ b/public/css/slider.css @@ -1,22 +1,19 @@ /* @media only screen and (min-width:768px) { */ -#slider { +.swiper { width: 100%; - height: 160px; + height: 450px; position: relative; overflow: hidden; } -.slides { +.swiper-wrapper { width: 400%; height: 100%; position: relative; - -webkit-animation: slide 30s infinite; - -moz-animation: slide 30s infinite; - animation: slide 30s infinite; } .slider-class { - width: 25%; + width: 100%; height: 100%; float: left; position: relative; @@ -45,8 +42,8 @@ } .legend { - border: 220px solid transparent; - border-left: 220px solid rgba(52, 73, 94, 0.7); + border: 520px solid transparent; + border-left: 520px solid rgba(52, 73, 94, 0.7); border-bottom: 0; position: absolute; bottom: 0; @@ -65,22 +62,19 @@ height: 50px; float: left; position: relative; - top: 55px; - -webkit-animation: content-s 7.5s infinite; - -moz-animation: content-s 7.5s infinite; - animation: content-s 7.5s infinite; + top: 255px; } .content-txt h1 { font-family: "Avant Garde", Avantgarde, "Century Gothic", CenturyGothic, "AppleGothic", sans-serif; text-transform: uppercase; - font-size: 11px; + font-size: 24px; color: #f39c12; text-align: left; - margin-left: 10px; + margin-left: 20px; padding-bottom: 0px; - width: 125px; + width: 325px; text-shadow: 2px 2px 0 rgba(0, 0, 0, 0.2); } @@ -88,371 +82,57 @@ font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif; font-weight: normal; - font-size: 8.5px; + font-size: 18px; font-style: italic; color: #fff; text-align: left; - margin-left: 10px; + margin-left: 20px; margin-top: 10px; - width: 150px; - line-height: 12px; -} - -.switch { - width: 100px; - height: 10px; - position: absolute; - bottom: 10px; - z-index: 1; - left: 10px; -} - -.switch > ul { - list-style: none; -} - -.switch > ul > li { - width: 8px; - height: 8px; - border-radius: 50%; - background: #333; - float: left; - margin-right: 5px; - cursor: pointer; + width: 350px; + line-height: 16px; } -.switch ul { - overflow: hidden; +.swiper-pagination-bullet-active { + background: #ff4900 !important; } /* Desktop */ -@media screen and (min-width: 768px) { +@media screen and (max-width: 768px) { #slider { height: 400px; } + .swiper { + height: 180px; + } + + .content-slide { + width: 23%; + } + .content-txt { - top: 200px; + top: 60px; } .content-txt h1 { - font-size: 24px; - margin-left: 30px; - padding-bottom: 10px; + font-size: 12px; width: auto; } .content-txt h2 { - font-size: 14px; - margin-left: 30px; - margin-top: 20px; + font-size: 10px; + margin-top: 10px; width: auto; line-height: 18px; } .legend { - border: 500px solid transparent; - border-left: 500px solid rgba(52, 73, 94, 0.7); + border: 280px solid transparent; + border-left: 280px solid rgba(52, 73, 94, 0.7); border-bottom: 0; position: absolute; bottom: 0; } - - .switch { - width: 120px; - height: 10px; - left: 30px; - } - - .switch > ul { - list-style: none; - } - - .switch > ul > li { - width: 10px; - height: 10px; - } -} - -.on { - width: 100%; - height: 100%; - border-radius: 50%; - background: #ff4900; - position: relative; - -webkit-animation: on 30s infinite; - -moz-animation: on 30s infinite; - animation: on 30s infinite; -} - -@-webkit-keyframes slide { - 0%, - 100% { - margin-left: 0; - } - 21% { - margin-left: 0; - } - 25% { - margin-left: -100%; - } - 46% { - margin-left: -100%; - } - 50% { - margin-left: -200%; - } - 71% { - margin-left: -200%; - } - 75% { - margin-left: -300%; - } - 96% { - margin-left: -300%; - } -} - -@-moz-keyframes slide { - 0%, - 100% { - margin-left: 0; - } - 21% { - margin-left: 0; - } - 25% { - margin-left: -100%; - } - 46% { - margin-left: -100%; - } - 50% { - margin-left: -200%; - } - 71% { - margin-left: -200%; - } - 75% { - margin-left: -300%; - } - 96% { - margin-left: -300%; - } -} - -@keyframes slide { - 0%, - 100% { - margin-left: 0; - } - 21% { - margin-left: 0; - } - 25% { - margin-left: -100%; - } - 46% { - margin-left: -100%; - } - 50% { - margin-left: -200%; - } - 71% { - margin-left: -200%; - } - 75% { - margin-left: -300%; - } - 96% { - margin-left: -300%; - } -} - -@-webkit-keyframes content-s { - 0% { - left: -420px; - } - 10% { - left: 0; - } - 30% { - left: 0; - } - 40% { - left: 0; - } - 50% { - left: 0; - } - 60% { - left: 0; - } - 70% { - left: 0; - } - 80% { - left: -420px; - } - 90% { - left: -420px; - } - 100% { - left: -420px; - } -} - -@-moz-keyframes content-s { - 0% { - left: -420px; - } - 10% { - left: 0; - } - 30% { - left: 0; - } - 40% { - left: 0; - } - 50% { - left: 0; - } - 60% { - left: 0; - } - 70% { - left: 0; - } - 80% { - left: -420px; - } - 90% { - left: -420px; - } - 100% { - left: -420px; - } -} - -@keyframes content-s { - 0% { - left: -420px; - } - 10% { - left: 20px; - } - 15% { - left: 0; - } - 30% { - left: 0; - } - 40% { - left: 0; - } - 50% { - left: 0; - } - 60% { - left: 0; - } - 70% { - left: 0; - } - 80% { - left: -420px; - } - 90% { - left: -420px; - } - 100% { - left: -420px; - } -} - -@-webkit-keyframes on { - 0%, - 100% { - margin-left: 0; - } - 21% { - margin-left: 0; - } - 25% { - margin-left: 15px; - } - 46% { - margin-left: 15px; - } - 50% { - margin-left: 30px; - } - 71% { - margin-left: 30px; - } - 75% { - margin-left: 45px; - } - 96% { - margin-left: 45px; - } -} - -@-moz-keyframes on { - 0%, - 100% { - margin-left: 0; - } - 21% { - margin-left: 0; - } - 25% { - margin-left: 15px; - } - 46% { - margin-left: 15px; - } - 50% { - margin-left: 30px; - } - 71% { - margin-left: 30px; - } - 75% { - margin-left: 45px; - } - 96% { - margin-left: 45px; - } -} - -@keyframes on { - 0%, - 100% { - margin-left: 0; - } - 21% { - margin-left: 0; - } - 25% { - margin-left: 15px; - } - 46% { - margin-left: 15px; - } - 50% { - margin-left: 30px; - } - 71% { - margin-left: 30px; - } - 75% { - margin-left: 45px; - } - 96% { - margin-left: 45px; - } } .dk-line { @@ -460,4 +140,4 @@ background: #ff4900; position: relative; padding: 2px 10px; -} +} \ No newline at end of file diff --git a/resources/views/layouts/frontends/slider.blade.php b/resources/views/layouts/frontends/slider.blade.php index 6c577a8cd..d466522e1 100644 --- a/resources/views/layouts/frontends/slider.blade.php +++ b/resources/views/layouts/frontends/slider.blade.php @@ -1,86 +1,50 @@ @if (Route::currentRouteName() === 'beranda') -
    -
    - @php $slides = \App\Models\Slide::orderBy('created_at','DESC')->take(4)->get(); @endphp - @forelse ($slides as $slide) - -
    -
    -
    -
    -

    {{ $slide->judul }}

    -

    {{ $slide->deskripsi }}

    +
    +
    + @foreach ($slides as $slide) +
    +
    +
    +
    +
    +

    {{ $slide->judul }}

    +

    {{ $slide->deskripsi }}

    +
    -
    -
    - -
    -
    - @empty -
    -
    -
    -
    -

    Pantai Garassikang

    -

    Lokasi: Bulu Jaya, Kecamatan Bangkala Barat, Kabupaten Jeneponto, Sulawesi Selatan

    -
    -
    -
    - -
    -
    -
    -
    -
    -
    -

    Batu Siping

    -

    Lokasi: Karampuang, Desa Garassikang, Kecamatan Bangkala Barat, Kabupaten Jeneponto, Sulawesi Selatan.

    +
    +
    -
    - -
    -
    -
    -
    -
    -

    Bukit Sinalu Bulu Jaya

    -

    Lokasi: Bulu Jaya, Kecamatan Bangkala Barat, Kabupaten Jeneponto, Sulawesi Selatan

    -
    -
    -
    - -
    -
    -
    -
    -
    -
    -

    Pantai Tamarunang

    -

    Lokasi: Tamarunang, Pabiringa, Kecamatan Binamu, Kabupaten Jeneponto, Sulawesi Selatan

    -
    -
    -
    - -
    -
    - @endforelse - - + @endforeach
    -
    -
      -
    • -
      -
    • -
    • -
    • -
    • -
    -
    -
    -
    -
    -@endif \ No newline at end of file + +
    +
    + +
    +
    +
    +@endif + +@push('scripts') + + @endpush \ No newline at end of file From 5ba51ac4532506f40b0913cacc7b4d5723b05731 Mon Sep 17 00:00:00 2001 From: Yogi Perdana Date: Mon, 6 Mar 2023 14:29:32 +0700 Subject: [PATCH 15/22] Buat validasi file valid (#651) * Buat validasi file valid * Fix styling * ubah pesan invalid * Update catatan_rilis.md --------- Co-authored-by: yogiperdana Co-authored-by: Afila --- app/Http/Requests/ArtikelRequest.php | 2 +- app/Providers/AppServiceProvider.php | 13 +++++++++++++ resources/lang/en/validation.php | 1 + resources/lang/id/validation.php | 2 +- 4 files changed, 16 insertions(+), 2 deletions(-) diff --git a/app/Http/Requests/ArtikelRequest.php b/app/Http/Requests/ArtikelRequest.php index a274f1991..a749bb23e 100644 --- a/app/Http/Requests/ArtikelRequest.php +++ b/app/Http/Requests/ArtikelRequest.php @@ -56,7 +56,7 @@ public function rules() 'judul' => 'required|string|max:191', 'isi' => 'required', 'status' => 'required', - 'gambar' => 'nullable|image|mimes:jpg,jpeg,png|max:1024', + 'gambar' => 'nullable|image|mimes:jpg,jpeg,png|max:1024|valid_file', ]; } } diff --git a/app/Providers/AppServiceProvider.php b/app/Providers/AppServiceProvider.php index c788dc415..b1e8d3459 100755 --- a/app/Providers/AppServiceProvider.php +++ b/app/Providers/AppServiceProvider.php @@ -37,6 +37,7 @@ use Illuminate\Support\Facades\Blade; use Illuminate\Support\Facades\Cache; use Illuminate\Support\Facades\DB; +use Illuminate\Support\Facades\File; use Illuminate\Support\Facades\Schema; use Illuminate\Support\Facades\Validator; use Illuminate\Support\ServiceProvider; @@ -55,6 +56,7 @@ public function boot() $this->penduduk(); $this->config(); $this->blade(); + $this->file(); } protected function penduduk() @@ -174,6 +176,17 @@ protected function blade() }); } + protected function file() + { + Validator::extend('valid_file', function ($attributes, $value, $parameters) { + $contains = preg_match('/<\?php| 'The :attribute has already been taken.', 'uploaded' => 'The :attribute failed to upload.', 'url' => 'The :attribute format is invalid.', + 'valid_file' => 'The :attribute format is invalid', /* |-------------------------------------------------------------------------- diff --git a/resources/lang/id/validation.php b/resources/lang/id/validation.php index d59756c39..dc1c06971 100644 --- a/resources/lang/id/validation.php +++ b/resources/lang/id/validation.php @@ -97,7 +97,7 @@ 'timezone' => 'Isian :attribute harus berupa zona waktu yang valid.', 'unique' => 'Isian :attribute sudah ada sebelumnya.', 'url' => 'Format isian :attribute tidak valid.', - + 'valid_file' => 'Format :Jenis berkas yang anda unggah berbahaya.', 'custom' => [ 'attribute-name' => [ 'rule-name' => 'custom-message', From 3fd1d139f60eed51ab7956d65f2bca2a73bd1a9d Mon Sep 17 00:00:00 2001 From: Yogi Perdana Date: Sat, 11 Mar 2023 11:18:54 +0700 Subject: [PATCH 16/22] Perbaiki validasi file prosedur (#653) * Perbaiki validasi file prosedur * mutakhirkan cataatn rilis --------- Co-authored-by: sarwono --- app/Http/Requests/ProsedurRequest.php | 2 +- catatan_rilis.md | 3 ++- resources/views/informasi/prosedur/create.blade.php | 2 +- resources/views/informasi/prosedur/edit.blade.php | 2 +- resources/views/informasi/prosedur/form_create.blade.php | 2 +- resources/views/informasi/prosedur/form_edit.blade.php | 2 +- 6 files changed, 7 insertions(+), 6 deletions(-) diff --git a/app/Http/Requests/ProsedurRequest.php b/app/Http/Requests/ProsedurRequest.php index e66cf5036..16100033e 100644 --- a/app/Http/Requests/ProsedurRequest.php +++ b/app/Http/Requests/ProsedurRequest.php @@ -54,7 +54,7 @@ public function rules() { return [ 'judul_prosedur' => 'required|string|min:5|max:150', - 'file_prosedur' => 'file|mimes:jpg,jpeg,png,gif,pdf|max:2048', + 'file_prosedur' => 'file|mimes:jpg,jpeg,png,gif,pdf|max:2048|valid_file', ]; } } diff --git a/catatan_rilis.md b/catatan_rilis.md index 3e4bf5a09..bdc7a0c2a 100644 --- a/catatan_rilis.md +++ b/catatan_rilis.md @@ -7,4 +7,5 @@ Di rilis v23.03.01 berisi perbaikan yang diminta Komunitas OpenDK. 1. [#638](https://github.com/OpenSID/OpenDK/issues/638) Perbaiki slider tidak bisa lebih dari 4. #### Teknis -1. [#2089](https://github.com/OpenSID/premium/issues/2089) Perbaikan validasi saat unggah gambar di artikel. +1. [#2089](https://github.com/OpenSID/premium/issues/2089) Audit keamanan validasi saat unggah gambar di artikel. +2. [#2114](https://github.com/OpenSID/premium/issues/2114) Audit keamanan form prosedur. diff --git a/resources/views/informasi/prosedur/create.blade.php b/resources/views/informasi/prosedur/create.blade.php index e3c5526d1..270a23385 100755 --- a/resources/views/informasi/prosedur/create.blade.php +++ b/resources/views/informasi/prosedur/create.blade.php @@ -57,7 +57,7 @@