@if ($notifications->isEmpty())
{{ __('app.notification.empty') }}
@else
@foreach ($notifications as $notification)
@php
$notificationLink = match ($notification->entity_type) {
'WORK_ORDER' => $notification->entity_id ? route('technician.work-orders.show', $notification->entity_id) : null,
'COMPLAINT' => $notification->entity_id ? route('technician.complaints.show', $notification->entity_id) : null,
default => null,
};
@endphp
-
@if ($notificationLink)
{{ $notification->title }}
@else
{{ $notification->title }}
@endif
@if (! $notification->read_at)
{{ __('app.notification.new_badge') }}
@endif
{{ $notification->message }}
{{ \Illuminate\Support\Carbon::parse($notification->created_at)->format('d/m/Y H:i') }}
@if (! $notification->read_at)
@endif
@endforeach
@endif