@extends('backend.layout.exposcale') @section('page_title', 'Ad Accounts') @section('topbar_actions') 9 accounts @endsection @section('content')
Ad Accounts
Status: All
All
Approved
Processing
Disabled
Deleted
Provider: All
All
Gradyn
Rockads
Platform: All
All
Meta
Google
TikTok
Snapchat
@forelse($accounts as $account) @php $name = $account->account_name ?? $account->alias_name ?? ''; $id = $account->external_id ?? ''; $status = strtolower($account->status ?? 'processing'); $platformName = $account->account_platform ?? 'Meta Ads'; // Determine Gradyn vs Rockads using the provider column $platType = $account->provider ?? 'gradyn'; $platLetter = $platType === 'rockads' ? 'R' : 'G'; $mdotLetter = $platType === 'rockads' ? 'R' : 'M'; $platClass = $platType === 'rockads' ? 'acct-plat-r' : 'acct-plat-g'; $mdotStyle = $platType === 'rockads' ? 'style="background:linear-gradient(135deg,#3b82f6,#60a5fa);"' : ''; $feeColor = $platType === 'rockads' ? 'var(--rockads)' : 'var(--gradyn)'; $clientFee = '4.00%'; // fallback / dummy $actualFee = $platType === 'rockads' ? '2.5%' : '1.5%'; // fallback / dummy $currency = $account->currency ?? 'USD'; $balance = (float) ($account->balance ?? 0); $statusClass = 'bpend'; $statusIcon = 'โณ'; $statusText = 'Processing'; if (in_array($status, ['approved', 'active', 'ACTIVE', 'accepted'])) { $statusClass = 'ba'; $statusIcon = 'โœ“'; $statusText = 'Approved'; } elseif (in_array($status, ['disabled', 'suspended', 'inactive'])) { $statusClass = 'br'; $statusIcon = 'โœ—'; $statusText = 'Disabled'; } elseif ($status === 'deleted') { $statusClass = 'br'; $statusIcon = '๐Ÿ—‘'; $statusText = 'Deleted'; } @endphp @empty @endforelse
Account NamePlatformClient FeeFeeCurrencyBalance โ†•StatusActions
{{ $mdotLetter }}
@if(in_array($status, ['disabled', 'suspended', 'deleted'])) {{ $name }} @else {{ $name }} @endif
{{ $platLetter }}{{ $platformName }}
{{ $clientFee }} {{ $actualFee }} {{ $currency }} {{ $currency === 'USD' ? '$' : 'โ‚ฌ' }}{{ number_format($balance, 2) }} {{ $statusIcon }} {{ $statusText }}
No ad accounts found.
@if($pagination['last_page'] > 1)
Showing {{ $pagination['from'] }} to {{ $pagination['to'] }} of {{ $pagination['total'] }} accounts
@if($pagination['current_page'] > 1) « Prev @else « Prev @endif @for($i = 1; $i <= $pagination['last_page']; $i++) @if($i == $pagination['current_page']) {{ $i }} @elseif($i == 1 || $i == $pagination['last_page'] || abs($i - $pagination['current_page']) <= 2) {{ $i }} @elseif($i == 2 || $i == $pagination['last_page'] - 1) ... @endif @endfor @if($pagination['current_page'] < $pagination['last_page']) Next » @else Next » @endif
@endif
Account Activity โ€” entries {{-- Account dropdown - built from $allAccounts passed by index() --}}
Account: All
All
@foreach($allAccounts as $acctItem) @php $aStatus = strtolower($acctItem->status ?? ''); if ($aStatus === 'deleted') continue; $aId = $acctItem->external_id ?? ''; $aName = $acctItem->account_name ?? $acctItem->alias_name ?? $aId; $aPlatform = $acctItem->provider ?? 'gradyn'; $aShort = mb_strlen($aName) > 45 ? mb_substr($aName, 0, 45) . 'โ€ฆ' : $aName; @endphp
{{ $aShort }}
@endforeach
{{-- Type dropdown --}}
Type: All
All
Top-up
Withdrawal
{{-- Currency dropdown - client-side filter over loaded rows --}}
Currency: All
All
EUR
USD
ReferenceAccountPlatformTypeAmountFeeDescriptionDate
Loading activity...
{{-- Activity Pagination --}}
@endsection @section('page_scripts') @endsection