@extends('layouts.layout-horizontal') @section('title', 'User Management') @section('content')
| # | Name | Role | Company Access | Actions | |
|---|---|---|---|---|---|
| {{ $loop->iteration }} | {{ $user->name }} | {{ $user->email }} | @php $roleBadges = [ 'admin' => 'bg-danger', 'ca' => 'bg-primary', 'cash' => 'bg-dark', 'manager' => 'bg-info', 'viewer' => 'bg-secondary', ]; @endphp {{ strtoupper($user->role) }} | @php $allowedCompanies = $user->getAllowedCompanies(); @endphp @if ($user->role === 'admin') All Companies @else @foreach ($allowedCompanies as $company) {{ $company->name }} @endforeach @endif |