@extends('layouts.app') @section('title', 'Arsip Surat') @section('content')
{{-- HEADER --}}

Arsip Surat

Riwayat surat berdasarkan tahun, tipe, dan departemen

{{-- NOTIFIKASI --}} @if(session('success'))
{{ session('success') }}
@endif @if(session('error'))
{{ session('error') }}
@endif {{-- FILTER --}}

Filter Arsip

{{-- Tahun --}}
{{-- Tipe --}}
{{-- Division (hanya jika internal) --}} @if(($type ?? 'all') === 'internal' && auth()->user()->isAdminHR())
@endif
{{-- Search --}}
@if(!empty($search)) Reset @endif
{{-- Info bar --}}

Menampilkan {{ $suratList->total() }} arsip tahun {{ $year ?? now()->year }} @if(($type ?? 'all') !== 'all') — Tipe: {{ $type }} @endif @if(($type ?? 'all') === 'internal' && ($division ?? 'all') !== 'all') — Dept: {{ $division }} @endif @if(!empty($search)) — Cari: "{{ $search }}" @endif

Export CSV
{{-- TABEL --}}

Arsip Surat Tahun {{ $year ?? now()->year }}

Total: {{ $suratList->total() }} surat

@if(auth()->user()->isAdminHR()) @endif @forelse($suratList as $i => $surat) @if(auth()->user()->isAdminHR()) @endif @empty @endforelse
No Nomor Surat Pembuat Tipe Keterangan Divisi PDF TanggalAksi
{{ $suratList->firstItem() + $i }} {{ $surat->nomor_surat }} {{ $surat->pembuat_surat ?? '-' }} @php $badge = ['internal' => 'bg-blue-100 text-blue-700', 'eksternal' => 'bg-purple-100 text-purple-700', 'sket-kerja' => 'bg-orange-100 text-orange-700'][$surat->type] ?? 'bg-gray-100 text-gray-600'; @endphp {{ ucfirst($surat->type) }} {{ $surat->keterangan }} {{ $surat->division ?? '-' }} @if($surat->pdf_url)
Lihat
@csrf @method('DELETE')
@else @endif
{{ $surat->created_at?->format('d M Y H:i') }}
@csrf @method('DELETE')
Tidak ada arsip surat ditemukan
@if($suratList->hasPages())
{{ $suratList->withQueryString()->links() }}
@endif
{{-- Modal Upload PDF --}} @endsection