{{-- B2B tenancy — operator landing: "is my licence paying off?" Seat economics (bought vs assigned vs ACTIVE), an actionable attention rollup, and per-class cards (avg maxile + band, on/under/over-target, activity, teacher). --}} @php($d = $this->getData()) @php($s = $d['seats']) @php($a = $d['attention']) @php($k = $d['kpis'])

{{ $d['org']->displayName() }}

{{-- ── Licence + health: one compact row of stat tiles ────────────────── --}}
@php($tiles = [ ['Seats', $s['assigned'] . ' / ' . $s['bought'], null], ['Active 14d', $s['active_14d'], 'primary'], ['Utilisation', $s['util_pct'] . '%', 'primary'], ['Renews', ! is_null($s['expiry_days']) ? $s['expiry_days'] . 'd' : '—', (! is_null($s['expiry_days']) && $s['expiry_days'] <= 30) ? 'danger' : null], ['Inactive 14d', $a['inactive_14d'], $a['inactive_14d'] > 0 ? 'danger' : null], ['Under target', $a['under_target'], $a['under_target'] > 0 ? 'danger' : null], ['Teachers', $k['teachers'], null], ]) @foreach ($tiles as [$label, $value, $tone])
$tone === 'danger', 'border-gray-200 dark:border-gray-700' => $tone !== 'danger', ])> {{ $label }} $tone === 'primary', 'text-danger-700' => $tone === 'danger', 'text-gray-900 dark:text-white' => $tone === null, ])>{{ $value }}
@endforeach
@if ($s['remaining'] > 0)
{{ $s['remaining'] }} seat{{ $s['remaining'] === 1 ? '' : 's' }} unassigned — enrol students →
@endif {{-- ── School growth ──────────────────────────────────────────────────── --}}
@include('filament.teacher.atlas.growth', [ 'points' => $d['growth']['points'] ?? [], 'current' => $d['growth']['current'] ?? null, 'color' => '#BF9237', 'label' => 'School median maxile' . (isset($d['growth']['gain']) && ! is_null($d['growth']['gain']) ? ' (+' . $d['growth']['gain'] . ' this term)' : ''), ])
{{-- ── Class cards ────────────────────────────────────────────────────── --}}
Classes ({{ $k['classes'] }})
{{-- ── Recent activity ────────────────────────────────────────────────── --}}
Recent activity
@forelse ($d['activity'] as $item)
@if (! empty($item['url'])) {{ $item['text'] }} @else {{ $item['text'] }} @endif
{{ $item['when']->diffForHumans() }}
@empty
No recent activity.
@endforelse