@extends('layouts.superadmin') @section('title','NotifyHub — القواعد') @section('content') @php $sources = [ 'decision_activated' => ['label' => 'قرار: تفعيل/نشر', 'icon' => 'fa-gavel'], 'live_created' => ['label' => 'لايف: إنشاء', 'icon' => 'fa-satellite-dish'], 'live_status_changed' => ['label' => 'لايف: تغيير الحالة', 'icon' => 'fa-rotate'], 'weekly_test_created' => ['label' => 'اختبار: إنشاء', 'icon' => 'fa-clipboard-check'], 'daily_reading_published' => ['label' => 'اقرأني: نشر', 'icon' => 'fa-book-open'], ]; $audLabels = [ 'all' => 'الجميع', 'moderators' => 'المشرفين', 'beta' => 'Beta', 'male' => 'ذكور', 'female' => 'إناث', ]; $enabledCls = 'bg-emerald-500/15 border-emerald-400/25 text-emerald-200'; $disabledCls = 'bg-rose-500/15 border-rose-400/25 text-rose-200'; @endphp
{{-- HERO --}}
NotifyHub — Rules

قواعد الإشعارات Rules

تحكم بالإشعارات التلقائية: المصدر + الجمهور + Throttle + قالب العنوان/النص + رابط اختياري.

{{-- Flash --}} @if(session('success'))
{{ session('success') }}
@endif @if(session('error'))
{{ session('error') }}
@endif @if($errors->any())
تحقق من الحقول:
    @foreach($errors->all() as $e)
  • {{ $e }}
  • @endforeach
@endif {{-- Create Rule --}}
إنشاء Rule
القواعد تتحكم بالإشعارات التلقائية فقط
@csrf
0 = بدون تقييد
{{-- Rules List --}}
القواعد الحالية
عدد: {{ number_format(count($rules ?? [])) }}
@forelse($rules as $r) @php $src = $sources[$r->source] ?? ['label'=>$r->source,'icon'=>'fa-bolt']; $aud = $audLabels[$r->audience] ?? $r->audience; $isOn = (int)$r->is_enabled === 1; @endphp @empty @endforelse
# المصدر الجمهور Throttle الحالة قالب العنوان/النص إدارة
{{ $r->id }}
{{ $src['label'] }}
{{ $r->source }}
{{ $aud }} {{ (int)$r->throttle_minutes }}m {{ $isOn ? 'مفعل' : 'معطل' }}
{{ $r->template_title }}
{{ $r->template_body }}
@if(!empty($r->template_url))
{{ $r->template_url }}
@endif
@csrf
لا توجد Rules حتى الآن.
{{-- Modal Edit --}}
@endsection