@extends('backend.payment_link.layout') @section('title', __('Payment Links')) @section('sub_title', __('Payment Links')) @section('sub_icon', 'payment') @section('sub_subtitle', __('Monitor, filter and moderate payment links created by users, merchants and agents.')) @section('sub_content') {{-- Metrics --}}
@lang('Total Links')
{{ number_format((int) ($metrics['total'] ?? 0)) }}
@lang('Active')
{{ number_format((int) ($metrics['active'] ?? 0)) }}
@lang('Inactive')
{{ number_format((int) ($metrics['inactive'] ?? 0)) }}
@lang('Successful Payments')
{{ number_format((int) ($metrics['payments'] ?? 0)) }}
@include('backend.payment_link.partials._filter') {{-- Table --}}
@forelse($paymentLinks as $link) @php $owner = $link->user; $isExpired = $link->isExpired(); $isMaxed = $link->isMaxedOut(); $statusKey = $isExpired ? 'expired' : ($isMaxed ? 'maxed' : $link->status->value); $statusLbl = $isExpired ? __('Expired') : ($isMaxed ? __('Limit Reached') : $link->status->label()); $statusCol = $isExpired || $isMaxed ? 'warning' : $link->status->color(); @endphp @empty @endforelse
# @lang('Title') @lang('Owner') @lang('Merchant') @lang('Amount') @lang('Payments') @lang('Status') @lang('Created') @lang('Actions')
{{ $link->id }}
{{ $link->token }}
@if($owner)
{{ $owner->name }}
@else @lang('Deleted user') @endif
@if($link->merchant) {{ $link->merchant->business_name }} @else — @endif @if($link->isOpenAmount()) @lang('Open')
@if($link->min_amount !== null) {{ __('Min :amt', ['amt' => number_format((float) $link->min_amount,siteDecimalPlaces())]) }} @endif @if($link->max_amount !== null) {{ __('Max :amt', ['amt' => number_format((float) $link->max_amount,siteDecimalPlaces())]) }} @endif
@else {{ $link->currencyCode() }} {{ number_format((float) $link->amount,siteDecimalPlaces()) }} @endif
{{ number_format((int) $link->payments_count) }} @if($link->max_payments) / {{ number_format((int) $link->max_payments) }} @endif {{ $statusLbl }} {{ $link->created_at?->format('d M Y') }} @lang('View')
@if($paymentLinks->hasPages()) @endif
@endsection