Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Perbaiki slider tidak bisa lebih dari 4 #646

Merged
merged 7 commits into from
Mar 6, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 28 additions & 0 deletions app/Http/Controllers/Controller.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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,
Expand All @@ -106,6 +133,7 @@ public function __construct()
'navpotensi' => $navpotensi,
'camat' => $this->nama_camat,
'pengurus' => $pengurus->sortBy('jabatan.jenis'),
'slides' => $slides,
]);
}

Expand Down
10 changes: 4 additions & 6 deletions catatan_rilis.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Loading