@extends('layouts.app', ['pageTitle' => 'Users', 'pageSubtitle' => 'Manage user status and role. Registration only creates users.'])
@section('content')
<div class="card"><h3 class="section-title">System Users</h3><div class="table-wrap"><table><thead><tr><th>Name</th><th>Email</th><th>Department</th><th>Position</th><th>Current Role</th><th>Status</th><th>Update</th></tr></thead><tbody>@foreach($users as $u)<tr><td>{{ $u->name }}</td><td>{{ $u->email }}</td><td>{{ $u->department }}</td><td>{{ $u->position }}</td><td><span class="badge blue">{{ $u->role }}</span></td><td>{{ $u->status }}</td><td><form method="POST" action="{{ route('admin.users.update', $u->id) }}" class="actions">@csrf<select name="role"><option value="user" @selected($u->role==='user')>User</option><option value="admin" @selected($u->role==='admin')>Admin</option></select><select name="status"><option value="active" @selected($u->status==='active')>Active</option><option value="inactive" @selected($u->status==='inactive')>Inactive</option><option value="suspended" @selected($u->status==='suspended')>Suspended</option></select><button class="btn btn-small" type="submit">Save</button></form></td></tr>@endforeach</tbody></table></div></div>
@endsection
