{{-- Goal editor — linked-milestones MANAGEMENT list (summary + one row per milestone). Progress bars deliberately live on the Progress tab, not here (review 2026-08-03: chips carrying percent duplicated the Progress view) — this list is for linking/unlinking, RA line-item style. Lives in its own partial so the row-remove hx-post can re-render the WHOLE section (hx-target="#goalMsSection" outerHTML): the summary count stays correct with the removal. Expects: $id, $goalMilestones, $milestoneSummary, $milestones (project milestone options — drives the "link existing" button visibility). --}}
@if (($milestoneSummary['total'] ?? 0) > 0) {{ $milestoneSummary['total'] }} {{ $milestoneSummary['total'] == 1 ? __("goalcanvas.summary_milestone_one") : __("goalcanvas.summary_milestones") }} @if ($milestoneSummary['inProgress'] > 0)· {{ $milestoneSummary['inProgress'] }} {{ __("goalcanvas.summary_in_progress") }} @endif @if ($milestoneSummary['notStarted'] > 0)· {{ $milestoneSummary['notStarted'] }} {{ __("goalcanvas.summary_not_started") }} @endif @if ($milestoneSummary['done'] > 0)· {{ $milestoneSummary['done'] }} {{ __("goalcanvas.summary_done") }} @endif @endif @if ($login::userIsAtLeast($roles::$editor)) @if (count($milestones) > 0) @endif @endif
@if (count($goalMilestones) > 0)
@foreach ($goalMilestones as $ms) @php $msDue = trim((string) ($ms['editTo'] ?? '')); $msDue = ($msDue === '' || str_starts_with($msDue, '0000-00-00')) ? null : $msDue; @endphp {{-- Management row only — status signals (dots/bars) live on the Progress tab (review 2026-08-04). --}}
{{ $ms['headline'] }} @if ($msDue !== null) {{ __('label.due') }} {{ format($msDue)->date() }} @endif @if ($login::userIsAtLeast($roles::$editor)) @endif
@endforeach
@endif