{{ $isArabic ? 'إجمالي الإشعارات' : 'Total notifications' }}
{{ number_format($notifications->total()) }}
@extends('layouts.main_dashboard.app') @php $routePrefix = auth()->user()?->usesStaffPortal() ? 'teacher' : 'admin'; $isTeacherPortal = auth()->user()?->usesStaffPortal(); $isArabic = app()->getLocale() === 'ar'; $notificationItems = $notifications->getCollection(); $totalRecipients = $notificationItems->sum(fn ($notification) => $notification->users->count()); $latestNotification = $notificationItems->first(); $draftCount = $notificationItems->where('is_draft', true)->count(); $sentCount = $notificationItems->where('is_draft', false)->count(); @endphp @section('title', $isTeacherPortal ? ($isArabic ? 'إدارة الإشعارات' : 'Notification Management') @section('page_heading', $isTeacherPortal ? ($isArabic ? 'إدارة الإشعارات' : 'Notification Management') : __('dashboard.My Sent Notifications')) @section('skip_page_hero', true) @section('content')
{{ $isTeacherPortal ? ($isArabic ? 'مساحة المدرس' : 'Teacher workspace') : ($isArabic ? 'إدارة الإشعارات' : 'Notification management') }}
{{ $isTeacherPortal ? ($isArabic ? 'واجهة موحدة لإدارة إشعاراتك: راجع الرسائل التي أرسلتها، تابع عدد المستلمين، وأنشئ إشعارًا جديدًا من نفس الشاشة.' : 'A unified workspace to manage your notifications: review sent messages, track recipient counts, and create a new notification from the same screen.') : __('dashboard.Review and manage the notifications you broadcasted, filter by title, and keep the timeline neat.') }}
{{ $isArabic ? 'إجمالي الإشعارات' : 'Total notifications' }}
{{ number_format($notifications->total()) }}
{{ $isArabic ? 'المستلمون داخل الصفحة' : 'Recipients on page' }}
{{ number_format($totalRecipients) }}
{{ $isArabic ? 'المرسلة' : 'Sent now' }}
{{ number_format($sentCount) }}
{{ $isArabic ? 'آخر إرسال' : 'Latest send' }}
{{ $latestNotification?->created_at?->format('Y-m-d') ?? '—' }}
{{ $isArabic ? 'المسودات' : 'Drafts' }}: {{ number_format($draftCount) }}
{{ $isArabic ? 'سجل الإشعارات' : 'Notification log' }}
{{ $isArabic ? 'راجع ما أرسلته وعدّل المحتوى أو احذف الرسائل من نفس الجدول.' : 'Review what you sent, then edit or delete items from the same table.' }}
{{ __('dashboard.You have not sent any notifications yet.') }}
| {{ __('dashboard.Title') }} | {{ __('dashboard.Recipient Count') }} | {{ __('dashboard.Status') }} | {{ __('dashboard.Created Date') }} | {{ __('dashboard.Actions') }} |
|---|---|---|---|---|
|
{{ $notification->title }} {{ \Illuminate\Support\Str::limit($notification->body, 120) }} |
{{ number_format($notification->users->count()) }} | {{ $notification->is_draft ? __('dashboard.Draft') : __('dashboard.Sent') }} | {{ $notification->created_at?->format('Y-m-d') ?? '—' }} |