Show suspended servers (#870)

This commit is contained in:
MartinOscar 2025-01-06 01:48:04 +01:00 committed by GitHub
parent 2525af8f02
commit 18fe4f1123
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -458,6 +458,9 @@ class Server extends Model
}
if ($type === ServerResourceType::Time) {
if ($this->isSuspended()) {
return 'Suspended';
}
if ($resourceAmount === 0) {
return 'Offline';
}
@ -484,7 +487,7 @@ class Server extends Model
public function condition(): Attribute
{
return Attribute::make(
get: fn () => $this->status?->value ?? $this->retrieveStatus(),
get: fn () => $this->isSuspended() ? 'Suspended' : $this->status?->value ?? $this->retrieveStatus(),
);
}