@php use App\Models\RefundRequest; use Illuminate\Support\Str; $messages = $refund->messages ->sortBy(function ($message) { return $message->created_at ?? $message->id; }) ->values(); $refundStatus = match (true) { (bool) $refund->is_completed => [ 'label' => __('Completed'), 'class' => 'bg-success', 'icon' => 'fa-check-circle', ], (int) $refund->status === RefundRequest::STATUS_ACCEPTED => [ 'label' => __('Accepted'), 'class' => 'bg-info', 'icon' => 'fa-thumbs-up', ], (int) $refund->status === RefundRequest::STATUS_DECLINED => [ 'label' => __('Declined'), 'class' => 'bg-danger', 'icon' => 'fa-times-circle', ], default => [ 'label' => __('Pending'), 'class' => 'bg-warning text-dark', 'icon' => 'fa-clock', ], }; $canMessage = (bool) ( $availableActions['can_message'] ?? ! $refund->is_completed ); @endphp
{{ __('The refund conversation will appear here.') }}
{{ $refund->refund_reference }}