@php use App\Models\RefundRequest; $canDecide = (bool) ( $availableActions['can_decide'] ?? false ); $statusDetails = match (true) { (bool) $refund->is_completed => [ 'label' => __('Completed'), 'class' => 'bg-success', 'icon' => 'fa-check-circle', 'description' => __('This refund has been completed.'), ], (int) $refund->status === RefundRequest::STATUS_ACCEPTED => [ 'label' => __('Accepted'), 'class' => 'bg-info', 'icon' => 'fa-thumbs-up', 'description' => __( 'This refund was accepted and is awaiting completion.' ), ], (int) $refund->status === RefundRequest::STATUS_DECLINED => [ 'label' => __('Declined'), 'class' => 'bg-danger', 'icon' => 'fa-times-circle', 'description' => __('This refund request was declined.'), ], default => [ 'label' => __('Pending'), 'class' => 'bg-warning text-dark', 'icon' => 'fa-clock', 'description' => __( 'This refund request is waiting for a decision.' ), ], }; @endphp @if($canDecide)
{{ __('Approve this refund request so the financial refund can be completed.') }}
{{ __('Reject this refund request. The buyer will be able to see the decision.') }}
{{ $statusDetails['description'] }}
{{ $statusDetails['label'] }} @if($refund->refund_reference){{ $refund->refund_reference }}