test: implement role-based access control tests and user management module structure
This commit is contained in:
@@ -58,9 +58,12 @@ class UserController extends Controller
|
||||
$nextNumber = $last ? ((int) substr($last, 4)) + 1 : 1;
|
||||
$nextCode = 'EMP-' . str_pad($nextNumber, 4, '0', STR_PAD_LEFT);
|
||||
|
||||
$roles = \Spatie\Permission\Models\Role::orderBy('name')->pluck('name');
|
||||
|
||||
return Inertia::render('UserManagement::Users/Create', [
|
||||
'isSuperAdmin' => $isSuperAdmin,
|
||||
'nextEmployeeCode' => $nextCode,
|
||||
'roles' => $roles,
|
||||
'contractors' => $isSuperAdmin
|
||||
? Contractor::where('status', 'active')
|
||||
->orderBy('company_name')
|
||||
|
||||
Reference in New Issue
Block a user