@extends('admin.layout') @section('title', 'Detail Pengajuan') @section('content')

Informasi Pengajuan

{{ $complaint->title }}
@php $categoryBadge = [ 'cuti' => ['bg' => '#dbeafe', 'text' => '#1e40af', 'icon' => '🏖️'], 'sakit' => ['bg' => '#fee2e2', 'text' => '#991b1b', 'icon' => '🤒'], 'izin' => ['bg' => '#fef3c7', 'text' => '#92400e', 'icon' => '📝'], 'lainnya' => ['bg' => '#f3f4f6', 'text' => '#374151', 'icon' => '💬'], ]; $badge = $categoryBadge[$complaint->category] ?? $categoryBadge['lainnya']; @endphp {{ $badge['icon'] }} {{ ucfirst($complaint->category) }}
{{ $complaint->description }}
@if($complaint->notes)
{{ $complaint->notes }}
@endif @if($complaint->attachment)
@php $extension = pathinfo($complaint->attachment, PATHINFO_EXTENSION); $fileName = basename($complaint->attachment); $isImage = in_array(strtolower($extension), ['jpg', 'jpeg', 'png', 'gif']); @endphp @if($isImage)
Lampiran
@endif
{{ $fileName }}
{{ strtoupper($extension) }} • {{ number_format(Storage::size('public/' . $complaint->attachment) / 1024, 1) }} KB
📂 Lihat File
@endif
{{ $complaint->created_at->format('d F Y, H:i') }}
@if($complaint->response)
{{ $complaint->response }}
@if($complaint->responder) Oleh: {{ $complaint->responder->name }} • {{ $complaint->responded_at->format('d F Y, H:i') }} @endif
@endif

Status

@if($complaint->status == 'pending')
⏳ Menunggu Persetujuan
@elseif($complaint->status == 'approved')
✅ Disetujui
@else
❌ Ditolak
@endif

Informasi Karyawan

Nama
{{ $complaint->user->name }}
Email
{{ $complaint->user->email }}
@if($complaint->user->phone)
Telepon
{{ $complaint->user->phone }}
@endif
@if($complaint->status == 'pending')

Tindakan

@csrf
@csrf
@endif
@endsection