@extends('admin.layouts.app') @section('title', 'Manage Users') @section('content')
| Name | Username | Role | Department | Status | Actions |
|---|---|---|---|---|---|
|
{{ strtoupper(substr($user->name, 0, 1)) }}
{{ $user->name }}
|
{{ $user->username ?? '-' }}
|
@php $roleModel = $roles->firstWhere('slug', $user->role); $roleLabel = $roleModel?->name ?: ucfirst($user->role ?? 'user'); $badge = match ($user->role) { 'admin' => 'bg-blue-100 text-blue-700 border border-blue-200', 'ipsrs' => 'bg-green-100 text-green-700 border border-green-200', default => 'bg-gray-100 text-gray-800 border border-gray-200', }; @endphp {{ $roleLabel }} | {{ ucfirst($user->department) }} | {{ $user->status === 1 ? 'Active' : 'Inactive' }} | Edit |