{{-- resources/views/notifications/index.blade.php --}} @extends('layouts.app') @section('content')

{{ __('notifications.management') }}

{{ __('notifications.total') }}

{{ $totalNotifications ?? 0 }}

{{ __('notifications.unread') }}

{{ $unreadNotifications ?? 0 }}

{{ __('notifications.read') }}

{{ $readNotifications ?? 0 }}

{{ __('notifications.settings') }}


{{ __('notifications.types') }}

{{ __('notifications.via_email') }} / {{ __('notifications.via_app') }} / {{ __('notifications.via_sms') }}
@forelse($notifications as $notification) @empty @endforelse
# {{ __('notifications.date') }} {{ __('notifications.description') }} {{ __('notifications.type') }} {{ __('notifications.user') }} {{ __('notifications.status_unread') }}/{{ __('notifications.status_read') }} {{ __('notifications.actions') }}
{{ $loop->iteration }} {{ $notification->created_at->format('Y-m-d H:i') }} @php $d = $notification->data; @endphp @if(isset($d['title_key'])) {{ __($d['title_key'], $d['title_params'] ?? []) }} @else {{ $d['title'] ?? __('notifications.activity_general') }} @endif
@if(isset($d['message_key'])) {{ Str::limit(__($d['message_key'], $d['message_params'] ?? []), 80) }} @else {{ Str::limit($d['message'] ?? __('notifications.activity_general'), 80) }} @endif
@php $typeLabels = [ 'leave' => __('notifications.leave'), 'loan' => __('notifications.loan'), 'payroll' => __('notifications.payroll'), 'attendance' => __('notifications.attendance'), 'system' => __('notifications.system') ]; @endphp {{ $typeLabels[$notification->data['type'] ?? 'system'] ?? 'نظام' }} @if(isset($notification->data['sender']) && $notification->data['sender'] == 'system') نظام إدارة الموظفين والرواتب باي ماستر @else {{ $notification->notifiable?->name ?? 'نظام' }} @endif @if($notification->read_at) {{ __('notifications.status_read') }} @else {{ __('notifications.status_unread') }} @endif
@if(!$notification->read_at) @endif

{{ __('notifications.no_notifications') }}
@if(isset($notifications) && $notifications->hasPages())
{{ $notifications->links() }}
@endif

أنشطة الإشعارات الأخيرة

@forelse($recentActivities ?? [] as $activity) @empty @endforelse
النشاط المستخدم النوع الوصف التاريخ
@switch($activity->description) @case('created_leave_request') طلب إجازة جديد @break @case('approved_leave_request') موافقة على إجازة @break @case('rejected_leave_request') رفض إجازة @break @case('created_loan_request') طلب قرض جديد @break @case('approved_loan_request') موافقة على قرض @break @case('rejected_loan_request') رفض قرض @break @default نشاط عام @endswitch {{ $activity->user?->name ?? 'نظام' }} @switch($activity->subject_type) @case('App\Models\Leave') إجازة @break @case('App\Models\Loan') قرض @break @default نظام @endswitch @if(isset($activity->properties['employee_name'])) طلب من {{ $activity->properties['employee_name'] }} @elseif(isset($activity->properties['leave_type'])) نوع الإجازة: {{ $activity->properties['leave_type'] }} @elseif(isset($activity->properties['loan_amount'])) مبلغ القرض: {{ number_format($activity->properties['loan_amount'], 2) }} {{ $currency_name ?? 'د.ك' }} @else {{ $activity->description }} @endif {{ $activity->created_at->format('Y-m-d H:i') }}
لا توجد أنشطة حديثة.
@endsection