@extends('admin.layout') @section('title', 'Kelola Keluhan') @section('content')
| Tanggal | Karyawan | Kategori | Judul | Prioritas | Status | Aksi |
|---|---|---|---|---|---|---|
| {{ $complaint->created_at->format('d/m/Y H:i') }} |
{{ $complaint->user->name }} {{ $complaint->user->email }} |
@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) }} | {{ Str::limit($complaint->title, 40) }} | @php $priorityBadge = [ 'low' => ['bg' => '#d1fae5', 'text' => '#065f46', 'label' => 'Rendah'], 'medium' => ['bg' => '#fef3c7', 'text' => '#92400e', 'label' => 'Sedang'], 'normal' => ['bg' => '#fef3c7', 'text' => '#92400e', 'label' => 'Normal'], 'high' => ['bg' => '#fee2e2', 'text' => '#991b1b', 'label' => 'Tinggi'], ]; $priority = $priorityBadge[$complaint->priority] ?? $priorityBadge['medium']; @endphp {{ $priority['label'] }} | @if($complaint->status == 'pending') ⏳ Pending @elseif($complaint->status == 'approved') ✅ Disetujui @else ❌ Ditolak @endif | @if($complaint->attachment) 📎 Lihat File @else Tidak ada file @endif |