{{-- Partial: project_files_section.blade.php Reusable file attachment section for 3 levels: - Level modul: pass $modul (string) - Level baris RAB / transaksi: pass $fileableType + $fileableId Required vars: $project, $files (Collection of ProjectFile) --}} @php $sectionTitle = $sectionTitle ?? 'File Lampiran'; @endphp
{{ $sectionTitle }}
{{ $files->count() }} file
{{-- Flash message upload --}} @if(session('file_success')) @endif @if(session('file_error')) @endif {{-- Form Upload --}}
@csrf @isset($modul) @endisset @isset($fileableType) @endisset
@error('file')
{{ $message }}
@enderror
{{-- Daftar File --}} @if($files->isEmpty())

Belum ada file yang dilampirkan.

@else
@foreach($files as $f) @endforeach
Nama File Ukuran Upload Oleh Tanggal Aksi
{{ $f->nama_asli }}
{{ strtoupper(pathinfo($f->nama_asli, PATHINFO_EXTENSION)) }}
{{ $f->ukuran_readable }} {{ $f->uploader->name ?? '-' }} {{ $f->created_at->format('d/m/Y H:i') }}
@csrf @method('DELETE')
@endif
{{-- Global Modal Preview File (Dapat dipakai di semua halaman) --}} @once @endonce