feat: initialize agentic development kit with workflow, skill, and agent definitions and add foundational module controllers and components

This commit is contained in:
2026-08-15 14:16:37 +08:00
parent b98951f65f
commit 9c0143d70d
251 changed files with 40623 additions and 236 deletions

View File

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