Solicitar repartidor
Rider urgente
Solicitar rider
Saldo
€{{ number_format($restaurant?->wallet_balance ?? 0, 2) }}
Costo entrega
€{{ number_format($restaurant?->delivery_fee ?? 0, 2) }}
@php
$last = $latestDelivery ?? (($allDeliveries ?? collect())->first());
$lastLabel = $last ? ($statusMap[$last->status][0] ?? 'Pendiente') : null;
$lastBadge = $last ? ($statusMap[$last->status][1] ?? 'secondary') : 'secondary';
$lastAgo = $last?->created_at ? $last->created_at->locale('es')->diffForHumans() : null;
$hasCourier = $last && $last->courier;
$courierLine = $hasCourier ? ($last->courier->name ?? 'Repartidor asignado') : 'Sin repartidor';
$courierStatus = $hasCourier
? ($last && $last->status === 'at_restaurant' ? 'Rider en el restaurante' : 'Repartidor en camino')
: ($last && $last->status === 'pending' ? 'Buscando repartidor' : 'Sin asignar');
@endphp
Ultimo pedido
@if ($last)
{{ $lastLabel }}
#{{ $last->id }}
{{ optional($last->created_at)->format('H:i') }}
Urgente
@if ($lastAgo)
Tu ultimo pedido solicitado fue {{ $lastAgo }}.
@endif
{{ $last->customer_name ?? 'Por definir' }}
{{ $last->delivery_address ?? 'Por definir' }}
{{ $courierLine }}
{{ $courierStatus }}
@else
Aun no has solicitado ningun servicio hoy.
@endif
@forelse ($allDeliveries ?? collect() as $delivery)
#{{ $delivery->id }} · {{ $delivery->customer_name ?? 'Por definir' }}
{{ $delivery->delivery_address ?? 'Por definir' }}
{{ $statusMap[$delivery->status][0] ?? 'Pendiente' }}
{{ optional($delivery->created_at)->format('d/m/Y H:i') }}
{{ $delivery->is_urgent ? 'Urgente' : 'Normal' }}
@empty
No hay pedidos hoy.
@endforelse
{{ strtoupper(substr($restaurant?->name ?? 'R', 0, 1)) }}
{{ $restaurant?->name ?? 'Restaurante' }}
{{ $restaurant?->address ?? 'Sin dirección' }}