Team Roster Feature
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-06-08 17:45:15 +08:00
parent 3cb68bc6b0
commit 32c3e3af69
26 changed files with 1170 additions and 371 deletions

View File

@@ -25,7 +25,7 @@ class TaskController extends Controller
$project->load([
'milestones' => fn ($q) => $q->orderBy('sort_order'),
'tasks' => fn ($q) => $q->with([
'users:id,ulid,name',
'users:id,ulid,name,profile_picture',
'milestone:id,ulid,name',
'taskMaterials.material' => function ($query) {
$query->select('id', 'ulid', 'name', 'unit', 'unit_cost', 'type')
@@ -41,8 +41,11 @@ class TaskController extends Controller
});
$employees = User::whereIn('user_type', ['admin', 'employee'])
->whereHas('projects', function ($q) use ($project) {
$q->where('projects.id', $project->id);
})
->with('employeeProfile')
->select('id', 'ulid', 'name', 'email')
->select('id', 'ulid', 'name', 'email', 'profile_picture')
->get();
$availableMaterials = \Modules\MaterialLogistics\Models\ProjectInventory::where('project_id', $project->id)