@if($actionHistories->count() > 0)
@foreach($actionHistories as $history) @php $historyStatusBadge = match ($history->status) { App\Enums\ScooterActionStatus::SUCCESS => 'success', App\Enums\ScooterActionStatus::FAILED => 'danger', App\Enums\ScooterActionStatus::PENDING => 'warning', App\Enums\ScooterActionStatus::RECEIVED => 'info', default => 'secondary', }; $actionLabelKey = 'admin.scooter_action_' . $history->action; $actionLabel = __($actionLabelKey); $statusLabelKey = 'admin.scooter_action_status_' . $history->status; $statusLabel = __($statusLabelKey); $sourceLabelKey = 'admin.scooter_action_source_' . $history->source; $sourceLabel = __($sourceLabelKey); @endphp @endforeach
# {{ __('admin.action') }} {{ __('admin.status') }} {{ __('admin.source') }} {{ __('admin.actor') }} {{ __('admin.ride_number') }} {{ __('admin.operation_id') }} {{ __('admin.failure_message') }} {{ __('admin.occurred_at') }}
{{ $history->id }} {{ $actionLabel === $actionLabelKey ? ucfirst(str_replace('_', ' ', $history->action)) : $actionLabel }} {{ $statusLabel === $statusLabelKey ? ucfirst($history->status) : $statusLabel }} {{ $sourceLabel === $sourceLabelKey ? ucfirst($history->source) : $sourceLabel }} {{ $history->admin?->name ?? $history->client?->name ?? $history->provider?->name ?? __('admin.system') }} @if($history->ride_id) #{{ $history->ride_id }} @else — @endif {{ $history->operation_id ?? '—' }} {{ $history->failure_message ?? '—' }} {{ $history->occurred_at?->format('Y-m-d H:i:s') ?? '—' }}
@if($actionHistories->hasPages())
{{ $actionHistories->links('pagination::bootstrap-4') }}
@endif @else

{{ __('admin.there_are_no_matches_matching') }}

@endif