fixed guest consultation shows as unknown to show the guest name

This commit is contained in:
Naser Mansour 2026-01-09 19:44:44 +02:00
parent 0aa1b7f675
commit c1cc24c78d
3 changed files with 4 additions and 4 deletions

View File

@ -327,14 +327,14 @@ new class extends Component
<div class="flex-1">
<div class="flex items-center gap-2 mb-1">
<a href="{{ route('admin.consultations.show', $consultation) }}" class="font-semibold text-zinc-900 hover:text-blue-600" wire:navigate>
{{ $consultation->user?->full_name ?? __('common.unknown') }}
{{ $consultation->getClientName() }}
</a>
<flux:badge size="sm" color="{{ $consultation->consultation_type === \App\Enums\ConsultationType::Paid ? 'indigo' : 'zinc' }}">
{{ $consultation->consultation_type->label() }}
</flux:badge>
</div>
<div class="text-sm text-zinc-500">
{{ $consultation->user?->email ?? '-' }}
{{ $consultation->getClientEmail() }}
</div>
</div>

View File

@ -28,7 +28,7 @@ new class extends Component
@forelse ($pendingBookings as $booking)
<div wire:key="pending-{{ $booking->id }}" class="border-b border-zinc-100 py-2 last:border-0">
<div class="font-medium text-zinc-900">{{ $booking->user?->full_name ?? __('widgets.unknown_client') }}</div>
<div class="font-medium text-zinc-900">{{ $booking->getClientName() }}</div>
<div class="flex items-center gap-2 text-sm text-zinc-500">
<span>{{ $booking->booking_date->translatedFormat('M j') }}</span>
<flux:badge size="sm">{{ $booking->consultation_type->label() }}</flux:badge>

View File

@ -39,7 +39,7 @@ new class extends Component
{{ \Carbon\Carbon::parse($consultation->booking_time)->format('g:i A') }}
</div>
<div class="flex items-center gap-2 text-sm text-zinc-500">
<span>{{ $consultation->user?->full_name ?? __('widgets.unknown_client') }}</span>
<span>{{ $consultation->getClientName() }}</span>
<flux:badge size="sm">{{ $consultation->consultation_type->label() }}</flux:badge>
</div>
</div>