Mode sombre, option désactivation mises à jour, user-picker avec recherche
- Dark mode complet : darkMode:'class' Tailwind, sélecteur clair/sombre/auto dans la navigation (mémorisé dans localStorage, sans flash au chargement) ; 53 vues et 8 composants Breeze mis à jour avec classes dark: - Composant user-picker : fenêtre modale avec recherche temps réel (nom/email) remplace les <select> d'ajout de membres dans sections et sources - Paramètres : option "Désactiver la vérification automatique des mises à jour" (case à cochage auto-soumise, route POST parametres/updates) - Panneau "Paramètres généraux" remonté en tête de la page de paramètres - README recentré sur l'installation manuelle hébergement PHP+MySQL - VERSION 1.0.1 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -1,10 +1,10 @@
|
||||
<x-app-layout>
|
||||
<x-slot name="header">
|
||||
<div class="flex items-center justify-between">
|
||||
<h2 class="text-xl font-semibold text-gray-800">Gestion des utilisateurs</h2>
|
||||
<h2 class="text-xl font-semibold text-gray-800 dark:text-gray-200">Gestion des utilisateurs</h2>
|
||||
<div class="flex items-center gap-3">
|
||||
<a href="{{ route('admin.utilisateurs.import') }}"
|
||||
class="flex items-center gap-1.5 px-4 py-2 border border-gray-300 text-sm text-gray-700 rounded-md hover:bg-gray-50 transition-colors">
|
||||
class="flex items-center gap-1.5 px-4 py-2 border border-gray-300 dark:border-gray-600 text-sm text-gray-700 dark:text-gray-300 rounded-md hover:bg-gray-50 dark:hover:bg-gray-700 transition-colors">
|
||||
<svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2"
|
||||
d="M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-4l-4 4m0 0l-4-4m4 4V4"/>
|
||||
@@ -12,7 +12,7 @@
|
||||
Importer CSV
|
||||
</a>
|
||||
<a href="{{ route('admin.utilisateurs.export', request()->only(['role', 'status', 'q'])) }}"
|
||||
class="flex items-center gap-1.5 px-4 py-2 border border-gray-300 text-sm text-gray-700 rounded-md hover:bg-gray-50 transition-colors">
|
||||
class="flex items-center gap-1.5 px-4 py-2 border border-gray-300 dark:border-gray-600 text-sm text-gray-700 dark:text-gray-300 rounded-md hover:bg-gray-50 dark:hover:bg-gray-700 transition-colors">
|
||||
<svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2"
|
||||
d="M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-8l-4 4m0 0l4 4m-4-4h12"/>
|
||||
@@ -26,33 +26,33 @@
|
||||
<div class="py-8 max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 space-y-6">
|
||||
|
||||
@if(session('success'))
|
||||
<div class="p-4 bg-green-50 border border-green-200 text-green-800 text-sm rounded-md">
|
||||
<div class="p-4 bg-green-50 dark:bg-green-900/30 border border-green-200 dark:border-green-700 text-green-800 dark:text-green-200 text-sm rounded-md">
|
||||
{{ session('success') }}
|
||||
</div>
|
||||
@endif
|
||||
@if(session('error'))
|
||||
<div class="p-4 bg-red-50 border border-red-200 text-red-800 text-sm rounded-md">
|
||||
<div class="p-4 bg-red-50 dark:bg-red-900/30 border border-red-200 dark:border-red-700 text-red-800 dark:text-red-200 text-sm rounded-md">
|
||||
{{ session('error') }}
|
||||
</div>
|
||||
@endif
|
||||
|
||||
{{-- Filtres --}}
|
||||
@php $hasFilters = request()->anyFilled(['role', 'q', 'status']); @endphp
|
||||
<div class="bg-white shadow rounded-lg p-5">
|
||||
<div class="bg-white dark:bg-gray-800 shadow rounded-lg p-5">
|
||||
<form method="GET" action="{{ route('admin.utilisateurs.index') }}"
|
||||
class="flex flex-wrap items-end gap-4">
|
||||
<div class="flex-1 min-w-[180px]">
|
||||
<label class="block text-xs font-medium text-gray-600 mb-1">Recherche</label>
|
||||
<label class="block text-xs font-medium text-gray-600 dark:text-gray-400 mb-1">Recherche</label>
|
||||
<input type="text" name="q" value="{{ request('q') }}"
|
||||
placeholder="Nom ou e-mail…"
|
||||
class="block w-full rounded-md border-gray-300 shadow-sm text-sm
|
||||
class="block w-full rounded-md border-gray-300 dark:border-gray-600 shadow-sm text-sm
|
||||
focus:border-indigo-500 focus:ring-indigo-500">
|
||||
</div>
|
||||
|
||||
<div class="w-44">
|
||||
<label class="block text-xs font-medium text-gray-600 mb-1">Rôle</label>
|
||||
<label class="block text-xs font-medium text-gray-600 dark:text-gray-400 mb-1">Rôle</label>
|
||||
<select name="role"
|
||||
class="block w-full rounded-md border-gray-300 shadow-sm text-sm
|
||||
class="block w-full rounded-md border-gray-300 dark:border-gray-600 shadow-sm text-sm
|
||||
focus:border-indigo-500 focus:ring-indigo-500">
|
||||
<option value="">— Tous —</option>
|
||||
@foreach(\App\Enums\UserRole::cases() as $r)
|
||||
@@ -64,9 +64,9 @@
|
||||
</div>
|
||||
|
||||
<div class="w-40">
|
||||
<label class="block text-xs font-medium text-gray-600 mb-1">Statut</label>
|
||||
<label class="block text-xs font-medium text-gray-600 dark:text-gray-400 mb-1">Statut</label>
|
||||
<select name="status"
|
||||
class="block w-full rounded-md border-gray-300 shadow-sm text-sm
|
||||
class="block w-full rounded-md border-gray-300 dark:border-gray-600 shadow-sm text-sm
|
||||
focus:border-indigo-500 focus:ring-indigo-500">
|
||||
<option value="">— Tous —</option>
|
||||
<option value="active" {{ request('status') === 'active' ? 'selected' : '' }}>Actifs</option>
|
||||
@@ -81,7 +81,7 @@
|
||||
</button>
|
||||
@if($hasFilters)
|
||||
<a href="{{ route('admin.utilisateurs.index') }}"
|
||||
class="px-4 py-2 border border-gray-300 text-gray-600 text-sm rounded-md hover:bg-gray-50">
|
||||
class="px-4 py-2 border border-gray-300 dark:border-gray-600 text-gray-600 dark:text-gray-400 text-sm rounded-md hover:bg-gray-50 dark:hover:bg-gray-700">
|
||||
Effacer
|
||||
</a>
|
||||
@endif
|
||||
@@ -90,52 +90,52 @@
|
||||
</div>
|
||||
|
||||
{{-- Tableau --}}
|
||||
<div class="bg-white shadow rounded-lg overflow-hidden">
|
||||
<table class="min-w-full divide-y divide-gray-200 text-sm">
|
||||
<thead class="bg-gray-50">
|
||||
<div class="bg-white dark:bg-gray-800 shadow rounded-lg overflow-hidden">
|
||||
<table class="min-w-full divide-y divide-gray-200 dark:divide-gray-700 text-sm">
|
||||
<thead class="bg-gray-50 dark:bg-gray-700">
|
||||
<tr>
|
||||
<th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase">Nom</th>
|
||||
<th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase">E-mail</th>
|
||||
<th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase">Rôle</th>
|
||||
<th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase">Sections</th>
|
||||
<th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase">Sources</th>
|
||||
<th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase">Inscrit le</th>
|
||||
<th class="px-6 py-3 text-left text-xs font-medium text-gray-500 dark:text-gray-400 uppercase">Nom</th>
|
||||
<th class="px-6 py-3 text-left text-xs font-medium text-gray-500 dark:text-gray-400 uppercase">E-mail</th>
|
||||
<th class="px-6 py-3 text-left text-xs font-medium text-gray-500 dark:text-gray-400 uppercase">Rôle</th>
|
||||
<th class="px-6 py-3 text-left text-xs font-medium text-gray-500 dark:text-gray-400 uppercase">Sections</th>
|
||||
<th class="px-6 py-3 text-left text-xs font-medium text-gray-500 dark:text-gray-400 uppercase">Sources</th>
|
||||
<th class="px-6 py-3 text-left text-xs font-medium text-gray-500 dark:text-gray-400 uppercase">Inscrit le</th>
|
||||
<th class="px-6 py-3"></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody class="divide-y divide-gray-200">
|
||||
<tbody class="divide-y divide-gray-200 dark:divide-gray-700">
|
||||
@forelse($users as $user)
|
||||
@php
|
||||
$roleColors = [
|
||||
'admin' => 'bg-red-100 text-red-700',
|
||||
'section_manager' => 'bg-blue-100 text-blue-700',
|
||||
'member' => 'bg-gray-100 text-gray-600',
|
||||
'admin' => 'bg-red-100 dark:bg-red-900/50 text-red-700',
|
||||
'section_manager' => 'bg-blue-100 dark:bg-blue-900/50 text-blue-700',
|
||||
'member' => 'bg-gray-100 dark:bg-gray-700 text-gray-600 dark:text-gray-400',
|
||||
];
|
||||
$color = $roleColors[$user->role->value] ?? 'bg-gray-100 text-gray-600';
|
||||
$color = $roleColors[$user->role->value] ?? 'bg-gray-100 dark:bg-gray-700 text-gray-600 dark:text-gray-400';
|
||||
@endphp
|
||||
<tr class="hover:bg-gray-50 {{ ! $user->is_active ? 'opacity-60' : '' }}">
|
||||
<td class="px-6 py-4 font-medium text-gray-900">
|
||||
<tr class="hover:bg-gray-50 dark:hover:bg-gray-700 {{ ! $user->is_active ? 'opacity-60' : '' }}">
|
||||
<td class="px-6 py-4 font-medium text-gray-900 dark:text-white">
|
||||
{{ $user->name }}
|
||||
@if($user->id === auth()->id())
|
||||
<span class="ml-1 text-xs text-gray-400">(vous)</span>
|
||||
<span class="ml-1 text-xs text-gray-400 dark:text-gray-500">(vous)</span>
|
||||
@endif
|
||||
@if(! $user->is_active)
|
||||
<span class="ml-2 inline-flex items-center px-1.5 py-0.5 rounded text-xs font-medium bg-red-100 text-red-600">
|
||||
<span class="ml-2 inline-flex items-center px-1.5 py-0.5 rounded text-xs font-medium bg-red-100 dark:bg-red-900/50 text-red-600">
|
||||
Inactif
|
||||
</span>
|
||||
@endif
|
||||
</td>
|
||||
<td class="px-6 py-4 text-gray-500">{{ $user->email }}</td>
|
||||
<td class="px-6 py-4 text-gray-500 dark:text-gray-400">{{ $user->email }}</td>
|
||||
<td class="px-6 py-4">
|
||||
<span class="inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium {{ $color }}">
|
||||
{{ $user->role->label() }}
|
||||
</span>
|
||||
</td>
|
||||
<td class="px-6 py-4 text-gray-500">
|
||||
<td class="px-6 py-4 text-gray-500 dark:text-gray-400">
|
||||
{{ $user->sections->isNotEmpty() ? $user->sections->pluck('nom')->join(', ') : '—' }}
|
||||
</td>
|
||||
<td class="px-6 py-4 text-gray-500">{{ $user->sources_assignees_count ?: '—' }}</td>
|
||||
<td class="px-6 py-4 text-gray-500 whitespace-nowrap">
|
||||
<td class="px-6 py-4 text-gray-500 dark:text-gray-400">{{ $user->sources_assignees_count ?: '—' }}</td>
|
||||
<td class="px-6 py-4 text-gray-500 dark:text-gray-400 whitespace-nowrap">
|
||||
{{ $user->created_at->format('d/m/Y') }}
|
||||
</td>
|
||||
<td class="px-6 py-4 text-right space-x-3">
|
||||
@@ -157,7 +157,7 @@
|
||||
</tr>
|
||||
@empty
|
||||
<tr>
|
||||
<td colspan="7" class="px-6 py-10 text-center text-gray-400">
|
||||
<td colspan="7" class="px-6 py-10 text-center text-gray-400 dark:text-gray-500">
|
||||
Aucun utilisateur trouvé.
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
Reference in New Issue
Block a user