{{-- Header --}}
@if($notification)
{{ $notification->title }}
{{-- Remind later --}} {{-- Close --}}
{{-- Tags --}} @if(!empty($notification->tags))
@foreach((array) $notification->tags as $tag) #{{ $tag }} @endforeach
@endif {{-- Meta row: created_at + status + due + vote badge/type --}}
{{ $notification->created_at->toDayDateTimeString() }} {{ $notification->isRead() ? 'Read' : 'New' }} @if($notification->due_date) Due: {{ $notification->due_date->format('d M Y') }} @endif {{-- Vote badges --}} {{-- @if($notification->hasVote())--}} {{-- Vote--}} {{-- --}} {{-- {{ $isSingle ? 'Single' : 'Multiple' }}--}} {{-- --}} {{-- @if($notification->vote?->hasEnded())--}} {{-- Ended--}} {{-- @elseif($voteRunning)--}} {{-- Running--}} {{-- @else--}} {{-- Scheduled--}} {{-- @endif--}} {{-- @endif--}}
@endif
{{-- Body --}}
{{-- Alerts --}} @if($alertMessage)
{{ $alertMessage }}
@endif @if($notification) {{-- Notification text --}}

{{ $notification->body ?? '—' }}

@if($notification->related_to_service)

Related to: {{ $notification->related_to_service }}

@endif @if($notification->url) Open Link @endif
{{-- Vote Section --}} @if($notification->hasVote() && $notification->vote)
{{ $notification->vote->title }}
@if($notification->vote->description)

{{ $notification->vote->description }}

@endif
{{-- State badge --}} @if($voteRunning) Running @elseif($notification->vote->hasEnded()) Ended @else Scheduled @endif
@if($voteRunning) {{-- ⬅️ Inputs تظهر دائمًا أثناء التشغيل حتى لو المستخدم صوّت قبل كده --}}
@foreach($notification->vote->voteAnswers as $ans) @if($isSingle) @else @endif @endforeach
You can update your vote while the poll is running.
{{-- نتائج مباشرة أثناء التشغيل --}}
Total votes: {{ $voteTotal }}
@php $maxCount = 0; foreach($answersForResults as $r){ $maxCount = max($maxCount, $r['count']); } @endphp @foreach($answersForResults as $r)
{{ $r['text'] }} {{ $r['percent'] }}% ({{ $r['count'] }})
@endforeach @else {{-- انتهى أو مجدول: نتائج فقط --}}
Total votes: {{ $voteTotal }}
@php $maxCount = 0; foreach($answersForResults as $r){ $maxCount = max($maxCount, $r['count']); } @endphp @foreach($answersForResults as $r)
{{ $r['text'] }} {{ $r['percent'] }}% ({{ $r['count'] }})
@endforeach @endif
@endif @else
{{ __('No notification selected.') }}
@endif
{{-- Footer --}} @if($notification && in_array($notification->sender_type, ['Admin','System'])&& !$notification->hasVote()) @endif