{{-- Use the Meta ad-account's OWN currency (persisted from the Graph
API's account_currency, e.g. IDR → Rp) — same source the
analytics page uses. The old `$c->ad_account?->currency` read a
relationship that doesn't exist on MetaCampaign, so it always
fell through to the USD default and mislabeled Rupiah spend. --}}
@php $adCur = strtoupper((string) ($c->insights['account_currency'] ?? '')) ?: \App\Models\SystemSetting::get('default_currency', 'USD'); @endphp
Created: {{ $c->created_at?->format('Y-m-d') }}{{ $c->ad_set_count }} Ad Set(s){{ $c->ad_count }} Ad(s)
@if ($c->facebook_id)
FB ID: {{ \Illuminate\Support\Str::limit($c->facebook_id, 12, '…') }}
@elseif ($c->status !== 'DRAFT')
{{-- Not on Meta: the campaign was saved locally but never created on
the Marketing API, so it can never show spend/impressions (all 0)
even while it reads ACTIVE. Let the user push it now. --}}
{{ __('Not on Meta') }}
@endif
@if ($c->meta_last_error && !$c->facebook_id && $c->status !== 'FAILED')
{{ \Illuminate\Support\Str::limit($c->meta_last_error, 60, '…') }}
@endif
@if ($c->ctwa_enabled)
{{ __('Click-to-WhatsApp') }}
@endif
@empty
@include('user.partials.empty-state', [
'message' =>
'No Meta Ads campaigns match the current filters. Try clearing filters or create a new campaign.',
'resetHref' => url('/meta-ads'),
'actionHref' => route('user.meta-ads.create'),
'actionLabel' => 'Create campaign',
])
@endforelse