@include('livewire.admin.ads._nav') @if (! $masterEnabled) "All ads" is off on the Ads Earning page, so no placement runs, whatever its switch says. @elseif (! $rewardedEnabled) Rewarded Ads is disabled, so rewarded placements don't run even when switched on here. @endif
@foreach ($placements as $placement) @php($metric = $metrics[$placement->key] ?? null) {{ ucfirst(str_replace('_', '-', $placement->format)) }} @if (! $placement->is_supported) Not supported @else {{ $placement->is_enabled ? 'On' : 'Off' }} {{ $live[$placement->key] ? 'Live in app' : 'Not live' }} @endif @if ($placement->is_supported)
@foreach ($units->where('format', $placement->format) as $unit) @endforeach @if ($placement->format === 'native' && str_contains($placement->key, 'feed')) @foreach (\App\Livewire\Admin\Ads\Placements::FEED_INTERVALS as $interval) @endforeach @endif @if ($placement->format === 'interstitial') @endif @error('rows.'.$placement->id.'.is_enabled')@enderror
Save
@endif @if ($metric)
Requests (7 d)
{{ number_format($metric['requests']) }}
Fill rate
{{ $metric['fill_rate'] === null ? 'โ€”' : $metric['fill_rate'].'%' }}
No-fill / errors
{{ number_format($metric['no_fill']) }} / {{ number_format($metric['errors']) }}
Impressions
{{ number_format($metric['impressions']) }}
Unit status
Unit last loaded: {{ $placement->adUnit?->last_loaded_at?->format('d M Y H:i') ?? 'โ€”' }} ยท updated {{ $placement->updated_at->format('d M Y H:i') }}
@endif
@endforeach