@extends('admin.layouts.main') @section('title', 'Dashboard') @push('styles') @endpush @section('content') {{-- ===== STAT CARDS ===== --}}
@php $stats = [ ['icon'=>'fas fa-briefcase','bg'=>'#dbeafe','color'=>'#2563eb','num'=>$totalJobs,'label'=>'Total Lowongan','sub'=>$activeJobs.' aktif','sub_class'=>'up','sub_icon'=>'fas fa-check-circle'], ['icon'=>'fas fa-book-open','bg'=>'#dcfce7','color'=>'#16a34a','num'=>$totalPrograms,'label'=>'Program Pelatihan','sub'=>\App\Models\TrainingProgram::where('is_active',true)->count().' aktif','sub_class'=>'up','sub_icon'=>'fas fa-check-circle'], ['icon'=>'fas fa-newspaper','bg'=>'#fffbeb','color'=>'#d97706','num'=>$totalBlogArticles,'label'=>'Artikel Blog','sub'=>\App\Models\BlogArticle::where('is_published',false)->count().' draft','sub_class'=>'warn','sub_icon'=>'fas fa-clock'], ['icon'=>'fas fa-star','bg'=>'#f5f3ff','color'=>'#7c3aed','num'=>$totalTestimonials,'label'=>'Testimoni','sub'=>\App\Models\Testimonial::where('is_approved',true)->count().' disetujui','sub_class'=>'up','sub_icon'=>'fas fa-check-circle'], ['icon'=>'fas fa-images','bg'=>'#fef2f2','color'=>'#dc2626','num'=>$totalSliders,'label'=>'Slider / Banner','sub'=>\App\Models\Slider::where('is_active',true)->count().' aktif','sub_class'=>'up','sub_icon'=>'fas fa-check-circle'], ['icon'=>'fas fa-exclamation-triangle','bg'=>'#fef3c7','color'=>'#d97706','num'=>$expiringJobs,'label'=>'Lowongan Expiring','sub'=>'Deadline ≀ 7 hari','sub_class'=>'warn','sub_icon'=>'fas fa-clock'], ]; @endphp @foreach($stats as $s)
{{ $s['num'] }}
{{ $s['label'] }}
{{ $s['sub'] }}
@endforeach
{{-- ===== QUICK ACTIONS ===== --}}
{{-- ===== JOBS BY COUNTRY ===== --}}
Lowongan per Negara
Lihat Semua
@php $flags = ['Malaysia'=>'πŸ‡²πŸ‡Ύ','Singapore'=>'πŸ‡ΈπŸ‡¬','Taiwan'=>'πŸ‡ΉπŸ‡Ό','Hong Kong'=>'πŸ‡­πŸ‡°','Jepang'=>'πŸ‡―πŸ‡΅']; $maxCount = $jobsByCountry->max() ?: 1; @endphp @foreach($jobsByCountry as $country => $count)
{{ $flags[$country] ?? '🌐' }} {{ $country }}
{{ $count }}
@endforeach @if($jobsByCountry->isEmpty())

Belum ada data

@endif
{{-- ===== RECENT JOBS ===== --}}
Lowongan Terbaru
Semua
@foreach($recentJobs as $job)
@if($job->country_code=='MY')πŸ‡²πŸ‡Ύ@elseif($job->country_code=='SG')πŸ‡ΈπŸ‡¬@elseif($job->country_code=='TW')πŸ‡ΉπŸ‡Ό@elseif($job->country_code=='HK')πŸ‡­πŸ‡°@elseif($job->country_code=='JP')πŸ‡―πŸ‡΅@else🌐@endif
{{ $job->title }}
{{ $job->company_name }}
{{ $job->is_active ? 'Aktif' : 'Nonaktif' }}
@endforeach @if($recentJobs->isEmpty())

Belum ada lowongan

@endif
{{-- ===== RECENT BLOG ===== --}}
Artikel Blog Terbaru
@forelse($recentBlogs as $article) @empty @endforelse
Judul Artikel Penulis Status Tanggal Aksi
{{ Str::limit($article->title, 55) }}
{{ $article->author ?? 'Admin' }} @if($article->is_published) Published @else Draft @endif {{ $article->created_at->format('d M Y') }}
@csrf @method('DELETE')
Belum ada artikel
@endsection