Compare commits
11 Commits
2cfc54f567
...
fd1100558d
| Author | SHA1 | Date |
|---|---|---|
|
|
fd1100558d | |
|
|
1e7100d806 | |
|
|
bafacc38c2 | |
|
|
0c1150e1a4 | |
|
|
1798868133 | |
|
|
782b51fbb3 | |
|
|
48f525e8fc | |
|
|
652b6c9f76 | |
|
|
252fd5a124 | |
|
|
7ff379e4db | |
|
|
a20e8fd844 |
|
|
@ -31,13 +31,11 @@ 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'));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -54,5 +52,4 @@ public function hero()
|
||||||
|
|
||||||
return view('user.index', compact('beritaHero'));
|
return view('user.index', compact('beritaHero'));
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -10,10 +10,8 @@
|
||||||
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();
|
||||||
|
|
@ -32,7 +30,6 @@ 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),
|
||||||
|
|
@ -40,10 +37,8 @@ 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();
|
||||||
|
|
||||||
|
|
@ -66,5 +61,5 @@ public function index()
|
||||||
'rekap',
|
'rekap',
|
||||||
'tahun'
|
'tahun'
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -19,22 +19,18 @@ 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'],
|
'username' => ['required', 'string', 'regex:/^[a-z]+$/'],
|
||||||
'password' => ['required', 'string', 'min:8'],
|
'password' => ['required', 'string', 'min:8'],
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
@ -39,10 +39,11 @@ 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 6 karakter.',
|
'password.min' => 'Password minimal 8 karakter.',
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -54,7 +55,10 @@ public function authenticate(): void
|
||||||
// Cek limit login (anti brute force)
|
// Cek limit login (anti brute force)
|
||||||
$this->ensureIsNotRateLimited();
|
$this->ensureIsNotRateLimited();
|
||||||
|
|
||||||
// Jika dua-duanya kosong (optional tambahan biar lebih jelas)
|
// Ambil username dalam bentuk huruf kecil (biar konsisten)
|
||||||
|
$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.',
|
||||||
|
|
@ -62,7 +66,7 @@ public function authenticate(): void
|
||||||
}
|
}
|
||||||
|
|
||||||
// Cek apakah username ada
|
// Cek apakah username ada
|
||||||
$user = User::where('username', $this->username)->first();
|
$user = User::where('username', $username)->first();
|
||||||
if (!$user) {
|
if (!$user) {
|
||||||
throw ValidationException::withMessages([
|
throw ValidationException::withMessages([
|
||||||
'username' => 'Username tidak terdaftar.',
|
'username' => 'Username tidak terdaftar.',
|
||||||
|
|
@ -71,7 +75,7 @@ public function authenticate(): void
|
||||||
|
|
||||||
// Cek password
|
// Cek password
|
||||||
if (!Auth::attempt([
|
if (!Auth::attempt([
|
||||||
'username' => $this->username,
|
'username' => $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,4 +92,3 @@ class="form-control file-upload-info"
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@endsection
|
@endsection
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -79,16 +79,20 @@ 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>
|
</div><br>
|
||||||
|
|
||||||
{{-- STATUS --}}
|
{{-- STATUS --}}
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
|
|
@ -113,7 +117,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.623 atau 7°35'17.25"S">
|
placeholder="Contoh: 7°35'17.25"S">
|
||||||
|
|
||||||
@error('latitude')
|
@error('latitude')
|
||||||
<small class="text-danger">{{ $message }}</small>
|
<small class="text-danger">{{ $message }}</small>
|
||||||
|
|
@ -127,7 +131,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.980 atau 111°55'0.97"E">
|
placeholder="Contoh: 111°55'0.97"E">
|
||||||
|
|
||||||
@error('longitude')
|
@error('longitude')
|
||||||
<small class="text-danger">{{ $message }}</small>
|
<small class="text-danger">{{ $message }}</small>
|
||||||
|
|
|
||||||
|
|
@ -93,9 +93,14 @@ 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,12 +33,6 @@
|
||||||
<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,8 +11,7 @@
|
||||||
<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><a href="{{ route('user.berita') }}">Berita</a></li>
|
<li class="current"><a href="{{ route('user.berita') }}">Berita</a></li>
|
||||||
<li class="current">Detail Berita</li>
|
|
||||||
</ol>
|
</ol>
|
||||||
</nav>
|
</nav>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -10,8 +10,7 @@
|
||||||
<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><a href="{{ route('user.pengumuman') }}">Pengumuman</a></li>
|
<li class="current"><a href="{{ route('user.pengumuman') }}">Pengumuman</a></li>
|
||||||
<li class="current">Detail Pengumuman</li>
|
|
||||||
</ol>
|
</ol>
|
||||||
</nav>
|
</nav>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -26,7 +26,6 @@ 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>
|
||||||
|
|
@ -66,7 +65,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 ?? '-' }}
|
{{ $tps->kapasitas_tps ?? '-' }} ton/hari
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -350,8 +350,6 @@ 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'
|
||||||
});
|
});
|
||||||
|
|
@ -489,96 +487,6 @@ 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 => {
|
||||||
|
|
@ -598,6 +506,5 @@ className: 'user-location'
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
</section>
|
</section>
|
||||||
@endsection
|
@endsection
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue