@extends('layouts.main_dashboard.app') @section('title', __('dashboard.Edit Notification')) @section('page_heading', __('dashboard.Edit Notification')) @php $isArabic = app()->getLocale() === 'ar'; $filters = old() ? [ 'stage_ids' => old('stage_ids', []), 'grade_ids' => old('grade_ids', []), 'class_ids' => old('class_ids', []), 'department_ids' => old('department_ids', []), 'subject_ids' => old('subject_ids', []), 'user_ids' => old('user_ids', []), ] : ($generalNotification->target_filters ?? []); $selectedChannels = collect(old('channels', $generalNotification->channels ?? ['in_app'])); $selectedAudiences = collect(old('audience_types', $generalNotification->audience_types ?? ['students'])); @endphp @section('skip_page_hero', true) @section('content')

{{ __('dashboard.Edit Notification') }}

{{ $isArabic ? 'حدّث محتوى الإشعار العام أو القنوات أو الفئات المستهدفة قبل إعادة النشر.' : 'Update the broadcast notification content, channels, or target audiences before republishing.' }}

@csrf @method('PUT')

{{ $isArabic ? 'قنوات الإرسال' : 'Delivery Channels' }}

{{ $isArabic ? 'الفئات المستهدفة' : 'Target Audiences' }}

@foreach([ 'students' => $isArabic ? 'الطلاب' : 'Students', 'teachers' => $isArabic ? 'المدرسون' : 'Teachers', 'subject_heads' => $isArabic ? 'رؤساء الأقسام' : 'Subject Heads', 'social_workers' => $isArabic ? 'الأخصائيون الاجتماعيون' : 'Social Workers', 'health_visitors' => $isArabic ? 'الأخصائيون الصحيون' : 'Health Visitors', ] as $value => $label) @endforeach

{{ $isArabic ? 'المرفق الحالي' : 'Current Attachment' }}

@if($generalNotification->attachment) {{ __('dashboard.View') }} @endif

{{ $isArabic ? 'ملخص آخر إرسال' : 'Last Delivery Summary' }}

{{ $isArabic ? 'المستلمون الحاليون:' : 'Current resolved recipients:' }} {{ data_get($generalNotification->delivery_stats, 'resolved_users', 0) }}

{{ $isArabic ? 'داخل النظام:' : 'In-app delivered:' }} {{ data_get($generalNotification->delivery_stats, 'in_app_delivered', 0) }}

{{ $isArabic ? 'بريد مرسل:' : 'Emails sent:' }} {{ data_get($generalNotification->delivery_stats, 'email_sent', 0) }}

{{ $isArabic ? 'بريد متخطى:' : 'Emails skipped:' }} {{ data_get($generalNotification->delivery_stats, 'email_skipped', 0) }}

{{ $isArabic ? 'آخر تحديث:' : 'Last dispatch:' }} {{ $generalNotification->last_dispatched_at?->diffForHumans() ?? ($isArabic ? 'غير متاح' : 'N/A') }}

{{ __('dashboard.Cancel') }}
@endsection