feat: implement core material requisition, project management, and daily reporting modules with workflow validation and automated documentation support.
Some checks failed
Tests / PHP 8.3 (push) Has been cancelled
Tests / PHP 8.4 (push) Has been cancelled
Tests / PHP 8.5 (push) Has been cancelled

This commit is contained in:
2026-08-01 15:38:57 +08:00
parent 4fc58bb979
commit 42ba980f7a
36 changed files with 1588 additions and 150 deletions

View File

@@ -97,7 +97,7 @@ class MaterialRequisitionController extends Controller
return Inertia::render('MaterialLogistics::Requisitions/Form', [
'materials' => $materials,
'materialGroups' => $materialGroups,
'projects' => Project::active()->where('current_wizard_step', '>=', 8)->select('id', 'ulid', 'name', 'code', 'client_name', 'location', 'start_date', 'target_end_date', 'status', 'contract_value')->get(),
'projects' => Project::active()->with('contractor:id,company_name')->select('id', 'ulid', 'name', 'code', 'contractor_id', 'client_name', 'location', 'start_date', 'target_end_date', 'status', 'contract_value')->get(),
'selectedProject' => $selectedProject,
'prefilledItems' => $prefilledItems,
]);
@@ -115,8 +115,8 @@ class MaterialRequisitionController extends Controller
]);
$project = Project::where('ulid', $validated['project_ulid'])->firstOrFail();
if ($project->current_wizard_step < 8) {
return redirect()->back()->with('error', 'Cannot create material requisition: Project estimation is not approved.');
if ($project->current_wizard_step < 7) {
return redirect()->back()->with('error', 'Cannot create material requisition: Project estimation is not submitted or approved.');
}
$workflowService = new ProjectWorkflowService();