{{ $project->title }}
@if($project->state == 'PENDING') Pending @elseif($project->state == 'IN_PROGRESS') Inprogress @elseif($project->state == 'COMPLETED') Completed @endifProject No
{{ $project->project_no }}
Budget Allocation
{{ number_format($project->budget, 2) }}LKR
Project Duration
Start Date: {{ \Carbon\Carbon::parse($project->start_date)->format('Y-m-d') }}
Estimated End Date: {{ \Carbon\Carbon::parse($project->end_date)->format('Y-m-d') }}
Project Description
{{ $project->description }}
Administrative Remarks
{{ $project->remark ?? 'No explicit operational adjustments noted.' }}
Project Owner
{{ $project->LongTermProjectOwner ? $project->LongTermProjectOwner->name : '-' }}
Project Leader
{{ $project->LongTermProjectLeader ? $project->LongTermProjectLeader->name : '-' }}
Project Members
@php // Define badge color mapping with order $stakeholderOrder = [ 'PROJECT_OWNER' => 1, 'PROJECT_LEADER' => 2, 'SUPERVISOR' => 3, 'ASSIGNEE' => 4, 'MEMBER' => 5, 'NOTIFICATION_RECIPIENT' => 6, 'OTHERS' => 7, ]; // Define badge color mapping if (!function_exists('getBadgeColor')) { function getBadgeColor($stakeholderType) { $colors = [ 'PROJECT_OWNER' => 'primary', 'PROJECT_LEADER' => 'warning', 'SUPERVISOR' => 'info', 'ASSIGNEE' => 'success', 'MEMBER' => 'danger', 'NOTIFICATION_RECIPIENT' => 'dark', 'OTHERS' => 'secondary', ]; return $colors[$stakeholderType] ?? 'secondary'; } } $projectMembers = $project->LongTermProjectStakeholders ->filter(function($stakeholder) { return !in_array($stakeholder->stakeholder_type, ['PROJECT_OWNER', 'PROJECT_LEADER']); }) ->sortBy(function($stakeholder) use ($stakeholderOrder) { return $stakeholderOrder[$stakeholder->stakeholder_type] ?? 999; }); @endphp @if($projectMembers->count() > 0)Category: {{ ucwords(strtolower(str_replace('_', ' ', $member->stakeholder_category))) }} @endif
-
@endifProject Tasks
@forelse($project->longTermProjectActivities as $activity) @php $totalWeight = 0; $completedWeight = 0; $totalWeight += $activity->activity_weight ?? 0; if ($activity->state === 'COMPLETED') { $completedWeight += $activity->activity_weight ?? 0; } foreach ($activity->longTermProjectSubActivities as $sub) { $totalWeight += $sub->sub_activity_weight ?? 0; if ($sub->state === 'COMPLETED') { $completedWeight += $sub->sub_activity_weight ?? 0; } } $percentage = $totalWeight > 0 ? round(($completedWeight / $totalWeight) * 100) : 0; if ($activity->state === 'COMPLETED') { $percentage = 100; } @endphp{{ $activity->activity_name }}
{{ $activity->activity_description }}
{{ $sub->sub_activity_name }}
LKR {{ number_format($sub->cost, 2) }} @php $stateColors = [ 'PENDING' => 'warning', 'IN_PROGRESS' => 'primary', 'COMPLETED' => 'success', 'DELETED' => 'danger', ]; $stateLabel = ucwords(strtolower(str_replace('_', ' ', $sub->state))); $stateColor = $stateColors[$sub->state] ?? 'secondary'; @endphp {{ $stateLabel }}{{ $sub->sub_activity_description }}
No sub comments
@endforelseNo sub tasks available
@endforelseNo tasks found for this project.
@endforelse