@php
/** @var \App\Models\Order|\Closure|null $record */
if (isset($getRecord) && is_callable($getRecord)) {
$record = $getRecord();
}
if ($record instanceof \Closure) {
$record = $record();
}
@endphp
@if (! $record)
-
@else
@php
$percent = (float) $record->progressPercent();
$color = (string) $record->progressFilamentColor();
$hint = (string) $record->progressHintText();
$barClass = match ($color) {
'success' => 'bg-success-600',
'primary' => 'bg-primary-600',
'warning' => 'bg-warning-600',
'danger' => 'bg-danger-600',
default => 'bg-gray-400',
};
@endphp
Progreso
{{ number_format($percent, 1) }}%
{{ $hint }}
@endif