@extends('layouts.user') {{-- Menggunakan layout user --}} @section('title', $pengumuman->nama_usaha) {{-- Menetapkan judul halaman --}} @section('description', 'Pengumuman Publik - Saran, Tanggapan dan Masukan Masyarakat') {{-- Menetapkan deskripsi halaman --}} @section('breadcrumb', 'Detail Pengumuman') {{-- Sesuaikan breadcrumb jika diperlukan --}} @section('content')
{{-- Header Section --}}

{{ $pengumuman->nama_usaha }}

Kembali ke Beranda
{{-- Important Notice: Announcement Duration --}} {{-- End Important Notice --}} {{-- Image Display Section --}}
@if ($pengumuman->image) Cover Image of {{ $pengumuman->judul }} @else
Tidak ada gambar cover
@endif
{{-- End Image Display Section --}} {{-- Main Content Grid --}}
{{-- Information Section --}}
{{-- Detail Item for Judul --}}
Judul:

{{ $pengumuman->judul }}

{{-- Detail Item for Jenis Perling --}}
Jenis Perling:

{{ $pengumuman->jenis_perling }}

{{-- Detail Item for Nama Usaha --}}
Nama Usaha:

{{ $pengumuman->nama_usaha ?? 'N/A' }}

{{-- Detail Item for Bidang Usaha --}}
Bidang Usaha:

{{ $pengumuman->bidang_usaha ?? 'N/A' }}

{{-- Detail Item for Skala Besaran --}}
Skala Besaran:

{{ $pengumuman->skala_besaran ?? 'N/A' }}

{{-- Detail Item for Lokasi --}}
Lokasi:

{{ $pengumuman->lokasi ?? 'N/A' }}

{{-- Detail Item for Pemrakarsa --}}
Pemrakarsa:

{{ $pengumuman->pemrakarsa ?? 'N/A' }}

{{-- Detail Item for Penanggung Jawab --}}
Penanggung Jawab:

{{ $pengumuman->penanggung_jawab ?? 'N/A' }}

{{-- Detail Item for Dibuat Oleh --}}
Dibuat Oleh:

{{ $pengumuman->user->name ?? 'Admin' }}

{{-- Detail Item for Tanggal Publikasi --}}
Tanggal Publikasi:

{{ \Carbon\Carbon::parse($pengumuman->created_at)->translatedFormat('d F Y') }}

{{-- Description and Impact --}}

Deskripsi Usaha

{{ $pengumuman->deskripsi }}

Perkiraan Dampak Lingkungan

{{ $pengumuman->dampak }}

{{-- Lampiran Section --}}

Lampiran

@if ($pengumuman->lampiran && $pengumuman->lampiran->lampiran) @php $filePath = $pengumuman->lampiran->lampiran; $fileUrl = Storage::url($filePath); $fileName = basename($filePath); $extension = strtolower(pathinfo($fileName, PATHINFO_EXTENSION)); $isImage = in_array($extension, ['jpg', 'jpeg', 'png', 'gif', 'webp']); $iconClass = match ($extension) { 'pdf' => 'fa-file-pdf text-red-600', 'doc', 'docx' => 'fa-file-word text-blue-600', 'xls', 'xlsx' => 'fa-file-excel text-green-600', 'ppt', 'pptx' => 'fa-file-powerpoint text-orange-500', 'jpg', 'jpeg', 'png', 'gif', 'webp' => 'fa-file-image text-purple-500', 'zip', 'rar' => 'fa-file-archive text-yellow-600', 'txt' => 'fa-file-alt text-gray-600', default => 'fa-file text-gray-500', }; @endphp @if ($isImage) Lampiran Pengumuman @else Unduh Lampiran ({{ strtoupper($extension) }}) @endif @else

- Tidak ada lampiran -

@endif
{{-- Tanggapan Pengumuman Section --}}

Saran, Pendapat, dan Masukan ({{ $pengumuman->tanggapan->count() }})

@forelse($pengumuman->tanggapan as $tanggapan)

{{ $tanggapan->user->name ?? $tanggapan->nama ?? 'Anonim' }}

{{ \Carbon\Carbon::parse($tanggapan->created_at)->translatedFormat('d F Y, H:i') }} @if($tanggapan->jenis_kelamin) {{ $tanggapan->jenis_kelamin }} @endif

@if($tanggapan->nomor_hp)

{{ $tanggapan->nomor_hp }}

@endif @if($tanggapan->email)

{{ $tanggapan->email }}

@endif
{{-- Accent bar --}}

{{ $tanggapan->isi_tanggapan }}

@empty

Belum ada saran, pendapat, atau masukan untuk pengumuman ini.

@endforelse
{{-- Form untuk Menambahkan Tanggapan --}}

Tambahkan Saran, Pendapat, atau Masukan

{{-- Removed @auth directive to allow public access --}}
@csrf
{{-- Updated value to default to 'Anonim' if user is not logged in and old('nama') is empty --}} @error('nama')

{{ $message }}

@enderror
@error('nomor_hp')

{{ $message }}

@enderror
@error('email')

{{ $message }}

@enderror
@error('jenis_kelamin')

{{ $message }}

@enderror
@error('isi_tanggapan')

{{ $message }}

@enderror
{{-- reCAPTCHA Checkbox --}}
{!! NoCaptcha::display() !!} @error('g-recaptcha-response')

Harap centang "Saya bukan robot".

@enderror
@endsection @section('scripts') {!! NoCaptcha::renderJs() !!} @endsection