@extends('dashboard.layouts.adminlayout') @section('title', 'Daftar Pengumuman') @section('content')
Tambah Pengumuman
@if(session('success')) @endif @if(session('error')) @endif @php // Tambahkan 'Status' ke dalam array heading tabel $tableHeadings = ['Nama Usaha', 'Bidang Usaha', 'Lokasi', 'Pemrakarsa', 'Tanggal', 'Status', 'Aksi']; @endphp {{-- Perubahan di sini: Gunakan x-table.data-table --}} @forelse($pengumuman as $item) {{ $item->nama_usaha }} {{ $item->bidang_usaha }} {{ $item->lokasi }} {{ $item->pemrakarsa }} {{ $item->created_at->format('d M Y') }} {{-- Kolom Status baru --}} @php $statusColorClass = $item->is_active ? 'bg-green-100 text-green-800' : 'bg-red-100 text-red-800'; @endphp {{ $item->status }}
@csrf @method('DELETE')
@empty {{-- Pesan "Tidak ada data" sekarang ditangani oleh x-table.data-table --}} @endforelse
{{-- Added pagination (if you're using it) --}} {{--
{{ $pengumuman->links() }}
--}} @endsection {{-- Tidak perlu lagi @push('scripts') di sini karena sudah di dalam komponen data-table --}}