@extends('layouts.app') @section('title', 'Announcements') @section('page-title', 'Announcements') @section('content')
@if($announcements->count()) @foreach($announcements as $announcement)

{{ $announcement->subject }}

@php $priorityClass = [ 'low' => 'badge-secondary', 'normal' => 'badge-primary', 'urgent' => 'badge-danger' ][$announcement->priority] ?? 'badge-secondary'; $priorityText = [ 'low' => 'Low Priority', 'normal' => 'Normal', 'urgent' => 'Urgent' ][$announcement->priority] ?? $announcement->priority; @endphp {{ $priorityText }} {{ ucfirst($announcement->target_type) }}

{{ Str::limit($announcement->message, 150) }}

{{ $announcement->sentBy->name ?? 'System' }}   {{ $announcement->created_at->format('d M Y H:i') }}
View
@csrf @method('DELETE')
@endforeach
{{ $announcements->links() }}
@else

No Announcements

Create your first announcement to notify hotels.

Create Announcement
@endif
@endsection