@php $money = fn ($amount) => $amount === null ? __('Not available') : $currency.' '.number_format((float) $amount, 2); $cards = [ ['label' => __('Google waiting'), 'value' => number_format($queuedGoogle), 'icon' => 'arrow-down-tray', 'accent' => '#4f46e5', 'sub' => __('Not downloaded yet')], ['label' => __('Meta waiting'), 'value' => number_format($queuedMeta), 'icon' => 'arrow-down-tray', 'accent' => '#0284c7', 'sub' => __('Not downloaded yet')], ['label' => __('Exported'), 'value' => number_format($exported), 'icon' => 'check-circle', 'accent' => '#059669', 'sub' => __('Already downloaded')], ]; $statusColors = ['queued' => 'amber', 'exported' => 'emerald']; @endphp {{ __('Meta CSV') }} {{ __('Google Ads CSV') }}
@foreach ($cards as $m)

{{ $m['label'] }}

{{ $m['value'] }}

{{ $m['sub'] }}
@endforeach

{{ __('Before you import') }}

{{ __('Google Ads') }}

{{ __('In Google Ads, create a conversion action whose name matches the one below, character for character, then upload this file under Goals, Conversions, Uploads. The file is Google\'s click-conversion template: a time-zone row, then Google Click ID, Conversion Name, Conversion Time, Conversion Value and Conversion Currency.') }}

{{ __('Meta') }}

{{ __('In Events Manager, upload the file to your dataset and map click_id, event_name, event_time, value, currency and order_id. event_name is Purchase and event_time is UTC. Meta does not accept a Purchase without a positive value, so fill in any blank value before you upload that row.') }}

{{ __('Downloading the waiting rows marks them exported. Switch the list to Exported and download again if you need the same file; that does not change them.') }}

@forelse ($rows as $row) @empty @endforelse
{{ __('Opportunity') }} {{ __('Platform') }} {{ __('Click ID') }} {{ __('When') }} {{ __('Value') }} {{ __('Status') }}
{{ $row->opportunity?->title ?? __('Unknown') }} {{ __(\App\Models\Crm\OfflineConversion::PLATFORMS[$row->platform] ?? $row->platform) }} {{ $row->click_id }} {{ $row->occurred_at?->timezone(config('app.display_timezone', 'Africa/Harare'))->format('j M Y H:i') }} {{ $money($row->value_base) }} {{ __(\App\Models\Crm\OfflineConversion::STATUSES[$row->status] ?? $row->status) }}
@if ($rows->hasPages())
{{ $rows->links() }}
@endif