@extends('layouts.app') @section('title', 'Review Artikel - IDN Menulis') @section('styles') @endsection @section('content')

{{ Str::limit($article->title, 50) }}

@php $statusClasses = [ 'pending' => 'bg-yellow-100 text-yellow-700 border-yellow-200', 'pending_review' => 'bg-yellow-100 text-yellow-700 border-yellow-200', 'revision' => 'bg-blue-100 text-blue-700 border-blue-200', 'published' => 'bg-green-100 text-green-700 border-green-200', 'rejected' => 'bg-red-100 text-red-700 border-red-200', ]; $statusLabels = [ 'pending' => 'Menunggu Review', 'pending_review' => 'Menunggu Review', 'revision' => 'Perlu Revisi', 'published' => 'Disetujui', 'rejected' => 'Ditolak', ]; @endphp
{{ $statusLabels[$article->status] ?? $article->status }} @if(in_array($article->status, ['pending', 'pending_review', 'revision']))
@endif
@if($article->cover_image) {{ $article->title }} @endif

{{ $article->title }}

Avatar
{{ $article->user->full_name ?? 'Unknown' }} @if($article->user->class) {{ $article->user->class }} @endif
{{ $article->category->name ?? '-' }} {{ $article->created_at->format('d M Y, H:i') }}
@if($article->tags && $article->tags->count() > 0)
@foreach($article->tags as $tag) #{{ $tag->name }} @endforeach
@endif @if($article->excerpt)

{{ $article->excerpt }}

@endif
{!! $article->content !!}
@if($article->approvals && $article->approvals->count() > 0)

Riwayat Review

@foreach($article->approvals->sortByDesc('reviewed_at') as $approval)
@php $iconClass = match($approval->new_status) { 'published' => 'bg-green-100 text-green-600', 'rejected' => 'bg-red-100 text-red-600', 'revision' => 'bg-blue-100 text-blue-600', default => 'bg-gray-100 text-gray-600' }; @endphp
@if($approval->new_status === 'published') @elseif($approval->new_status === 'rejected') @elseif($approval->new_status === 'revision') @endif

{{ $approval->reviewer->full_name ?? 'System' }} @if($approval->new_status === 'published') menyetujui artikel @elseif($approval->new_status === 'rejected') menolak artikel @elseif($approval->new_status === 'revision') meminta revisi @endif

{{ $approval->reviewed_at ? $approval->reviewed_at->format('d M Y, H:i') : ($approval->created_at ? $approval->created_at->format('d M Y, H:i') : '-') }}
@if($approval->notes)

{{ $approval->notes }}

@endif
@endforeach
@endif

Informasi Penulis

Avatar

{{ $article->user->full_name ?? 'Unknown' }}

{{ $article->user->username ?? '' }}

@if($article->user->class)

Kelas: {{ $article->user->class }}

@endif

{{ $article->user->articles()->count() }}

Total Artikel

{{ $article->user->articles()->where('status', 'published')->count() }}

Disetujui

Statistik Artikel

Views {{ number_format($article->views_count ?? 0) }}
Likes {{ number_format($article->likes_count ?? 0) }}
Komentar {{ number_format($article->comments_count ?? 0) }}
Jumlah Kata {{ number_format(str_word_count(strip_tags($article->content))) }}
@if(in_array($article->status, ['pending', 'pending_review', 'revision']))

Aksi Cepat

@endif
@endsection @section('scripts') @endsection