{{-- resources/views/workspace/announcements/index.blade.php --}} @extends('workspace.layouts.workspace') @section('title', 'Announcements') @section('page-title', 'Announcements') @section('ws-content') {{-- Admin: post announcement --}} @if(auth()->user()->isAdmin())

📢 Post Announcement

@csrf
@endif {{-- Announcement list --}} @if($announcements->count())
@foreach($announcements as $ann) @php $isRead = $ann->isReadBy($user); @endphp
{{ $ann->title }} @if(!$isRead) NEW @endif {{ $ann->created_at->diffForHumans() }} @if($ann->author) by {{ $ann->author->name }} @endif

{{ $ann->body }}

@if($ann->expires_at)

Expires {{ $ann->expires_at->format('d M Y, H:i') }}

@endif
@if(!$isRead)
@csrf
@else ✓ Read @endif @if(auth()->user()->isAdmin())
@csrf @method('DELETE')
@endif
@endforeach
@else

No announcements

You're all caught up. Check back later for updates from leadership.

@endif @endsection