Aesthetic Fixes
This commit is contained in:
@@ -86,7 +86,7 @@ class UserController extends Controller
|
||||
'company_name' => ['nullable', 'string', 'max:255'],
|
||||
'contact_person' => ['nullable', 'string', 'max:255'],
|
||||
'tin_number' => ['nullable', 'string', 'max:255'],
|
||||
'spatie_role' => ['nullable', 'string', Rule::in(['Super Admin', 'Owner', 'Contractor', 'Project Manager', 'Designer', 'Site Technical', 'Construction Supervisor'])],
|
||||
'spatie_role' => ['nullable', 'string', Rule::in(['Super Admin', 'Contractor', 'Project Manager', 'Designer', 'Site Technical', 'Construction Supervisor'])],
|
||||
]);
|
||||
|
||||
// Resolve contractor_id: contractor admins always use their own;
|
||||
@@ -183,7 +183,7 @@ class UserController extends Controller
|
||||
'company_name' => ['nullable', 'string', 'max:255'],
|
||||
'contact_person'=> ['nullable', 'string', 'max:255'],
|
||||
'tin_number' => ['nullable', 'string', 'max:255'],
|
||||
'spatie_role' => ['nullable', 'string', Rule::in(['Super Admin', 'Owner', 'Contractor', 'Project Manager', 'Designer', 'Site Technical', 'Construction Supervisor'])],
|
||||
'spatie_role' => ['nullable', 'string', Rule::in(['Super Admin', 'Contractor', 'Project Manager', 'Designer', 'Site Technical', 'Construction Supervisor'])],
|
||||
]);
|
||||
|
||||
$userData = [
|
||||
@@ -350,7 +350,7 @@ class UserController extends Controller
|
||||
continue;
|
||||
}
|
||||
|
||||
$allowedRoles = ['Super Admin', 'Owner', 'Contractor', 'Project Manager', 'Designer', 'Site Technical', 'Construction Supervisor'];
|
||||
$allowedRoles = ['Super Admin', 'Contractor', 'Project Manager', 'Designer', 'Site Technical', 'Construction Supervisor'];
|
||||
$resolvedRole = in_array($role, $allowedRoles) ? $role : 'Designer';
|
||||
|
||||
// Map the Spatie role to the base user_type
|
||||
|
||||
Reference in New Issue
Block a user