@extends('layouts.admin') @section('page-title', 'Gestion des administrateurs') @section('page-subtitle', 'Liste des utilisateurs administrateurs') @section('styles') @endsection @section('scripts') @endsection @section('content')
| Nom | Rôle | Statut | Date de création | Actions | |
|---|---|---|---|---|---|
|
{{ strtoupper(substr($admin->prenom, 0, 1) . substr($admin->nom, 0, 1)) }}
{{ $admin->prenom }} {{ $admin->nom }} |
{{ $admin->email }} | @php $roleLabel = ''; $roleBadgeClass = ''; switch($admin->admin_role) { case 'super_admin': $roleLabel = 'Super Admin'; $roleBadgeClass = 'bg-danger'; break; case 'admin': $roleLabel = 'Administrateur'; $roleBadgeClass = 'bg-primary'; break; case 'editor': $roleLabel = 'Éditeur'; $roleBadgeClass = 'bg-success'; break; case 'viewer': $roleLabel = 'Lecteur'; $roleBadgeClass = 'bg-info'; break; default: $roleLabel = $admin->admin_role; $roleBadgeClass = 'bg-secondary'; } @endphp {{ $roleLabel }} |
{{ $admin->is_active ? 'Actif' : 'Inactif' }}
@if(Auth::id() != $admin->id)
is_active ? 'checked' : '' }}>
@endif
|
{{ date('d/m/Y', strtotime($admin->created_at)) }} | |