Introduce a shared status badge component and reuse it across resource status views, service cards, and the server navbar. Replace icon-only refresh controls with consistent badge buttons and cover the new status layout with feature tests.
14 lines
461 B
PHP
14 lines
461 B
PHP
@props([
|
|
'status' => 'Stopped',
|
|
'noLoading' => false,
|
|
])
|
|
@php
|
|
if (str($status)->contains('(')) {
|
|
$displayStatus = str($status)->before('(')->trim()->headline()->value();
|
|
} elseif (str($status)->contains(':')) {
|
|
$displayStatus = str(explode(':', $status)[0])->headline()->value();
|
|
} else {
|
|
$displayStatus = str($status)->headline()->value();
|
|
}
|
|
@endphp
|
|
<x-status-badge status="{{ $displayStatus }}" type="error" />
|