TIF_NGANJUK_E41220949/resources/views/admin/aduan/index.blade.php

83 lines
4.2 KiB
PHP

@extends('admin.template')
@section('content')
<div class="content-wrapper">
<div class="row">
<div class="col-lg-12 grid-margin stretch-card">
<div class="card">
<div class="card-body">
<!-- Header card -->
<div class="d-flex justify-content-between align-items-center mb-3">
<div>
<h4 class="card-title mb-0">Data Aduan</h4>
<p class="card-description mb-0">
Daftar aduan masyarakat
</p>
</div>
</div>
<!-- Tabel -->
<div class="table-responsive">
<table class="table">
<thead>
<tr>
<th>Nama Pelapor</th>
<th>Alamat</th>
<th>Tanggal Aduan</th>
<th>Status</th>
<th>Aksi</th>
</tr>
</thead>
<tbody>
@forelse ($aduan as $item)
<tr>
<td>{{ $item->nama_pelapor }}</td>
<td>{{ $item->alamat_pelapor }}</td>
<td>
{{ \Carbon\Carbon::parse($item->tanggal_aduan)->format('d M Y') }}
</td>
<td>
@if ($item->tanggapan_admin)
<label class="badge badge-success">Ditanggapi</label>
@else
<label class="badge badge-danger">Belum</label>
@endif
</td>
<td class="text-center">
<a href="{{ route('admin.aduan.show', $item->id_aduan) }}"
class="btn btn-warning btn-sm me-1"
title="Tanggapi">
<i class="bi bi-pencil-square"></i>
</a>
<form action="{{ route('admin.aduan.destroy', $item->id_aduan) }}"
method="POST"
style="display:inline"
onsubmit="return confirm('Yakin ingin menghapus aduan ini?')">
@csrf
@method('DELETE')
<button class="btn btn-danger btn-sm" title="Hapus">
<i class="bi bi-trash"></i>
</button>
</form>
</td>
</tr>
@empty
<tr>
<td colspan="5" class="text-center">
Data aduan belum tersedia
</td>
</tr>
@endforelse
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
</div>
@endsection