@extends('layouts.shell') @section('title', 'Broadcasters') @section('subtitle', 'Review accounts, login details, wallet, and poster rules') @section('actions') + Add Broadcaster @endsection @section('content') @php $tabs = ['pending' => 'Pending', 'approved' => 'Approved', 'rejected' => 'Rejected', 'suspended' => 'Suspended']; $counts = $statusCounts ?? []; $search = $search ?? ''; @endphp
@if ($search !== '') Clear @endif
{{ $tabs[$status] ?? 'Broadcasters' }} {{ $broadcasters->total() }} account{{ $broadcasters->total() === 1 ? '' : 's' }}
@forelse ($broadcasters as $broadcaster) @php $profile = $broadcaster->broadcasterProfile; $photo = $profile?->photoUrl(); $balance = (int) ($broadcaster->wallet?->balance ?? 0); $state = $broadcaster->account_status?->value; $password = $broadcaster->login_password; $location = trim(implode(', ', array_filter([ $profile?->city?->name, $profile?->province?->name, ]))); $followers = $profile && method_exists($profile, 'totalFollowers') ? $profile->totalFollowers() : (int) ($profile?->total_followers ?? 0); @endphp @empty @endforelse
Broadcaster Phone Password Followers Wallet Status Actions
@if ($photo) @else {{ strtoupper(substr($broadcaster->name ?: 'B', 0, 1)) }} @endif
{{ $broadcaster->name }}
@if ($profile?->username) {{ '@'.$profile->username }} @endif @if ($location !== '') ยท {{ $location }} @endif
@if ($profile?->whatsapp || $profile?->facebook_page_link)
@if ($profile?->whatsapp) WhatsApp @endif @if ($profile?->facebook_page_link) Facebook @endif
@endif
{{ $broadcaster->phone }} @if (filled($password)) {{ $password }} @else Not saved yet @endif {{ number_format($followers) }} {{ number_format($balance) }} {{ $state }}
{{ $broadcaster->requires_poster_approval ? 'Admin approves posters' : 'Posters go live' }}
Edit @if ($state !== 'approved')
@csrf
@endif @if ($state === 'approved')
@csrf @if ($broadcaster->requires_poster_approval) @else @endif
@endif @if ($state === 'pending')
Reject
@csrf
@endif @if ($state !== 'suspended')
Suspend
@csrf
@endif
Wallet
@csrf
Password
@csrf
No {{ $tabs[$status] ?? '' }} broadcasters.
@if ($broadcasters->hasPages())
Page {{ $broadcasters->currentPage() }} of {{ $broadcasters->lastPage() }}
@if ($broadcasters->onFirstPage()) Previous @else Previous @endif @if ($broadcasters->hasMorePages()) Next @else Next @endif
@endif
@endsection @push('scripts') @endpush