@extends('frontend.layout.dashboard-master') @section('site_title', __('Buy Connects')) @section('style') @endsection @section('content') @php $feeType = get_static_option('transaction_fee_type') ?? ''; $feeCharge = get_static_option('transaction_fee_charge') ?? 0; $feeLabel = $feeType === 'percentage' ? $feeCharge . '%' : float_amount_with_currency_symbol($feeCharge); @endphp {{-- Page Header --}}

{{ __('Buy Connects') }}

{{ __('Purchase additional connects for your active subscription') }}

{{ __('Subscriptions') }}
{{-- Active Plan Summary --}}

{{ __('Your Active Plan') }}

{{ __('Current Connects') }}

{{ $total_limit }}

{{ __('Active Plan') }}

{{ $active_subscription->subscription->title ?? __('None') }}

{{ __('Expires') }}

{{ $active_subscription ? \Carbon\Carbon::parse($active_subscription->expire_date)->format('M d, Y') : '—' }}

{{-- Connect Packages --}} @if(count($packages) > 0)

{{ __('Buy Connect Packages') }}

@foreach($packages as $package) @php $base = $package->price; $fee = $feeType === 'percentage' ? $base * $feeCharge / 100 : ($feeCharge > 0 ? $feeCharge : 0); $total = $base + $fee; @endphp
{{ $package->connects }}
{{ __('Connects') }}
{{ float_amount_with_currency_symbol($total) }}
@if($feeCharge > 0)
{{ float_amount_with_currency_symbol($base) }} + {{ $feeLabel }} {{ __('fee') }}
@else
@endif
@endforeach
@endif {{-- Purchase History --}}

{{ __('Connect Purchase History') }}

@if(count($purchases) > 0) @foreach($purchases as $purchase) @endforeach
{{ __('Date') }} {{ __('Connects') }} {{ __('Amount') }} {{ __('Gateway') }} {{ __('Status') }}
{{ $purchase->created_at->format('M d, Y H:i') }} {{ $purchase->connects }} {{ float_amount_with_currency_symbol($purchase->total) }} {{ str_replace('_', ' ', $purchase->payment_gateway) }} @if($purchase->payment_status === 'complete') {{ __('Complete') }} @else {{ __('Pending') }} @endif
@else
{{ __('No connect purchases yet.') }}
@endif
{{-- Buy Connects Modal (vanilla JS) --}} @endsection @section('script') @endsection