@php $pct = $coverage['percent']; $ryg = $pct >= 60 ? '#16a34a' : ($pct >= 40 ? '#d97706' : '#dc2626'); @endphp

ERP Module Coverage · automation initiative progress

@unless ($hasModules)
No ERP modules yet. Use Pull from code or + Add top-level below to get started.
@endunless {{-- Overview --}}
{{ rtrim(rtrim(number_format($pct,1),'0'),'.') }}%
ERP modules automated
{{ $coverage['leaf_automated'] }}/{{ $coverage['leaf_total'] }}
Pages with a linked test
{{-- Module tree --}}

ERP Modules

@if ($canManage) @if (! $editing) @else @if ($hasModules)@endif @endif @endif
@if ($canManage && $editing && $addingUnder === -1)
@endif @forelse ($coverage['modules'] as $m)
@if ($m['is_leaf']){{ $m['label'] }}@else{{ $m['label'] }}@endif @if ($m['is_leaf']) {{ $m['automated'] ? '✓ '.$m['case_count'].' test'.($m['case_count']===1?'':'s') : 'not automated' }} @if ($canManage)@endif @endif @if ($canManage && $editing) @endif
{{-- Inline add sub-item --}} @if ($canManage && $editing && $addingUnder === $m['id'])
@endif @empty
No modules yet — “Pull from code” or “+ Add top-level”.
@endforelse
@if ($canManage && $editing)

Tip: + adds a sub-item under a row · ↑ ↓ reorder within the same level · removes it (and anything under it). Click Save when done.

@endif
{{-- Link-tests modal (patterned on the Automation Tracker) --}} @php $mapItem = $mappingFor ? collect($coverage['modules'])->firstWhere('id', $mappingFor) : null; @endphp @if ($canManage && $mapItem)
Automated tests · {{ $mapItem['label'] }}
@if (count($mapItem['cases']))
@foreach ($mapItem['cases'] as $c) @php $d = $c['status']==='PASS'?'p':($c['status']==='FAIL'?'f':($c['status']==='SKIP'?'s':'')); @endphp {{ $c['name'] }} @endforeach
@else

No test cases linked yet.

@endif
@forelse ($picker as $c) @empty No matching unlinked test cases. @endforelse
@if ($pickerTotal > count($picker))

Showing {{ count($picker) }} of {{ $pickerTotal }} — refine your search.

@endif
@endif