@csrf
@php $hasNoAccounts = false; $isAdminProfile = session('activeProfileType') === 'App\Models\Admin'; if ($isAdminProfile) { $hasNoAccounts = true; } elseif (getActiveProfile() && method_exists(getActiveProfile(), 'accounts')) { $hasNoAccounts = getActiveProfile()->accounts()->notRemoved()->count() === 0; } @endphp @if($hasNoAccounts)

{{ __('No accounts available') }}

@if($isAdminProfile) {{ __('Admin profiles do not have accounts and cannot make payments. Please switch to a different profile to make payments.') }} @else {{ __('Your profile does not have any accounts to make payments from. Please contact an administrator to set up an account.') }} @endif

@endif
@livewire('amount', [ 'maxLengthHoursInput' => timebank_config('maxLengthHoursInput.user'), 'hours' => $hours, 'minutes' => $minutes, 'amount' => $amount, ]) @error('amount') @enderror @livewire('from-account') @error('fromAccountId') @enderror @livewire('to-account', ['toHolderName' => $toHolderName, 'toAccountId' => $toAccountId]) @error('toAccountId') @enderror
@error('description') @enderror @livewire('transaction-type-radio', ['type' => $type, 'typeOptions' => $typeOptions]) @error('transactionTypeSelected.name') @enderror
{{ __('Pay') }}
{{ __('Payment limit') }} {{ $limitError }} {{ __('Back') }} @if (!$limitError && !empty($transactionTypeSelected)) {{ __('Confirm your payment') }}
{{ __('Description') }}
{{ $description }}
{{ session('activeProfileName') }}
{{ $toHolderName }}
{{ session('activeProfileName') }}
{{ __(ucfirst(strtolower($fromAccountName))) }} {{ __('bank account')}}
{{ tbFormat($amount) }}
{{ __($transactionTypeSelected['label']) }}
{{ $toHolderName }}
{{ __(ucfirst($toAccountName)) }} {{ __('bank account')}}
@if (session('error'))
{{ session('error') }}
@endif
@if (session('error')) {{ __('Back') }} @else {{ __('Cancel') }} {{ __('Pay') }} @endif
@endif