From eb3a8858d5d06ea160bf44a4175cfb2232e8c026 Mon Sep 17 00:00:00 2001 From: RMartinOscar <40749467+RMartinOscar@users.noreply.github.com> Date: Mon, 6 Jan 2025 00:43:20 +0000 Subject: [PATCH] Show suspended servers --- app/Models/Server.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/app/Models/Server.php b/app/Models/Server.php index 5c58f48ca2..b9a5d409d7 100644 --- a/app/Models/Server.php +++ b/app/Models/Server.php @@ -458,6 +458,9 @@ public function formatResource(string $resourceKey, bool $limit = false, ServerR } if ($type === ServerResourceType::Time) { + if ($this->isSuspended()) { + return 'Suspended'; + } if ($resourceAmount === 0) { return 'Offline'; } @@ -484,7 +487,7 @@ public function formatResource(string $resourceKey, bool $limit = false, ServerR public function condition(): Attribute { return Attribute::make( - get: fn () => $this->status?->value ?? $this->retrieveStatus(), + get: fn () => $this->isSuspended() ? 'Suspended' : $this->status?->value ?? $this->retrieveStatus(), ); }