@php $newsletterCollection = method_exists($newsletters, 'getCollection') ? $newsletters->getCollection() : collect($newsletters); $selectedNewsletter = $newsletterCollection->first(function ($newsletter) use ($expandedNewsletterId) { $newsletterId = $newsletter['news_letter_id'] ?? $newsletter['id'] ?? null; return (string) $newsletterId === (string) $expandedNewsletterId; }); $priorityFilters = [ 'all' => 'All', 'standard' => 'Standard', 'important' => 'Important', ]; $activePriorityFilter = is_string($priorityFilter ?? null) ? $priorityFilter : 'all'; $selectedFilterLabel = $priorityFilters[$activePriorityFilter] ?? 'All'; @endphp

News

Newsletters

Stay up to date with newsletters published for the provinces linked to this client account.

Latest newsletters published by Licentia.

@foreach ($priorityFilters as $filterValue => $filterLabel) @endforeach
Showing $activePriorityFilter === 'important', 'bg-slate-100 text-slate-700 ring-slate-200' => $activePriorityFilter !== 'important', ])> {{ $selectedFilterLabel }}
@forelse ($newsletters as $newsletter) @php $newsletterId = $newsletter['news_letter_id'] ?? $newsletter['id'] ?? (string) $loop->index; $priority = $newsletter->priority?->value ?? $newsletter->priority; $isImportant = $priority === \Modules\Support\Enums\NewsLetterPriority::IMPORTANT->value; $descriptionPreview = \Illuminate\Support\Str::limit( trim(preg_replace('/\s+/', ' ', strip_tags($newsletter['description'] ?? ''))), 180, '...' ); @endphp
$isImportant, 'border-slate-200 bg-[linear-gradient(145deg,rgba(255,255,255,0.98),rgba(241,245,249,0.95))] shadow-[0_18px_36px_rgba(15,23,42,0.08)] hover:-translate-y-0.5 hover:shadow-[0_24px_48px_rgba(15,23,42,0.12)]' => ! $isImportant, ])>
Licentia update @if ($isImportant) Important @endif

{{ $newsletter['title'] }}

Newsletter

{{ $newsletter['published_at'] ? \Carbon\Carbon::parse($newsletter['published_at'])->format('d M Y') : '' }}

{{ $descriptionPreview }}

Latest mobile notice
@empty

No newsletters to show.

New newsletters will appear here once they have been published for the provinces linked to this client.

@endforelse
@if ($newsletters->hasPages())
{{ $newsletters->links() }}
@endif
@if ($selectedNewsletter)
@endif