feat: initialize agentic development kit with workflow, skill, and agent definitions and add foundational module controllers and components
This commit is contained in:
@@ -304,6 +304,16 @@ class MaterialRequisitionController extends Controller
|
||||
// tenant scope so a site user can submit a request for an assigned
|
||||
// project even when the approver belongs to another tenant context.
|
||||
$approverIds = \App\Models\User::withoutGlobalScopes()
|
||||
->where('user_type', '!=', 'contractor')
|
||||
->whereDoesntHave('roles', function ($roleQuery) {
|
||||
$roleQuery->whereIn('name', [
|
||||
'Contractor Admin',
|
||||
'Contractor',
|
||||
'Subcontractor Staff',
|
||||
'Site Technical',
|
||||
'Construction Supervisor',
|
||||
]);
|
||||
})
|
||||
->where(function ($query) {
|
||||
$query->whereHas('roles', function ($roleQuery) {
|
||||
$roleQuery->whereIn('name', [
|
||||
@@ -311,13 +321,9 @@ class MaterialRequisitionController extends Controller
|
||||
'project_manager',
|
||||
'Super Admin',
|
||||
'admin',
|
||||
'Main Contractor Admin',
|
||||
]);
|
||||
})
|
||||
->orWhere('user_type', 'admin')
|
||||
->orWhereHas('permissions', function ($permissionQuery) {
|
||||
$permissionQuery->where('name', 'approve_mr');
|
||||
});
|
||||
->orWhere('user_type', 'admin');
|
||||
})
|
||||
->where('status', 'active')
|
||||
->pluck('id')
|
||||
|
||||
Reference in New Issue
Block a user