{{-- Flash Messages --}} @if(session('success'))
{{ session('success') }}
@endif {{-- Header --}}
New Post
{{-- Tabs --}}
@foreach(['all' => 'All', 'drafts' => 'Drafts', 'scheduled' => 'Scheduled', 'needs_review' => 'Needs Review', 'published' => 'Published', 'failed' => 'Failed'] as $tab => $label) @php $count = $this->tabCounts[$tab] ?? 0; @endphp @endforeach
{{-- Posts Table --}}
@if($this->posts->isEmpty())

No posts found

Create your first post
@else @foreach($this->posts as $post) {{-- Caption --}} {{-- Platform --}} {{-- Status Badge --}} {{-- Scheduled At --}} {{-- Actions --}} @endforeach
Post Platform Status Scheduled Actions

{{ Str::limit($post->content->caption ?? 'No caption', 60) }}

@if($post->error_message)

{{ $post->error_message }}

@endif
{{ $post->socialAccount?->platform_label ?? '—' }}

{{ $post->socialAccount?->name ?? '' }}

@php $badge = match($post->status) { \App\Enums\PostStatus::DRAFT => 'bg-gray-100 text-gray-600', \App\Enums\PostStatus::SCHEDULED => 'bg-blue-100 text-blue-600', \App\Enums\PostStatus::PUBLISHING => 'bg-yellow-100 text-yellow-700', \App\Enums\PostStatus::PUBLISHED => 'bg-green-100 text-green-700', \App\Enums\PostStatus::FAILED => 'bg-red-100 text-red-600', \App\Enums\PostStatus::NEEDS_REVIEW => 'bg-amber-100 text-amber-700', default => 'bg-gray-100 text-gray-600', }; @endphp {{ ucfirst(str_replace('_', ' ', $post->status->value)) }} {{ $post->scheduled_at?->format('M d, Y g:i A') ?? '—' }}
{{-- Needs Review actions --}} @if($post->status === \App\Enums\PostStatus::NEEDS_REVIEW)
@csrf
@endif {{-- Retry failed --}} @if($post->status === \App\Enums\PostStatus::FAILED)
@csrf
@endif {{-- Edit --}} @if(in_array($post->status, [\App\Enums\PostStatus::DRAFT, \App\Enums\PostStatus::SCHEDULED, \App\Enums\PostStatus::NEEDS_REVIEW])) Edit @endif {{-- Duplicate --}}
@csrf
{{-- Delete --}} @if($confirmDelete === $post->id)
@else @endif
{{-- Pagination --}} @if($this->posts->hasPages())
{{ $this->posts->links() }}
@endif @endif