@extends('layouts.app') @section('title', 'Notifications') @section('page', 'notifications') @section('content') @php $isClient = auth()->user()->isClient(); $cats = $isClient ? ['approval' => 'Approvals', 'message' => 'Messages', 'invoice' => 'Invoices', 'file' => 'Files'] : ['approval' => 'Approvals', 'message' => 'Messages', 'payment' => 'Payments', 'ai' => 'AI assistant', 'team' => 'Team']; $groups = $items->groupBy(fn ($n) => $n->created_at->isToday() ? 'Today' : ($n->created_at->gte(now()->subDays(7)) ? 'This week' : 'Earlier')); @endphp

Notifications

@if ($isClient)Updates from your projects. Choose what you get by email in notification settings.@else What's happened across your clients. Choose what you're told about in your profile.@endif

@foreach ($cats as $k => $label)@endforeach
@foreach ($groups as $label => $list)
{{ $label }}
@foreach ($list as $n)
{{ $n->data['title'] }}
{{ $n->data['meta'] }}, {{ $n->created_at->isToday() ? ($n->created_at->gt(now()->subHour()) ? ago($n->created_at) : $n->created_at->format('H:i')) : d_smart($n->created_at) }}
@endforeach @endforeach
No notificationsYou're all caught up.
@endsection @push('scripts') @endpush