users menu listing
This commit is contained in:
@@ -0,0 +1,61 @@
|
||||
<x-layouts::app :title="__('Users')">
|
||||
<div class="hd-page-shell space-y-5">
|
||||
<section class="hd-page-hero">
|
||||
<div>
|
||||
<div class="hd-eyebrow">Administration</div>
|
||||
<h1>Users</h1>
|
||||
<p>Manage Helpdesk users, administrators and agents.</p>
|
||||
</div>
|
||||
<a href="{{ route('user-management.create') }}" class="hd-action hd-action-green">
|
||||
<i class="fa-solid fa-user-plus"></i> New user
|
||||
</a>
|
||||
</section>
|
||||
|
||||
@if (session('status'))
|
||||
<div class="hd-alert hd-alert-success">{{ session('status') }}</div>
|
||||
@endif
|
||||
|
||||
<section class="hd-panel">
|
||||
<form method="GET" class="hd-toolbar">
|
||||
<div class="hd-search-field">
|
||||
<i class="fa-solid fa-magnifying-glass"></i>
|
||||
<input name="search" value="{{ $search }}" placeholder="Search users by name or email">
|
||||
</div>
|
||||
<button class="hd-action hd-action-blue" type="submit">Search</button>
|
||||
</form>
|
||||
|
||||
<div class="hd-table-wrap">
|
||||
<table class="hd-table">
|
||||
<thead><tr><th>User</th><th>Email</th><th>Role</th><th>Verified</th><th class="text-right">Actions</th></tr></thead>
|
||||
<tbody>
|
||||
@forelse($users as $user)
|
||||
<tr>
|
||||
<td>
|
||||
<div class="flex items-center gap-3">
|
||||
<span class="hd-user-avatar">{{ $user->initials() }}</span>
|
||||
<span class="font-semibold">{{ $user->name }}</span>
|
||||
</div>
|
||||
</td>
|
||||
<td>{{ $user->email }}</td>
|
||||
<td>
|
||||
@if($user->helpdesk_admin)
|
||||
<span class="hd-role-pill hd-role-admin">Administrator</span>
|
||||
@elseif($user->helpdesk_agent)
|
||||
<span class="hd-role-pill hd-role-agent">Agent</span>
|
||||
@else
|
||||
<span class="hd-role-pill">User</span>
|
||||
@endif
|
||||
</td>
|
||||
<td>{{ $user->email_verified_at ? 'Yes' : 'No' }}</td>
|
||||
<td class="text-right"><a class="hd-action hd-action-blue hd-action-sm" href="{{ route('user-management.edit', $user) }}">Edit</a></td>
|
||||
</tr>
|
||||
@empty
|
||||
<tr><td colspan="5" class="text-center text-zinc-500">No users found.</td></tr>
|
||||
@endforelse
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="p-4">{{ $users->links() }}</div>
|
||||
</section>
|
||||
</div>
|
||||
</x-layouts::app>
|
||||
Reference in New Issue
Block a user