@extends('layouts.main_dashboard.app') @section('title', __('dashboard.Roles')) @section('page_heading', __('dashboard.Roles')) @section('page_subtitle', app()->getLocale() === 'ar' ? 'إدارة أدوار النظام وصلاحيات الوصول من شاشة أوضح.' : 'Manage system roles and access assignments from a clearer screen.') @section('skip_page_hero', true) @php $isArabic = app()->getLocale() === 'ar'; $visibleRoles = $roles->count(); $guardsCount = $roles->pluck('guard_name')->filter()->unique()->count(); @endphp @section('content')

{{ __('dashboard.Roles') }}

{{ $isArabic ? 'راجع أدوار النظام وحارس كل دور وانتقل مباشرة إلى التعديل أو الحذف.' : 'Review system roles, their guards, and jump directly to edit or deletion.' }}

{{ __('dashboard.Add Role') }}

{{ $isArabic ? 'هيكلة الوصول' : 'Access structure' }}

{{ __('dashboard.Roles') }}

{{ $isArabic ? 'إجمالي الأدوار' : 'Total roles' }}

{{ $roles->total() }}

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

{{ $visibleRoles }}

{{ __('dashboard.Guards') }}

{{ $guardsCount }}

@if($roles->isEmpty())

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

@else
@foreach($roles as $role) @endforeach
{{ __('dashboard.Name') }} {{ __('dashboard.Guard Name') }} {{ __('dashboard.Created At') }} {{ __('dashboard.Actions') }}
{{ $role->name }} {{ $role->guard_name }} {{ $role->created_at->format('d M Y, h:i A') }}
{{ __('dashboard.Edit') }}
@csrf @method('DELETE')
{{ $roles->links('pagination::simple-tailwind') }}
@endif
@endsection