{{ $milestone['name'] }}

{{ $milestone['description'] }}

Notification

Dear {{ $milestone['project_owner']['name'] }},

You have been assigned as the new custodian for the milestone {{ $milestone['name'] }}. Below are the milestone details and the current progress:

@php $milestoneTotalWeight = $milestone['weight']; $milestoneTotalProgress = isset($milestone['progresses']) && is_array($milestone['progresses']) ? array_sum(array_column($milestone['progresses'], 'progress')) : 0; $milestoneCompletion = $milestoneTotalWeight > 0 ? ($milestoneTotalProgress / $milestoneTotalWeight) * 100 : 0; @endphp

Milestone: {{ $milestone['description'] }} - Contributes {{ $milestone['weight'] }}% to the project.

@if(isset($milestone['progresses']) && is_array($milestone['progresses']))

Progress Details:

@php $totalMilestoneProgress = 0; @endphp @foreach($milestone['progresses'] as $progress)

Progress: {{ round(($progress['progress'] / $milestone['weight']) * 100, 2) }}% of the milestone.

Description: {{ $progress['description'] }}

Challenges: {{ $progress['challenges'] ?? 'No registered challenges' }}

Updated on: {{ \Carbon\Carbon::parse($progress['created_at'])->isoFormat('dddd D MMM YYYY') }}

@if(isset($progress['evidence']) && !empty($progress['evidence'])) @endif
@endforeach

Total Milestone Progress: {{ round($milestoneCompletion, 2) }}%

@else

No progress recorded for this milestone.

@endif