@extends('portal.layouts.app') @section('content') {{-- Pending Requests Status --}} @if ($pendingRequests->isNotEmpty())

{{ trans('portal.notifications.pending_title') }}

{{ trans('portal.notifications.pending_description') }}

@foreach ($pendingRequests as $approval)
{{ ucfirst(str_replace('_', ' ', $approval->request_type)) }}
{{ trans('portal.notifications.submitted_on') }} {{ $approval->submitted_at?->format('Y-m-d') ?? '—' }} • {{ trans('portal.notifications.step_label', ['step' => $approval->current_sequence_order]) }}
{{ trans('portal.requests.statuses.pending') }}
@endforeach
{{ trans('portal.notifications.view_all_requests') }}
@endif {{-- Notifications List --}}

{{ trans('portal.notifications.list_title') }}

@if ($notifications->isNotEmpty())
@csrf
@endif
@if ($notifications->isEmpty())

{{ trans('portal.notifications.empty_title') }}

{{ trans('portal.notifications.empty_description') }}

@else
@foreach ($notifications as $notification) @php $n = $service->formatNotification($notification) @endphp
@if (!$n['is_read']) @endif {{ $n['title'] }}
@if ($n['message'])
{{ $n['message'] }}
@endif
{{ $n['created_at_human'] }} • {{ $n['created_at'] }}
@if ($n['url']) {{ trans('portal.notifications.view') }} @endif @if (!$n['is_read'])
@csrf
@endif
@endforeach
{{ trans('portal.notifications.pagination_summary', [ 'from' => $notifications->firstItem(), 'to' => $notifications->lastItem(), 'total' => $notifications->total(), ]) }}
@if ($notifications->previousPageUrl()) {{ trans('portal.requests.pagination_previous') }} @endif @if ($notifications->nextPageUrl()) {{ trans('portal.requests.pagination_next') }} @endif
@endif
@endsection