{{-- TABS --}}
{{-- ── TAB TARIK SALDO ─────────────────────────────────────── --}} @if($tab === 'withdraw')

Form Tarik Saldo

{{-- Pilih Bank --}}
{{-- Nomor Rekening --}}
{{-- Hasil cek rekening --}} @if($checkResult)
@php $nama = $checkResult['data']['name'] ?? $checkResult['name'] ?? $checkResult['account_name'] ?? null; $ok = !empty($nama); @endphp @if($ok)
✅ {{ $nama }}
Rekening valid
@else
❌ Rekening tidak ditemukan
{{ $checkResult['message'] ?? json_encode($checkResult) }}
@endif
@endif @if($checkMsg)
{{ $checkMsg }}
@endif {{-- Nominal --}}
{{-- Submit --}}
{{-- Cek Status --}}

Cek Status Transaksi

@if($statusMsg)
{{ $statusMsg }}
@endif
{{-- ── TAB RIWAYAT ─────────────────────────────────────────── --}} @elseif($tab === 'history')

Riwayat Penarikan (20 terbaru)

@if(empty($history))
Belum ada transaksi.
@else
@foreach($history as $tx) @endforeach
Transaksi ID Bank Rekening Nominal Status Waktu
{{ $tx['transaksi_id'] ?? '-' }} {{ $tx['bank_code'] }} {{ $tx['account'] }} Rp {{ number_format($tx['amount'],0,',','.') }} @php $st = strtolower($tx['status'] ?? 'pending'); $stColor = match(true) { in_array($st,['success','sukses','completed']) => 'background-color:rgba(34,197,94,0.12); color:#22c55e;', in_array($st,['failed','gagal','error']) => 'background-color:rgba(244,63,94,0.12); color:#f43f5e;', default => 'background-color:rgba(245,158,11,0.12); color:#f59e0b;' }; @endphp {{ strtoupper($tx['status'] ?? 'PENDING') }} {{ \Carbon\Carbon::parse($tx['created_at'])->format('d M Y H:i') }}
@endif
{{-- ── TAB PRODUK ───────────────────────────────────────────── --}} @elseif($tab === 'products')

Produk H2H RumahOTP

@if(empty($products))
Tidak ada data produk.
@if($productDebug)
{{ $productDebug }}
@endif
@else
@foreach((array)$products as $p) @endforeach
ID Nama Harga Status
{{ $p['service_id'] ?? $p['id'] ?? $p['code'] ?? '-' }} {{ $p['name'] ?? $p['nama'] ?? '-' }} @php $harga = $p['price'] ?? $p['harga'] ?? null; @endphp {{ $harga !== null ? 'Rp ' . number_format($harga, 0, ',', '.') : '-' }} @php $active = $p['is_active'] ?? $p['status'] ?? 1; @endphp {{ $active ? 'Aktif' : 'Nonaktif' }}
@endif
@endif