@extends('layouts.app')
@section('title', 'Refund '.$refund->reference)
@section('content')
{{ $refund->reference }}
{{ $refund->customer?->display_name }} · requested {{ $refund->created_at?->format('d M Y H:i') }}
@if ($refund->status === 'requested')
@endif
@if ($refund->status === 'approved')
@endif
@if (in_array($refund->status, ['requested', 'approved'], true))
@endif
@include('components.kpi', ['label' => 'Amount', 'value' => money($refund->amount), 'variant' => 'info'])
@include('components.kpi', ['label' => 'Status', 'value' => title_case_words($refund->status),
'variant' => $refund->status === 'processed' ? 'good'
: ($refund->status === 'rejected' ? 'bad' : 'warn')])
@include('components.kpi', ['label' => 'Refund via', 'value' => title_case_words($refund->method)])
@include('components.kpi', ['label' => 'Approved by', 'value' => $refund->approver?->name ?: '—'])