{{-- resources/views/admin/system/announcements/index.blade.php --}} @extends('admin.layouts.app') @section('title', 'System Announcements') @section('page_title', 'System Announcements') @section('breadcrumb', 'Manage platform-wide announcements and notifications') @section('content') {{-- Header with CTA --}}
Announcements

Send notifications and announcements to all or specific properties

New Announcement
{{-- Announcements Table --}}
Active & Scheduled Announcements {{ $announcements->total() }} total
@if($announcements->isEmpty())

No announcements

Create an announcement to notify properties

Create Announcement
@else
@foreach($announcements as $announcement) @php // Determine if announcement is currently active $now = now(); $isActive = (!$announcement->starts_at || $announcement->starts_at <= $now) && (!$announcement->ends_at || $announcement->ends_at >= $now); @endphp @endforeach
Title Type Active Dismissible Targets Schedule
{{ $announcement->title }}
{{ Str::limit($announcement->body, 60, '…') }}
@php $typeConfig = [ 'info' => ['icon' => 'ℹ️', 'bg' => '#dbeafe', 'text' => '#1e40af'], 'warning' => ['icon' => '⚠️', 'bg' => '#fef3c7', 'text' => '#92400e'], 'success' => ['icon' => '✓', 'bg' => '#d1fae5', 'text' => '#065f46'], 'maintenance' => ['icon' => '🔧', 'bg' => '#f3e8ff', 'text' => '#6b21a8'], ]; $config = $typeConfig[$announcement->type] ?? $typeConfig['info']; @endphp {{ $config['icon'] }} {{ ucfirst($announcement->type) }} @if($isActive) Active @else Inactive @endif @if($announcement->is_dismissible) @else @endif @php $targets = []; if ($announcement->target_plan_slugs) { $targets[] = count((array)$announcement->target_plan_slugs) . ' plans'; } if ($announcement->target_countries) { $targets[] = count((array)$announcement->target_countries) . ' countries'; } @endphp @if(!empty($targets)) {{ implode(', ', $targets) }} @else All @endif @if($announcement->starts_at || $announcement->ends_at) @if($announcement->starts_at) {{ $announcement->starts_at->format('d M Y') }} @else Now @endif @if($announcement->ends_at) → {{ $announcement->ends_at->format('d M Y') }} @else → ∞ @endif @else @endif
@csrf @method('DELETE')
{{-- Pagination --}} @if($announcements->hasPages())
{{ $announcements->links() }}
@endif @endif
{{-- Announcement Types Legend --}}
Announcement Types
ℹ️ Info General informational messages (features, updates, tips)
⚠️ Warning Important notices and alerts (deprecations, issues)
✓ Success Positive updates and celebrations (milestones, upgrades)
🔧 Maintenance Service updates, downtime notices, scheduled maintenance
Targeting

You can target announcements to specific groups:

Plans: Show only to properties with specific plan (e.g., Pro, Premium)
Countries: Show only to properties in specific regions (e.g., ZW, ZA)
All: If no targets selected, shown to all properties

Tip: Leave targets empty to reach everyone

@endsection