This commit is contained in:
mrKamoo
2026-09-30 16:27:32 +02:00
commit 310724708f
147 changed files with 21327 additions and 0 deletions
@@ -0,0 +1,42 @@
@extends('layouts.app')
@section('title', 'Agents — Signatures CABM')
@section('content')
<h1>Agents</h1>
<form method="get" class="row" style="margin-bottom:16px">
<input type="search" name="q" value="{{ $q }}" placeholder="Nom, adresse ou service" style="max-width:360px" aria-label="Rechercher un agent">
<button class="btn" type="submit">Rechercher</button>
<span class="muted">{{ $agents->total() }} agent(s)</span>
</form>
<div class="card">
<table class="list">
<thead><tr><th>Agent</th><th>Service</th><th>Groupes signature_*</th><th>Template appliqué</th></tr></thead>
<tbody>
@forelse ($agents as $a)
<tr>
<td><a href="{{ route('admin.agents.show', $a) }}">{{ $a->display_name }}</a><div class="muted">{{ $a->mail }}</div></td>
<td>{{ $a->department }}</td>
<td class="muted">{{ $a->groups->pluck('display_name')->join(', ') ?: '—' }}</td>
<td>{{ $resolved[$a->id] ?? '— aucun —' }}</td>
</tr>
@empty
<tr><td colspan="4" class="muted">Aucun agent trouvé.</td></tr>
@endforelse
</tbody>
</table>
@if ($agents->hasPages())
<nav class="row" style="margin-top:12px" aria-label="Pagination">
@if ($agents->onFirstPage())
<span class="muted">← Précédent</span>
@else
<a href="{{ $agents->previousPageUrl() }}" rel="prev">← Précédent</a>
@endif
<span class="muted">Page {{ $agents->currentPage() }} / {{ $agents->lastPage() }}</span>
@if ($agents->hasMorePages())
<a href="{{ $agents->nextPageUrl() }}" rel="next">Suivant →</a>
@else
<span class="muted">Suivant →</span>
@endif
</nav>
@endif
</div>
@endsection