@extends('layouts.main_dashboard.app') @section('title', __('dashboard.General Notifications')) @section('page_heading', __('dashboard.General Notifications')) @section('skip_page_hero', true) @section('content')
{{ app()->getLocale() === 'ar' ? 'تابع الرسائل العامة المنشورة وراجع القنوات والاستهداف والمرفقات من مكان واحد.' : 'Review published broadcast notifications, channels, targeting, and attachments from one place.' }}
{{ __('dashboard.Review notification targets, attachments, and publication dates.') }}
{{ __('dashboard.Total Notifications') }}
{{ $notifications->total() }}
{{ app()->getLocale() === 'ar' ? 'إشعارات البريد' : 'Email Broadcasts' }}
{{ $notifications->filter(fn ($item) => collect($item->channels ?? [])->contains('email'))->count() }}
{{ __('dashboard.With Attachments') }}
{{ $notifications->filter(fn ($item) => filled($item->attachment))->count() }}
لا توجد إشعارات عامة منشورة حاليًا.
| pluck('id')) }} : []" class="rounded border-surface-300 dark:border-surface-600"> | {{ __('dashboard.Title') }} | {{ __('dashboard.Target') }} | {{ app()->getLocale() === 'ar' ? 'القنوات' : 'Channels' }} | {{ app()->getLocale() === 'ar' ? 'الوصول' : 'Delivery' }} | {{ __('dashboard.Attachment') }} | {{ __('dashboard.Date') }} | {{ __('dashboard.Actions') }} |
|---|---|---|---|---|---|---|---|
|
{{ $item->title }} {{ \Illuminate\Support\Str::limit($item->description, 80) }} |
{{ collect($item->audience_types ?? [])->map(fn ($type) => match ($type) { 'students' => app()->getLocale() === 'ar' ? 'الطلاب' : 'Students', 'teachers' => app()->getLocale() === 'ar' ? 'المدرسون' : 'Teachers', 'subject_heads' => app()->getLocale() === 'ar' ? 'رؤساء الأقسام' : 'Subject Heads', 'social_workers' => app()->getLocale() === 'ar' ? 'الأخصائيون الاجتماعيون' : 'Social Workers', 'health_visitors' => app()->getLocale() === 'ar' ? 'الأخصائيون الصحيون' : 'Health Visitors', default => $type, })->implode('، ') ?: (app()->getLocale() === 'ar' ? 'غير محدد' : 'Unspecified') }} {{ app()->getLocale() === 'ar' ? 'مراحل:' : 'Stages:' }} {{ collect(data_get($item->target_filters, 'stage_ids', []))->count() }} · {{ app()->getLocale() === 'ar' ? 'صفوف:' : 'Grades:' }} {{ collect(data_get($item->target_filters, 'grade_ids', []))->count() }} · {{ app()->getLocale() === 'ar' ? 'فصول:' : 'Classes:' }} {{ collect(data_get($item->target_filters, 'class_ids', []))->count() }} |
@php $channels = $item->channels ?? ['in_app']; @endphp
@foreach($channels as $channel)
{{ $channel === 'email' ? (app()->getLocale() === 'ar' ? 'بريد' : 'Email') : (app()->getLocale() === 'ar' ? 'داخل النظام' : 'In-App') }}
@endforeach
|
{{ app()->getLocale() === 'ar' ? 'مستلمون:' : 'Recipients:' }} {{ data_get($item->delivery_stats, 'resolved_users', $item->recipients->count()) }} {{ app()->getLocale() === 'ar' ? 'إيميل ناجح:' : 'Email sent:' }} {{ data_get($item->delivery_stats, 'email_sent', 0) }} |
@if($item->attachment) {{ __('dashboard.View') }} @else - @endif | {{ $item->created_at->format('Y-m-d') }} |