feat: implement core material requisition, project management, and daily reporting modules with workflow validation and automated documentation support.
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user