Compare commits
No commits in common. "fd1100558dd253185afe552169d5f8ce43807104" and "2cfc54f56755da12b71bb5a5ca344105cfc47727" have entirely different histories.
fd1100558d
...
2cfc54f567
|
|
@ -31,11 +31,13 @@ public function show($id)
|
||||||
$berita = Informasi::where('kategori_informasi', 'berita')
|
$berita = Informasi::where('kategori_informasi', 'berita')
|
||||||
->where('id_informasi', $id)
|
->where('id_informasi', $id)
|
||||||
->firstOrFail();
|
->firstOrFail();
|
||||||
|
|
||||||
$recentBerita = Informasi::where('kategori_informasi', 'berita')
|
$recentBerita = Informasi::where('kategori_informasi', 'berita')
|
||||||
->where('id_informasi', '!=', $id)
|
->where('id_informasi', '!=', $id)
|
||||||
->orderBy('tanggal_informasi', 'desc')
|
->orderBy('tanggal_informasi', 'desc')
|
||||||
->limit(5)
|
->limit(5)
|
||||||
->get();
|
->get();
|
||||||
|
|
||||||
return view('user.detail-berita', compact('berita', 'recentBerita'));
|
return view('user.detail-berita', compact('berita', 'recentBerita'));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -52,4 +54,5 @@ public function hero()
|
||||||
|
|
||||||
return view('user.index', compact('beritaHero'));
|
return view('user.index', compact('beritaHero'));
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -10,8 +10,10 @@
|
||||||
class IndexController extends Controller
|
class IndexController extends Controller
|
||||||
{
|
{
|
||||||
public function index()
|
public function index()
|
||||||
{
|
{
|
||||||
$tahun = date('Y');
|
$tahun = date('Y');
|
||||||
|
|
||||||
|
// Ambil data sampah per bulan
|
||||||
$dataSampah = Sampah::where('tahun', $tahun)
|
$dataSampah = Sampah::where('tahun', $tahun)
|
||||||
->orderBy('bulan')
|
->orderBy('bulan')
|
||||||
->get();
|
->get();
|
||||||
|
|
@ -30,6 +32,7 @@ public function index()
|
||||||
$sisa[] = $d->sisa_sampah;
|
$sisa[] = $d->sisa_sampah;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Rekap total satu tahun
|
||||||
$rekap = [
|
$rekap = [
|
||||||
'timbulan' => array_sum($timbulan),
|
'timbulan' => array_sum($timbulan),
|
||||||
'kelola' => array_sum($kelola),
|
'kelola' => array_sum($kelola),
|
||||||
|
|
@ -37,8 +40,10 @@ public function index()
|
||||||
'sisa' => array_sum($sisa),
|
'sisa' => array_sum($sisa),
|
||||||
];
|
];
|
||||||
|
|
||||||
|
// Data sampah terbaru untuk card
|
||||||
$sampah = Sampah::orderBy('tahun', 'desc')->first();
|
$sampah = Sampah::orderBy('tahun', 'desc')->first();
|
||||||
|
|
||||||
|
// Data TPS
|
||||||
$kategoriTps = KategoriTps::orderBy('id_kategori_tps')->get();
|
$kategoriTps = KategoriTps::orderBy('id_kategori_tps')->get();
|
||||||
$tps = LokasiTps::all();
|
$tps = LokasiTps::all();
|
||||||
|
|
||||||
|
|
@ -61,5 +66,5 @@ public function index()
|
||||||
'rekap',
|
'rekap',
|
||||||
'tahun'
|
'tahun'
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -19,18 +19,22 @@ public function index()
|
||||||
return view('user.pengumuman', compact('pengumuman'));
|
return view('user.pengumuman', compact('pengumuman'));
|
||||||
}
|
}
|
||||||
|
|
||||||
public function show($id)
|
|
||||||
{
|
public function show($id)
|
||||||
|
{
|
||||||
$pengumuman = Informasi::where('kategori_informasi','pengumuman')
|
$pengumuman = Informasi::where('kategori_informasi','pengumuman')
|
||||||
->where('id_informasi',$id)
|
->where('id_informasi',$id)
|
||||||
->firstOrFail();
|
->firstOrFail();
|
||||||
|
|
||||||
|
|
||||||
$recentPengumuman = Informasi::where('kategori_informasi','pengumuman')
|
$recentPengumuman = Informasi::where('kategori_informasi','pengumuman')
|
||||||
->where('id_informasi','!=',$id)
|
->where('id_informasi','!=',$id)
|
||||||
->orderBy('tanggal_informasi','desc')
|
->orderBy('tanggal_informasi','desc')
|
||||||
->limit(5)
|
->limit(5)
|
||||||
->get();
|
->get();
|
||||||
|
|
||||||
return view('user.detail-pengumuman', compact('pengumuman','recentPengumuman'));
|
return view('user.detail-pengumuman', compact('pengumuman','recentPengumuman'));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public function hero()
|
public function hero()
|
||||||
|
|
|
||||||
|
|
@ -26,7 +26,7 @@ public function authorize(): bool
|
||||||
public function rules(): array
|
public function rules(): array
|
||||||
{
|
{
|
||||||
return [
|
return [
|
||||||
'username' => ['required', 'string', 'regex:/^[a-z]+$/'],
|
'username' => ['required', 'string'],
|
||||||
'password' => ['required', 'string', 'min:8'],
|
'password' => ['required', 'string', 'min:8'],
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
@ -39,11 +39,10 @@ public function messages(): array
|
||||||
return [
|
return [
|
||||||
'username.required' => 'Username wajib diisi.',
|
'username.required' => 'Username wajib diisi.',
|
||||||
'username.string' => 'Username harus berupa teks.',
|
'username.string' => 'Username harus berupa teks.',
|
||||||
'username.regex' => 'Username hanya boleh huruf kecil (a-z) tanpa angka atau simbol.',
|
|
||||||
|
|
||||||
'password.required' => 'Password wajib diisi.',
|
'password.required' => 'Password wajib diisi.',
|
||||||
'password.string' => 'Password harus berupa teks.',
|
'password.string' => 'Password harus berupa teks.',
|
||||||
'password.min' => 'Password minimal 8 karakter.',
|
'password.min' => 'Password minimal 6 karakter.',
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -55,10 +54,7 @@ public function authenticate(): void
|
||||||
// Cek limit login (anti brute force)
|
// Cek limit login (anti brute force)
|
||||||
$this->ensureIsNotRateLimited();
|
$this->ensureIsNotRateLimited();
|
||||||
|
|
||||||
// Ambil username dalam bentuk huruf kecil (biar konsisten)
|
// Jika dua-duanya kosong (optional tambahan biar lebih jelas)
|
||||||
$username = strtolower($this->username);
|
|
||||||
|
|
||||||
// Jika dua-duanya kosong
|
|
||||||
if (!$this->username && !$this->password) {
|
if (!$this->username && !$this->password) {
|
||||||
throw ValidationException::withMessages([
|
throw ValidationException::withMessages([
|
||||||
'username' => 'Username dan password wajib diisi.',
|
'username' => 'Username dan password wajib diisi.',
|
||||||
|
|
@ -66,7 +62,7 @@ public function authenticate(): void
|
||||||
}
|
}
|
||||||
|
|
||||||
// Cek apakah username ada
|
// Cek apakah username ada
|
||||||
$user = User::where('username', $username)->first();
|
$user = User::where('username', $this->username)->first();
|
||||||
if (!$user) {
|
if (!$user) {
|
||||||
throw ValidationException::withMessages([
|
throw ValidationException::withMessages([
|
||||||
'username' => 'Username tidak terdaftar.',
|
'username' => 'Username tidak terdaftar.',
|
||||||
|
|
@ -75,7 +71,7 @@ public function authenticate(): void
|
||||||
|
|
||||||
// Cek password
|
// Cek password
|
||||||
if (!Auth::attempt([
|
if (!Auth::attempt([
|
||||||
'username' => $username,
|
'username' => $this->username,
|
||||||
'password' => $this->password,
|
'password' => $this->password,
|
||||||
])) {
|
])) {
|
||||||
RateLimiter::hit($this->throttleKey());
|
RateLimiter::hit($this->throttleKey());
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
server {
|
server {
|
||||||
listen 80;
|
listen 80;
|
||||||
server_name sig-tpsnganjuk.web.id;
|
server_name sig-tpsnganjuk.web.id
|
||||||
|
|
||||||
root /var/www/public;
|
root /var/www/public;
|
||||||
index index.php index.html;
|
index index.php index.html;
|
||||||
|
|
|
||||||
|
|
@ -92,3 +92,4 @@ class="form-control file-upload-info"
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@endsection
|
@endsection
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -79,20 +79,16 @@ class="form-control @error('tahun_pembuatan') is-invalid @enderror"
|
||||||
{{-- KAPASITAS --}}
|
{{-- KAPASITAS --}}
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label>Kapasitas</label>
|
<label>Kapasitas</label>
|
||||||
<div class="input-group">
|
|
||||||
<input type="text"
|
<input type="text"
|
||||||
name="kapasitas_tps"
|
name="kapasitas_tps"
|
||||||
class="form-control @error('kapasitas_tps') is-invalid @enderror"
|
class="form-control @error('kapasitas_tps') is-invalid @enderror"
|
||||||
value="{{ old('kapasitas_tps') }}"
|
value="{{ old('kapasitas_tps') }}"
|
||||||
placeholder="Kapasitas TPS">
|
placeholder="Kapasitas TPS">
|
||||||
<div class="input-group-append">
|
|
||||||
<span class="input-group-text">ton/hari</span>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
@error('kapasitas_tps')
|
@error('kapasitas_tps')
|
||||||
<small class="text-danger">{{ $message }}</small>
|
<small class="text-danger">{{ $message }}</small>
|
||||||
@enderror
|
@enderror
|
||||||
</div><br>
|
</div>
|
||||||
|
|
||||||
{{-- STATUS --}}
|
{{-- STATUS --}}
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
|
|
@ -117,7 +113,7 @@ class="form-control @error('status_tps') is-invalid @enderror">
|
||||||
name="latitude"
|
name="latitude"
|
||||||
class="form-control @error('latitude') is-invalid @enderror"
|
class="form-control @error('latitude') is-invalid @enderror"
|
||||||
value="{{ old('latitude') }}"
|
value="{{ old('latitude') }}"
|
||||||
placeholder="Contoh: 7°35'17.25"S">
|
placeholder="Contoh: -7.623 atau 7°35'17.25"S">
|
||||||
|
|
||||||
@error('latitude')
|
@error('latitude')
|
||||||
<small class="text-danger">{{ $message }}</small>
|
<small class="text-danger">{{ $message }}</small>
|
||||||
|
|
@ -131,7 +127,7 @@ class="form-control @error('latitude') is-invalid @enderror"
|
||||||
name="longitude"
|
name="longitude"
|
||||||
class="form-control @error('longitude') is-invalid @enderror"
|
class="form-control @error('longitude') is-invalid @enderror"
|
||||||
value="{{ old('longitude') }}"
|
value="{{ old('longitude') }}"
|
||||||
placeholder="Contoh: 111°55'0.97"E">
|
placeholder="Contoh: 111.980 atau 111°55'0.97"E">
|
||||||
|
|
||||||
@error('longitude')
|
@error('longitude')
|
||||||
<small class="text-danger">{{ $message }}</small>
|
<small class="text-danger">{{ $message }}</small>
|
||||||
|
|
|
||||||
|
|
@ -93,14 +93,9 @@ class="form-control @error('tahun_pembuatan') is-invalid @enderror"
|
||||||
|
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label>Kapasitas TPS</label>
|
<label>Kapasitas TPS</label>
|
||||||
<div class="input-group">
|
|
||||||
<input type="number" name="kapasitas_tps"
|
<input type="number" name="kapasitas_tps"
|
||||||
class="form-control @error('kapasitas_tps') is-invalid @enderror"
|
class="form-control @error('kapasitas_tps') is-invalid @enderror"
|
||||||
value="{{ old('kapasitas_tps', $tps->kapasitas_tps) }}">
|
value="{{ old('kapasitas_tps', $tps->kapasitas_tps) }}">
|
||||||
<div class="input-group-append">
|
|
||||||
<span class="input-group-text">ton/hari</span>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
@error('kapasitas_tps')
|
@error('kapasitas_tps')
|
||||||
<small class="text-danger">{{ $message }}</small>
|
<small class="text-danger">{{ $message }}</small>
|
||||||
|
|
|
||||||
|
|
@ -33,6 +33,12 @@
|
||||||
<form class="pt-3" method="POST" action="{{ route('login') }}" novalidate>
|
<form class="pt-3" method="POST" action="{{ route('login') }}" novalidate>
|
||||||
@csrf
|
@csrf
|
||||||
|
|
||||||
|
<!-- ERROR GLOBAL -->
|
||||||
|
{{-- @if ($errors->any())
|
||||||
|
<div class="alert alert-danger">
|
||||||
|
{{ $errors->first() }}
|
||||||
|
</div>
|
||||||
|
@endif --}}
|
||||||
|
|
||||||
<!-- USERNAME -->
|
<!-- USERNAME -->
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,8 @@
|
||||||
<nav class="breadcrumbs">
|
<nav class="breadcrumbs">
|
||||||
<ol>
|
<ol>
|
||||||
<li><a href="{{ route('user.index') }}">Beranda</a></li>
|
<li><a href="{{ route('user.index') }}">Beranda</a></li>
|
||||||
<li class="current"><a href="{{ route('user.berita') }}">Berita</a></li>
|
<li><a href="{{ route('user.berita') }}">Berita</a></li>
|
||||||
|
<li class="current">Detail Berita</li>
|
||||||
</ol>
|
</ol>
|
||||||
</nav>
|
</nav>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,8 @@
|
||||||
<nav class="breadcrumbs">
|
<nav class="breadcrumbs">
|
||||||
<ol>
|
<ol>
|
||||||
<li><a href="{{ route('user.index') }}">Beranda</a></li>
|
<li><a href="{{ route('user.index') }}">Beranda</a></li>
|
||||||
<li class="current"><a href="{{ route('user.pengumuman') }}">Pengumuman</a></li>
|
<li><a href="{{ route('user.pengumuman') }}">Pengumuman</a></li>
|
||||||
|
<li class="current">Detail Pengumuman</li>
|
||||||
</ol>
|
</ol>
|
||||||
</nav>
|
</nav>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -26,6 +26,7 @@ function toDMS($decimal, $type = 'lat') {
|
||||||
<nav class="breadcrumbs">
|
<nav class="breadcrumbs">
|
||||||
<ol>
|
<ol>
|
||||||
<li><a href="/">Beranda</a></li>
|
<li><a href="/">Beranda</a></li>
|
||||||
|
<li>Sebaran TPS</li>
|
||||||
<li class="current">Detail TPS</li>
|
<li class="current">Detail TPS</li>
|
||||||
</ol>
|
</ol>
|
||||||
</nav>
|
</nav>
|
||||||
|
|
@ -65,7 +66,7 @@ class="img-fluid h-100 w-100 rounded-start"
|
||||||
<div class="mb-3 col-md-6">
|
<div class="mb-3 col-md-6">
|
||||||
<small class="text-muted">Kapasitas</small>
|
<small class="text-muted">Kapasitas</small>
|
||||||
<div class="fw-semibold">
|
<div class="fw-semibold">
|
||||||
{{ $tps->kapasitas_tps ?? '-' }} ton/hari
|
{{ $tps->kapasitas_tps ?? '-' }}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -350,6 +350,8 @@ function icon(color) {
|
||||||
marker.tpsData = tps;
|
marker.tpsData = tps;
|
||||||
markers.push(marker);
|
markers.push(marker);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
/* ===== LEGEND KATEGORI (BALIK 😤) ===== */
|
||||||
var legend = L.control({
|
var legend = L.control({
|
||||||
position: 'bottomleft'
|
position: 'bottomleft'
|
||||||
});
|
});
|
||||||
|
|
@ -487,6 +489,96 @@ className: 'user-location'
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<section id="faq" class="faq section">
|
||||||
|
|
||||||
|
<div class="container-fluid">
|
||||||
|
|
||||||
|
<div class="row gy-4 justify-content-center">
|
||||||
|
|
||||||
|
<div class="order-2 col-lg-7 d-flex flex-column justify-content-center order-lg-1">
|
||||||
|
|
||||||
|
<div class="text-center content px-xl-6" data-aos="fade-up" data-aos-delay="100">
|
||||||
|
<h3><span>Pertanyaan yang Sering </span><strong>Diajukan</strong></h3>
|
||||||
|
<p>
|
||||||
|
Berikut adalah beberapa pertanyaan yang sering diajukan oleh pengguna terkait
|
||||||
|
informasi, fitur, dan layanan pada website.
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="faq-container px-xl-5" data-aos="fade-up" data-aos-delay="200">
|
||||||
|
|
||||||
|
<!-- FAQ 1 -->
|
||||||
|
<div class="faq-item faq-active">
|
||||||
|
<i class="faq-icon bi bi-question-circle"></i>
|
||||||
|
<h3>Apa tujuan utama website ini?</h3>
|
||||||
|
<div class="faq-content">
|
||||||
|
<p>
|
||||||
|
Website ini bertujuan untuk menyediakan informasi yang akurat dan mudah diakses
|
||||||
|
oleh masyarakat mengenai lokasi dan data Tempat Pembuangan Sampah (TPS). Dengan adanya
|
||||||
|
website ini, diharapkan masyarakat dapat lebih memahami kondisi
|
||||||
|
TPS serta mendukung pengelolaan lingkungan yang lebih baik.
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
<i class="faq-toggle bi bi-chevron-right"></i>
|
||||||
|
</div><!-- End Faq item-->
|
||||||
|
|
||||||
|
<!-- FAQ 2 -->
|
||||||
|
<div class="faq-item">
|
||||||
|
<i class="faq-icon bi bi-question-circle"></i>
|
||||||
|
<h3>Bagaimana cara melihat peta sebaran TPS?</h3>
|
||||||
|
<div class="faq-content">
|
||||||
|
<p>
|
||||||
|
Peta sebaran TPS dapat dilihat melalui menu Sebaran TPS yang tersedia pada halaman utama
|
||||||
|
website. Peta tersebut bersifat interaktif dan menampilkan lokasi TPS berdasarkan
|
||||||
|
wilayah. Pengguna dapat mengklik setiap penanda lokasi untuk melihat detail informasi
|
||||||
|
seperti alamat TPS dan keterangan tambahan lainnya.
|
||||||
|
</p>
|
||||||
|
{{-- <p>
|
||||||
|
|
||||||
|
</p> --}}
|
||||||
|
</div>
|
||||||
|
<i class="faq-toggle bi bi-chevron-right"></i>
|
||||||
|
</div><!-- End Faq item-->
|
||||||
|
|
||||||
|
<!-- FAQ 3 -->
|
||||||
|
<div class="faq-item">
|
||||||
|
<i class="faq-icon bi bi-question-circle"></i>
|
||||||
|
<h3>Bagaimana cara mengadukan permasalahan TPS?</h3>
|
||||||
|
<div class="faq-content">
|
||||||
|
<p>
|
||||||
|
Pengaduan permasalahan TPS dapat dilakukan melalui menu Aduan TPS yang tersedia
|
||||||
|
pada website dengan mengisi formulir yang telah disediakan. Laporan yang masuk akan
|
||||||
|
diteruskan kepada pihak terkait untuk ditindaklanjuti
|
||||||
|
guna meningkatkan kualitas pengelolaan TPS.
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
<i class="faq-toggle bi bi-chevron-right"></i>
|
||||||
|
</div><!-- End Faq item-->
|
||||||
|
|
||||||
|
<!-- FAQ 4 -->
|
||||||
|
<div class="faq-item">
|
||||||
|
<i class="faq-icon bi bi-question-circle"></i>
|
||||||
|
<h3>Apakah website ini dapat diakses melalui perangkat mobile?</h3>
|
||||||
|
<div class="faq-content">
|
||||||
|
<p>
|
||||||
|
Ya, website ini dirancang secara responsif sehingga dapat diakses melalui
|
||||||
|
berbagai perangkat, termasuk smartphone dan tablet. Tampilan website akan menyesuaikan
|
||||||
|
ukuran layar perangkat pengguna tanpa
|
||||||
|
mengurangi fungsi dan informasi yang tersedia.
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
<i class="faq-toggle bi bi-chevron-right"></i>
|
||||||
|
</div><!-- End Faq item-->
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
document.addEventListener("DOMContentLoaded", () => {
|
document.addEventListener("DOMContentLoaded", () => {
|
||||||
document.querySelectorAll(".counter").forEach(el => {
|
document.querySelectorAll(".counter").forEach(el => {
|
||||||
|
|
@ -506,5 +598,6 @@ className: 'user-location'
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
</section>
|
</section>
|
||||||
@endsection
|
@endsection
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue