Website-E-Bendungan/resources/views/Pengajuan Surat/SK Kematian.blade.php

176 lines
8.4 KiB
PHP

<!DOCTYPE html>
<html lang="id">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>SK Kematian</title>
<link href="https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;600&display=swap" rel="stylesheet">
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined">
<link href="{{ asset('/assets/css/style.css') }}" rel="stylesheet">
</head>
<body>
<div class="sidebar">
<img src="{{ asset('/assets/img/Frame 1171276898.png') }}" alt="" width="100%">
<nav>
<ul>
<li>
<a href="{{ url('/Dashboard') }}">
<span class="material-symbols-outlined">dashboard</span>
Dashboard
</a>
</li>
<li>
<a href="{{ url('/SKPembelianSolar') }}" class="active">
<span class="material-symbols-outlined">draft</span>
Pengajuan Surat
</a>
</li>
<li>
<a href="{{ url('/Berita') }}">
<span class="material-symbols-outlined">newspaper</span>
Berita
</a>
</li>
<li>
<a href="{{ url('/Aspirasi') }}">
<span class="material-symbols-outlined">folder_copy</span>
Aspirasi & Keluhan
</a>
</li>
</ul>
</nav>
<form action="{{ route('logout') }}" method="POST" style="display: inline;" id="logout-form">
@csrf
<button type="submit" class="logout-btn" id="logout-btn">
<span class="material-symbols-outlined">logout</span>Logout
</button>
</form>
</div>
<div class="content">
<div class="header">
<div class="content-header">
<img src="{{ asset('/assets/img/chevrons-right.svg') }}" alt="">
<span>{{ now()->translatedFormat('d F Y') }}</span>
</div>
<span>{{ Auth::user()->name }}</span>
</div>
<div class="content-table">
<div class="tab-menu">
<a href="{{ url('/SKPembelianSolar') }}">SK Pembelian Solar
<span class="notif">{{ $countDiproses['izin_pembelian_solar'] }}</span>
</a>
<a href="{{ url('/SKCatatanKepolisian') }}">SK Catatan Kepolisian
<span class="notif">{{ $countDiproses['skck'] }}</span>
</a>
<a href="{{ url('SKKehilangan') }}">SK Kehilangan
<span class="notif">{{ $countDiproses['keterangan_kehilangan'] }}</span>
</a>
<a href="{{ url('/SKIzinUsaha') }}">SK Izin Usaha
<span class="notif">{{ $countDiproses['izin_usaha'] }}</span>
</a>
<a href="{{ url('/SKKematian') }}" class="active">SK Kematian
<span class="notif">{{ $countDiproses['keterangan_kematian'] }}</span>
</a>
</div>
<form id="filter-form" method="GET" action="{{ url('/SKKematian') }}">
<div class="table-filter">
<div class="search-container">
<input type="text" name="search" placeholder="Cari nama atau alamat" class="search-box" value="{{ request('search') }}" id="search-box">
<span class="material-symbols-outlined">search</span>
</div>
<div class="filter-date">
<input type="date" name="date" id="date-filter" value="{{ request('date') }}">
</div>
<div class="filter-status">
<select name="status" id="status-filter">
<option value="" disabled selected>Status</option>
<option value="Diproses" {{ request('status') == 'Diproses' ? 'selected' : '' }}>Diproses</option>
<option value="Ditolak" {{ request('status') == 'Ditolak' ? 'selected' : '' }}>Ditolak</option>
<option value="Selesai" {{ request('status') == 'Selesai' ? 'selected' : '' }}>Selesai</option>
</select>
<span class="material-symbols-outlined">keyboard_arrow_down</span>
</div>
</div>
</form>
<div class="table-container">
<table>
<thead>
<tr>
<th>Nama</th>
<th>Status</th>
<th>Tanggal Pengajuan</th>
<th>Tanggal Kematian</th>
<th>Jenis Kelamin</th>
<th>Alamat Terakhir</th>
<th>Aksi</th>
</tr>
</thead>
<tbody>
@foreach($tabel_skkematian as $item)
<tr>
<td>{{ $item->nama }}</td>
<td>
@if($item->status == 'Diproses')
<span class="status status-processing">Diproses</span>
@elseif($item->status == 'Selesai')
<span class="status status-done">Selesai</span>
@else
<span class="status status-rejected">Ditolak</span>
@endif
</td>
<td>{{ \Carbon\Carbon::parse($item->created_at)->translatedFormat('d F Y') }}</td>
<td>{{ $item->hari }}, {{ \Carbon\Carbon::parse($item->tanggal_kematian)->format('d-m-Y') }}</td>
<td>{{ $item->jenis_kelamin }}</td>
<td class="alamat">{{ $item->alamat_terakhir }}</td>
<td>
@if($item->status == 'Diproses')
<a href="{{ route('SKKematian.edit', ['id' => $item->id]) }}" class="edit-btn"><span class="material-symbols-outlined">edit_square</span></a>
@elseif($item->status == 'Selesai')
<a href="{{ route('SKKematian.detail', ['id' => $item->id]) }}" class="edit-btn"><span class="material-symbols-outlined">more_horiz</span></a>
@else
<a class="detail-ditolak"><span class="material-symbols-outlined">more_horiz</span></a>
@endif
</td>
</tr>
@endforeach
</tbody>
</table>
{{ $tabel_skkematian->appends(request()->query())->links('vendor.pagination.bootstrap-4') }}
</div>
</div>
</div>
<script src="{{ asset('/assets/js/script-tabel.js') }}"></script>
<script src="https://cdn.jsdelivr.net/npm/sweetalert2@11"></script>
<script>
document.getElementById('logout-btn').addEventListener('click', function(event) {
event.preventDefault();
Swal.fire({
title: 'Yakin ingin logout?',
text: 'Anda akan keluar dari sistem.',
icon: 'warning',
showCancelButton: true,
confirmButtonColor: '#e53935',
cancelButtonColor: '#6c757d',
confirmButtonText: 'Ya, logout',
cancelButtonText: 'Batal',
reverseButtons: true,
customClass: {
title: 'swal-custom-title',
htmlContainer: 'swal-custom-text',
confirmButton: 'swal-custom-button',
cancelButton: 'swal-custom-button'
}
}).then((result) => {
if (result.isConfirmed) {
document.getElementById('logout-form').submit();
}
});
});
</script>
</body>
</html>
@if(session('manage_success'))
@include('partials.SKKematian-success-popup')
@endif