{{-- One line of the journal. Expects $activity; $showProject and $showTicket are optional. --}} @php $viewer = auth()->user(); $changes = $activity->event === 'ticket.updated' ? $activity->changes() : []; if ($viewer->isClient()) { $changes = array_diff_key($changes, array_flip(['is_visible_to_client', 'assigned_to_id'])); } $dot = match (true) { str_starts_with($activity->event, 'ticket.moved') => ! empty($activity->properties['closed']) ? 'bg-emerald-500' : 'bg-indigo-500', str_starts_with($activity->event, 'comment.') => 'bg-sky-500', str_starts_with($activity->event, 'auth.failed') => 'bg-rose-500', str_ends_with($activity->event, '.deleted') || str_ends_with($activity->event, '.removed') || $activity->event === 'token.revoked' => 'bg-rose-400', default => 'bg-slate-400', }; @endphp
  • {{ $activity->actorNameFor($viewer) }} {{ $activity->description($viewer) }} @if(($showProject ?? false) && $activity->project) — {{ $activity->project->name }} @endif @if(($showTicket ?? false) && $activity->ticket) « {{ \Illuminate\Support\Str::limit($activity->ticket->title, 60) }} » @endif

    @if($changes !== []) @elseif($activity->event === 'comment.added' && ! empty($activity->properties['excerpt']) && ! $viewer->isClient())

    « {{ $activity->properties['excerpt'] }} »

    @endif