@unless ($this->isAccountsOnlyScope)
@endunless
@if ($search) @endif
{{ __('Search') }}
@foreach ($this->typeOptions as $type) @endforeach
@foreach ($this->activeOptions as $status) @endforeach
@foreach ($this->emailVerifiedOptions as $status) @endforeach
{{-- Sortable ID column --}} {{-- Sortable Language column --}} {{-- Sortable User Name column --}} {{-- Sortable Type column --}} {{-- Sortable Comment column --}} {{-- Non-sortable Action columns --}} @forelse ($profiles as $profile) @empty @endforelse
{{ __('Id') }} @if ($sortField === 'id') @endif
{{ __('Name') }} @if ($sortField === 'name') @endif
{{ __('Type') }} @if ($sortField === 'type') @endif
{{ __('Comment') }} @if ($sortField === 'comment') @endif
{{ __('Active') }} @if ($sortField === 'inactive') @endif
{{ __('Conf.') }} @if ($sortField === 'email_verif') @endif
{{ __('Last login') }} @if ($sortField === 'last_login_at') @endif
{{ __('Created') }} @if ($sortField === 'created_at') @endif
{{ __('Actions') }}
{{ $profile->id }} @if ($profile->profile_photo_path)
profile
@endif
{{ $profile->name }}
{{ $profile->full_name }}
{{ $profile->type }}
{{ $profile->comment }}
@if ($profile->deleted === __('yes'))
{{ __('removed') }}
@elseif ($profile->deleted === __('planned'))
{{ __('removing') }}
@elseif ($profile->inactive == __('no')) {{ __('yes') }} @elseif ($profile->inactive == __('yes'))
{{ __('no') }}
@else
{{ __('pausing') }}
@endif
@if ($profile->email_suppressed)
{{ __('Blocked') }}
@elseif ($profile->email_verif == __('yes')) {{ __('yes') }} @else
{{ $profile->email_verif }}
@endif
@if ($profile->last_login_at) {{ \Carbon\Carbon::createFromTimeStamp(strtotime($profile->last_login_at), config('app.timezone'))->diffForHumans() }} @endif @if ($profile->created_at) {{ \Carbon\Carbon::createFromTimeStamp(strtotime($profile->created_at), config('app.timezone'))->diffForHumans() }} @endif
@unless ($this->isAccountsOnlyScope) @if ($profile->deleted === __('yes')) {{-- Show restore button for deleted profiles --}} @else {{-- Show delete button for active profiles --}} @endif @endunless
{{ __('No results found') }}
@if($profiles->hasPages())
{{ __('per page') }}
{{ $profiles->links('livewire.long-paginator') }}
@endif @if ($editAccounts) {{ __('Accounts') . ' ' . class_basename($editAccounts['model']) . ' ' . $editAccounts['id'] }}
{{-- Photo on the left --}}
@if ($editAccounts['profile_photo_path'])
profile
@else {{-- Optional: Placeholder if no photo --}}
@endif
{{ $initAccounts['name'] }}
{{ $initAccounts['full_name'] }}
{{ $initAccounts['location'] }}
{{ App\Models\Language::where('lang_code', $editAccounts['lang_preference'])->value('flag') }}
{{ __('Last login') . ': ' }}
{{ __('Last update') . ': ' }}
{{ __('Registered') . ': ' }}
@if ($initAccounts['inactive_at'])
{{ __('Inactive') . ': ' }}
@endif @if ($initAccounts['deleted_at'])
{{ __('Deleted') . ': ' }}
@endif
{{ $initAccounts['last_login_at'] ? \Carbon\Carbon::parse($initAccounts['last_login_at'])->diffForHumans() : '-' }}
{{ $initAccounts['last_login_at'] ? \Carbon\Carbon::createFromTimeStamp(strtotime($initAccounts['updated_at']), config('app.timezone'))->diffForHumans() : '-' }}
{{ $initAccounts['created_at'] ? \Carbon\Carbon::createFromTimeStamp(strtotime($initAccounts['created_at']), config('app.timezone'))->diffForHumans() : '-' }}
@if ($initAccounts['inactive_at'])
{{ \Carbon\Carbon::createFromTimeStamp(strtotime($initAccounts['inactive_at']), config('app.timezone'))->diffForHumans() }}
@endif @if ($initAccounts['deleted_at'])
{{ \Carbon\Carbon::createFromTimeStamp(strtotime($initAccounts['deleted_at']), config('app.timezone'))->diffForHumans() }}
@endif
@if (!empty($initAccounts['deleted_at']) && \Carbon\Carbon::parse($editAccounts['deleted_at'])->isPast())
{{ __('Re-activate') }}
@elseif (!empty($initAccounts['inactive_at']) && \Carbon\Carbon::parse($initProfile['inactive_at'])->isPast())
{{ __('Re-activate') }}
@endif
{{-- Header row --}}
{{ __('ID') }}
{{ __('Name') }}
{{ __('Balance') }}
@if (timebank_config('admin_settings.admin_min_limit_edits', false))
{{ __('Min. limit') }}
@endif
{{ __('Max. limit') }}
{{ __('Inactive') }}
@foreach ($editAccounts['accounts'] as $index => $account)
{{-- ID --}}
{{ !empty($account['isNew']) ? __('New') : $account['id'] }}
{{-- Name --}}
{{-- Balance (read-only) --}}
{{ tbFormat($account['balance']) }}
@if (timebank_config('admin_settings.admin_min_limit_edits', false)) {{-- Min. limit --}}
H
@endif {{-- Max. limit --}}
H
{{-- Inactive / Delete / Activate --}}
@if (!empty($account['isNew'])) {{-- New accounts can't be marked inactive yet --}} @elseif ($account['inactiveAt'] && \Illuminate\Support\Carbon::parse($account['inactiveAt'])->isPast())
{{ \Illuminate\Support\Carbon::parse($account['inactiveAt'])->format('Y-m-d') }}
@elseif (empty($account['hasTransactions'])) @else @endif
@endforeach {{-- New account button --}}
{{ __('New account') }} {{-- Reverse transaction (Bank profiles only) — looks up a transaction by ID across ALL of this profile's accounts, rather than a per-account button. --}} @if (getActiveProfileType() === 'Bank') {{ __('Reverse transaction') }} @endif
{{ __('Profile balance limits') }}
@if (timebank_config('admin_settings.admin_min_limit_edits', false))
{{ __('Min. limit') }} H
@endif
{{ __('Max. limit') }} H
{{ __('Sum of all accounts') }}
{{ tbFormat($editAccounts['totals']['sumBalances']) }}
{{ __('Receivable limit') }}
{{ !empty($editAccounts['accounts'][0]) ? tbFormat($editAccounts['accounts'][0]['limitReceivable']) : '-' }}
{{ __('Total transfers (ever)') }}
{{ $editAccounts['totals']['transfers'] }} @if ($editAccounts['totals']['transfers'] > 0) ({{ $editAccounts['totals']['transfersGiven'] }} {{ __('paid') }}, {{ $editAccounts['totals']['transfersReceived'] }} {{ __('received') }}) @endif
{{ __('Transfers') }} {{ __(timebank_config('account_info.account_totals.countTransfersSince_humanReadable')) }}
{{ $editAccounts['totalsPastYear']['transfers'] }} @if ($editAccounts['totalsPastYear']['transfers'] > 0) ({{ $editAccounts['totalsPastYear']['transfersGiven'] }} {{ __('paid') }}, {{ $editAccounts['totalsPastYear']['transfersReceived'] }} {{ __('received') }}) @endif
{{ __('Last transfer') }}
@if (empty($editAccounts['totals']['lastTransferDate'])) {{ __('No transfers yet') }} @else {{ \Carbon\Carbon::createFromTimeStamp(strtotime($editAccounts['totals']['lastTransferDate']), config('app.timezone'))->diffForHumans() }} ({{ $editAccounts['totals']['lastTransferDate'] }}) @endif
@if ($editAccountsChanged)
{{ __('The profile owner will be notified about this update.') }}
{{ __('This update can not be undone!') }}
@endif {{-- Warning: accounts with balance being marked inactive --}} @php $inactiveWithBalance = collect($editAccounts['accounts'])->filter( fn($a) => !empty($a['markInactive']) && ($a['balance'] ?? 0) !== 0 ); @endphp @if ($inactiveWithBalance->isNotEmpty())
@foreach ($inactiveWithBalance as $a)
⚠ {{ __('Account :name still has a balance of :balance. These :currency will become inaccessible once the account is set to inactive.', [ 'name' => account_name($a['rawName']), 'balance' => tbFormat($a['balance']), 'currency' => platform_currency_name_plural(), ]) }}
@endforeach
@endif
{{ __('Cancel') }} {{ __('Save') }} @endif @if ($modalReversal) {{ __('Issue Reversal') }}

{{ __('Enter the number of the incorrect transaction to reverse. Only transactions belonging to this profile can be looked up. Two new transactions will be created: the recipient will pay the amount back to the bank, and the bank will pay the corrected amount to the sender.') }}

{{ __('Look up') }}
@if ($reversalLookupError)

{{ $reversalLookupError }}

@endif
@if ($reversalSelectedTransactionId)
{{ __('Transaction #:id', ['id' => $reversalSelectedTransactionId]) }}
{{ $reversalCreatedAt }}
{{ tbFormat((int) $reversalAmount) }} ({{ $reversalDirection }})
@if ($reversalSenderName && $reversalRecipientName)
{{ __('This reversal will take the amount back from :recipient and return it to :sender.', ['recipient' => $reversalRecipientName, 'sender' => $reversalSenderName]) }}
@endif

{{ __('A reversal always covers the full amount of the transaction.') }}

@foreach ($reversalRequesterOptions as $option) @endforeach
{{ $reversalDescription }}
{{ __('The profile will be notified about this reversal.') }}
{{ __('This action can not be undone!') }}
@endif
{{ __('Cancel') }} {{ __('Issue Reversal') }}
@endif @if ($editProfile) {{ __('Profile info') . ': ' . class_basename($editProfile['model']) . ' ' . $editProfile['id'] }}
{{-- Photo on the left --}}
@if ($editProfile['profile_photo_path'])
profile
@else {{-- Optional: Placeholder if no photo --}}
@endif
{{ $initProfile['name'] }}
{{ $initProfile['full_name'] }}
{{ $initProfile['location'] }}
{{ App\Models\Language::where('lang_code', $editProfile['lang_preference'])->value('flag') }}
{{ __('Last login') . ': ' }}
{{ __('Last update') . ': ' }}
{{ __('Registered') . ': ' }}
@if ($initProfile['inactive_at'])
{{ __('Inactive') . ': ' }}
@endif @if ($initProfile['deleted_at'])
{{ __('Deleted') . ': ' }}
@endif
{{ $initProfile['last_login_at'] ? \Carbon\Carbon::parse($initProfile['last_login_at'])->diffForHumans() : '-' }}
{{ $initProfile['last_login_at'] ? \Carbon\Carbon::createFromTimeStamp(strtotime($initProfile['updated_at']), config('app.timezone'))->diffForHumans() : '-' }}
{{ $initProfile['created_at'] ? \Carbon\Carbon::createFromTimeStamp(strtotime($initProfile['created_at']), config('app.timezone'))->diffForHumans() : '-' }}
@if ($initProfile['inactive_at'])
{{ \Carbon\Carbon::createFromTimeStamp(strtotime($initProfile['inactive_at']), config('app.timezone'))->diffForHumans() }}
@endif @if ($initProfile['deleted_at'])
{{ \Carbon\Carbon::createFromTimeStamp(strtotime($initProfile['deleted_at']), config('app.timezone'))->diffForHumans() }}
@endif
@if (!empty($initProfile['deleted_at']) && \Illuminate\Support\Carbon::parse($editProfile['deleted_at'])->isPast())
{{ __('Re-activate') }}
@elseif (!empty($initProfile['inactive_at']) && \Illuminate\Support\Carbon::parse($initProfile['inactive_at'])->isPast())
{{ __('Re-activate') }}
@endif
{{ __('Username') }}
{{ __('Full name') }}
@if (isset($editProfile['modelClass']) && $editProfile['modelClass'] === 'App\Models\Bank')
{{ __('Bank level') }}
@endif
@if ($editProfile['email_verified_at'])
{{ __('Email') }}
@else
{{ __('Email (not verified)') }}
@endif
@php $emailPending = $editProfile['email_suppression_pending'] ?? null; $emailIsSuppressed = $emailPending !== null ? $emailPending : ($editProfile['email'] ? \App\Models\MailingBounce::isSuppressed($editProfile['email']) : false); @endphp @if ($emailIsSuppressed) @else @endif
{{ __('Message Settings') }}
@if ($editProfile['model'] != 'admin') @endif
@if ($editProfile['model'] != 'admin')
min
@endif
{{ __('Short introduction') }}
{{ __('Long introduction') }}
{{ trans_with_platform('Motivation to @PLATFORM_NAME_SHORT@') }}
{{ __('Website') }}
@if ($editProfile['phone_public']) @if ($editProfile['model'] == 'user')
{{ __('Phone (only public for friends!)') }}
@else
{{ __('Phone (public for ' . platform_users() . ')') }}
@endif @else
{{ __('Phone (not public!)') }}
@endif
{{ __('Admin comments') }}
@if (isset($editProfile['modelClass']) && class_basename($editProfile['modelClass']) === 'Organization')
{{ __('Convert to user profile') }}
@elseif (isset($editProfile['modelClass']) && class_basename($editProfile['modelClass']) === 'User')
{{ __('Convert to organization profile') }}
@endif
@php // Check if there are meaningful changes beyond just comments $meaningfulChanges = false; if ($editProfileChanged) { foreach ($editProfile as $field => $value) { // Skip internal/system fields and comment field if (in_array($field, ['comment', 'model', 'modelClass', 'location', 'email_suppression_pending'])) { continue; } // Check if field exists in initProfile and has changed if (array_key_exists($field, $initProfile)) { $currentVal = (string)$value; $initialVal = (string)($initProfile[$field] ?? ''); if ($currentVal !== $initialVal) { $meaningfulChanges = true; break; } } } } // Also show if message settings changed $shouldShowNotification = $meaningfulChanges || ($editMessageSettingsChanged ?? false); @endphp @if ($shouldShowNotification)
{{ __('The profile owner will be notified about this update.') }} @if (count($editProfileMessages) > 0) @foreach ($editProfileMessages as $message)
{{ $message }}
@endforeach @endif
{{ __('This update can not be undone!') }}
@endif
{{ __('Cancel') }} {{ __('Update') }}
@endif @if ($editAttachProfile) {{ __('Profile links') . ': ' . class_basename($editAttachProfile['model']) . ' ' . $editAttachProfile['id'] }}
{{-- Photo on the left --}}
@if ($editAttachProfile['profile_photo_path'])
profile
@else {{-- Optional: Placeholder if no photo --}}
@endif
{{ $initAttachProfile['name'] }}
{{ $initAttachProfile['full_name'] }}
{{ $initAttachProfile['location'] }}
{{ App\Models\Language::where('lang_code', $initAttachProfile['lang_preference'])->value('flag') }}
{{ __('Last login') . ': ' }}
{{ __('Last update') . ': ' }}
{{ __('Registered') . ': ' }}
@if ($initAttachProfile['inactive_at'])
{{ __('Inactive') . ': ' }}
@endif @if ($initAttachProfile['deleted_at'])
{{ __('Deleted') . ': ' }}
@endif
{{ $initAttachProfile['last_login_at'] ? \Carbon\Carbon::parse($initAttachProfile['last_login_at'])->diffForHumans() : '-' }}
{{ $initAttachProfile['last_login_at'] ? \Carbon\Carbon::createFromTimeStamp(strtotime($initAttachProfile['updated_at']), config('app.timezone'))->diffForHumans() : '-' }}
{{ $initAttachProfile['created_at'] ? \Carbon\Carbon::createFromTimeStamp(strtotime($initAttachProfile['created_at']), config('app.timezone'))->diffForHumans() : '-' }}
@if ($initAttachProfile['inactive_at'])
{{ \Carbon\Carbon::createFromTimeStamp(strtotime($initAttachProfile['inactive_at']), config('app.timezone'))->diffForHumans() }}
@endif @if ($initAttachProfile['deleted_at'])
{{ \Carbon\Carbon::createFromTimeStamp(strtotime($initAttachProfile['deleted_at']), config('app.timezone'))->diffForHumans() }}
@endif
{{ __('Linked profiles') }}
@error('editAttachProfile.profiles')
{{ $message }}
@enderror @foreach ($editAttachProfile['profiles'] as $profileIndex => $profile) @php $isRemoved = !empty($profile['removed']); // For Org/Bank modals the role type is the parent; for User modals it's the linked profile's own type. $roleType = ucfirst($editAttachProfile['model']) === 'User' ? ($profile['type'] ?? '') : ucfirst($editAttachProfile['model']); $roleOptions = match($roleType) { 'Organization' => $orgRoleOptions, 'Bank' => $bankRoleOptions, 'Admin' => $adminRoleOptions, default => [], }; $showRoleSelect = !$isRemoved && count($roleOptions) > 0; @endphp
{{-- Photo spanning both rows --}}
@if ($profile['profile_photo_path'] ?? false) profile @else
@endif
{{-- Name + role stacked --}}
{{ ($profile['username'] ?? '') . ' - ' . ucfirst($profile['name'] ?? '') }}
@if (!$isRemoved) @endif
@if ($showRoleSelect) @php $fixedRole = in_array($roleType, ['User']); @endphp
@foreach ($roleOptions as $opt) @endforeach
@endif
@endforeach
{{ __('Attach new profile') }}
@if (!empty($editAttachProfile['newProfile'])) @php $newProfileModel = class_basename($editAttachProfile['newProfile']['type'] ?? ''); $parentModel = ucfirst($editAttachProfile['model'] ?? ''); $newRoleType = $newProfileModel !== 'User' ? $newProfileModel : $parentModel; $newRoleOptions = match($newRoleType) { 'Organization' => $orgRoleOptions, 'Bank' => $bankRoleOptions, 'Admin' => $adminRoleOptions, default => [], }; @endphp @if (count($newRoleOptions) > 0) @php $newRoleFixed = in_array($newRoleType, ['User']); @endphp
@foreach ($newRoleOptions as $opt) @endforeach @error('editAttachProfile.newProfile.role')

{{ $message }}

@enderror
@endif @endif
{{ __('Admin comments') }}
@if ($editAttachProfileChanged)
{{ __('The profile owner will be notified about this update.') }}
{{ __('This update can not be undone!') }}
@endif
{{ __('Cancel') }} {{ __('Update') }}
@endif @if ($modalRestoreProfile && $restoreProfileData) {{ __('Are you sure?') }}
{{ __('Do you want to restore this profile?') }}
{{-- Profile Info --}}
{{ $restoreProfileData['name'] }}
{{ $restoreProfileData['full_name'] }}
{{ $restoreProfileData['email'] }}
{{ __('Type') }}: {{ $restoreProfileData['type'] }}
{{ __('Deleted') }}:
{{ $restoreProfileData['deletedAt'] }}
{{ __('Time remaining') }}:
{{ $restoreProfileData['timeRemaining'] }}
{{ __('Grace period expires') }}:
{{ $restoreProfileData['gracePeriodExpiry'] }}
{{ __('This profile will be fully restored and the user will be able to log in again. All balance handling preferences will be cleared.') }}
{{ __('Cancel') }} {{ __('Restore profile') }}
@endif @if ($modalDeleteProfile && $deleteProfileData) {{ __('Delete this profile?') }}
{{ __('Are you sure you want to delete this profile? This step is irreversible.') }}
{{-- Profile Info --}}
{{ $deleteProfileData['name'] }}
{{ $deleteProfileData['full_name'] }}
{{ $deleteProfileData['email'] }}
{{ __('Type') }}: {{ $deleteProfileData['type'] }}
{{ trans_with_platform('Once your profile is deleted, all of its balance totals and data will be permanently deleted. All your transactions will be anonymized, also in the online transaction overviews and statements of other @PLATFORM_NAME@ users.') }}
{{-- Account Balances Overview --}} @if($deleteProfileData['accounts'] && count($deleteProfileData['accounts']) > 0)

{{ __('Your accounts') }}

@foreach($deleteProfileData['accounts'] as $account)
{{ $account['name'] }} {{ $account['balanceFormatted'] }}
@endforeach
{{ __('Total balance') }} {{ tbFormat($deleteProfileData['totalBalance']) }}
@endif {{-- Central Bank Warning --}} @if($deleteProfileData['isCentralBank'])
{{ __('Central bank cannot be deleted') }}

{{ __('This is the central bank (level 0) and cannot be removed from the system. Central banks are essential for currency creation and management.') }}

@endif {{-- Final Admin Warning --}} @if($deleteProfileData['isFinalAdmin'])
{{ __('Final administrator cannot be deleted') }}

{{ __('At least one administrator account must remain active in the system.') }}

@endif {{-- Negative Balance Warning --}} @if($deleteProfileData['hasNegativeBalance'])
{{ __('Cannot delete profile with negative balance') }}

{{ __('You must settle all debts before you can delete your profile. Please ensure all your account balances are zero or positive.') }}

@endif {{-- Balance Handling Options --}} @if($deleteProfileData['showBalanceOptions'] && $deleteProfileData['totalBalance'] != 0 && !$deleteProfileData['hasNegativeBalance'] && !$deleteProfileData['isCentralBank'] && !$deleteProfileData['isFinalAdmin'])
@if($balanceHandlingOption === 'donate')
@if($donationExceedsLimit && $donationLimitError)
{{ __('Donation exceeds account limits') }}

{{ $donationLimitError }}

@endif
@endif
@endif @if(!$deleteProfileData['isCentralBank'] && !$deleteProfileData['hasNegativeBalance'] && !$deleteProfileData['isFinalAdmin'])
@endif
{{ __('Cancel') }} {{ __('Delete profile') }}
@endif @if ($modalConvertToOrganization && $convertToOrganizationData) {{ __('Convert to organization profile?') }}
{{ $convertToOrganizationData['name'] }}
{{ $convertToOrganizationData['email'] }}
{{ __('Accounts') }}: {{ $convertToOrganizationData['accountCount'] }}
@if (!empty($convertToOrganizationData['blockingErrors']))
{{ __('Cannot convert — blocking issues:') }}
@foreach ($convertToOrganizationData['blockingErrors'] as $error)
• {{ $error }}
@endforeach
@endif @if (!empty($convertToOrganizationData['warnings']))
{{ __('Warnings:') }}
@foreach ($convertToOrganizationData['warnings'] as $warning)
• {{ $warning }}
@endforeach
@endif @if (empty($convertToOrganizationData['blockingErrors'])) {{-- Manager selection --}}
{{ __('Select organization manager') }} *
{{ __('This will permanently convert the user to an organization profile. All associated data, accounts, posts and relationships will be migrated. This action cannot be undone.') }}
@endif
{{ __('Cancel') }} @if (empty($convertToOrganizationData['blockingErrors'])) {{ __('Convert to organization profile') }} @endif
@endif @if ($modalConvertToUser && $convertToUserData) {{ __('Convert to user profile?') }} {{-- Profile Info --}}
{{ $convertToUserData['name'] }}
{{ $convertToUserData['email'] }}
{{ __('Accounts') }}: {{ $convertToUserData['accountCount'] }}
{{-- Blocking errors --}} @if (!empty($convertToUserData['blockingErrors']))
{{ __('Cannot convert — blocking issues:') }}
@foreach ($convertToUserData['blockingErrors'] as $error)
• {{ $error }}
@endforeach
@endif {{-- Warnings --}} @if (!empty($convertToUserData['warnings']))
{{ __('Warnings:') }}
@foreach ($convertToUserData['warnings'] as $warning)
• {{ $warning }}
@endforeach
@endif @if (empty($convertToUserData['blockingErrors']))
{{ __('This will permanently convert the organization to a user profile. All associated data, accounts, posts and relationships will be migrated. This action cannot be undone.') }}
@endif
{{ __('Cancel') }} @if (empty($convertToUserData['blockingErrors'])) {{ __('Convert to user profile') }} @endif
@endif @push('scripts') @endpush