@extends('layouts.main_dashboard.app') @section('title', __('dashboard.All Moderators')) @section('page_heading', __('dashboard.All Moderators')) @section('page_subtitle', app()->getLocale() === 'ar' ? 'إدارة المشرفين وأدوارهم من واجهة أكثر اتساقًا مع بقية النظام.' : 'Manage moderators and their roles from a view aligned with the rest of the system.') @section('skip_page_hero', true) @php $isArabic = app()->getLocale() === 'ar'; $totalModerators = method_exists($moderators, 'total') ? $moderators->total() : $moderators->count(); $visibleModerators = $moderators->count(); $withRoles = $moderators->filter(fn ($moderator) => $moderator->roles->isNotEmpty())->count(); @endphp @section('content')

{{ __('dashboard.All Moderators') }}

{{ $isArabic ? 'راجع حسابات المشرفين وابحث فيها وأدر الأدوار المرتبطة بكل حساب من شاشة أوضح.' : 'Review moderator accounts, search through them, and manage linked roles from a clearer screen.' }}

{{ __('dashboard.Add New Moderator') }}

{{ $isArabic ? 'فريق الإشراف' : 'Moderation team' }}

{{ __('dashboard.Moderators Directory') }}

{{ $isArabic ? 'ابحث عن المشرفين وراجع الأدوار المرتبطة بكل حساب.' : 'Search moderators and review the roles attached to each account.' }}

{{ $isArabic ? 'إجمالي المشرفين' : 'Total moderators' }}

{{ $totalModerators }}

{{ $isArabic ? 'داخل الصفحة' : 'Visible now' }}

{{ $visibleModerators }}

{{ $isArabic ? 'بحسابات لها أدوار' : 'With roles' }}

{{ $withRoles }}

@if($moderators->isEmpty())

{{ __('dashboard.No moderators found.') }}

@else
@foreach($moderators as $moderator) @endforeach
{{ $isArabic ? 'المشرف' : 'Moderator' }} {{ __('dashboard.Contact') }} {{ __('dashboard.Roles') }} {{ __('dashboard.Actions') }}
@if($moderator->avatar) {{ $moderator->name }} @else @endif

{{ $moderator->name }}

#{{ $moderator->id }}

{{ $moderator->email }}

{{ $moderator->phone ?: __('dashboard.Not Available') }}

@forelse($moderator->roles as $role) {{ $role->name }} @empty {{ __('dashboard.Not Available') }} @endforelse
{{ __('dashboard.View') }} {{ __('dashboard.Edit') }}
@csrf @method('DELETE')
@if(method_exists($moderators, 'links'))
{{ $moderators->appends(request()->query())->links('pagination::simple-tailwind') }}
@endif @endif
@endsection