Aesthetic Fixes

This commit is contained in:
2026-05-25 17:39:57 +08:00
parent e1cd383ce3
commit 6089bd7efe
32 changed files with 1344 additions and 511 deletions

View File

@@ -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