fix: activity type invalid

This commit is contained in:
Andras Bacsai
2024-07-26 20:07:39 +02:00
parent 04379b76f2
commit 102dd6bfb1

View File

@@ -62,11 +62,15 @@ class Navbar extends Component
public function checkDeployments() public function checkDeployments()
{ {
$activity = Activity::where('properties->type_uuid', $this->service->uuid)->latest()->first(); try {
$status = data_get($activity, 'properties.status'); $activity = Activity::where('properties->type_uuid', $this->service->uuid)->latest()->first();
if ($status === 'queued' || $status === 'in_progress') { $status = data_get($activity, 'properties.status');
$this->isDeploymentProgress = true; if ($status === 'queued' || $status === 'in_progress') {
} else { $this->isDeploymentProgress = true;
} else {
$this->isDeploymentProgress = false;
}
} catch (\Exception $e) {
$this->isDeploymentProgress = false; $this->isDeploymentProgress = false;
} }
} }