@extends('backend.layouts.app') @section('title', $title) @push('styles') @endpush @section('content')
{{ $title }}
@can('agent-commission-rules-manage') {{ __('Commission Rules') }} @endcan
@include('backend.agent.partials._filter') {{-- Agents Table --}}
@can('agent-manage') @endcan @forelse($agents as $agent) @php $statusColor = $agent->status->color(); @endphp @can('agent-manage') @endcan @empty @endforelse
{{ __('Agent Info') }} {{ __('User | Agent Code') }} {{ __('Status') }} {{ __('Performance') }} {{ __('Time') }}{{ __('Action') }}
Agent Logo
{{ $agent->agent_name }}
{{ $agent->user?->email ?? $agent->user?->phone }}
{{ $agent->agent_code }}
{{ $agent->status->label() }}
{{ __('Volume') }}: {{ getSymbol($agent->currency?->code) }}{{ number_format((float) ($agent->completed_volume ?? 0), (int) setting('site_decimal', 2)) }}
{{ __('Commission') }}: {{ getSymbol($agent->currency?->code) }}{{ number_format((float) ($agent->earned_commission ?? 0), (int) setting('site_decimal', 2)) }}
{{ __('Currencies') }}: {{ $agent->supportedCurrencies->pluck('code')->implode(', ') ?: $agent->currency?->code }}
{{ $agent->created_at->format('Y-m-d H:i') }}
{{ $agent->created_at->diffForHumans() }}
@php $isPending = ($agent->status === \App\Enums\AgentStatus::PENDING); $btnText = $isPending ? __('Review Request') : __('Manage Agent'); $btnIcon = $isPending ? 'fa-clipboard-check' : 'fa-gear'; @endphp @include('backend.agent.partials._review_modal')
{{ $agents->links() }}
@endsection