diff --git a/app/Http/Controllers/ApplicationController.php b/app/Http/Controllers/ApplicationController.php
index 3cc33c203..877ca3254 100644
--- a/app/Http/Controllers/ApplicationController.php
+++ b/app/Http/Controllers/ApplicationController.php
@@ -56,7 +56,7 @@ class ApplicationController extends Controller
if (!$application) {
return redirect()->route('dashboard');
}
- $activity = Activity::where('properties->deployment_uuid', '=', $deployment_uuid)->first();
+ $activity = Activity::where('properties->type_uuid', '=', $deployment_uuid)->first();
return view('project.application.deployment', [
'application' => $application,
diff --git a/app/Http/Livewire/Project/Application/GetDeployments.php b/app/Http/Livewire/Project/Application/GetDeployments.php
index 1037eb727..2df15d0c4 100644
--- a/app/Http/Livewire/Project/Application/GetDeployments.php
+++ b/app/Http/Livewire/Project/Application/GetDeployments.php
@@ -12,7 +12,7 @@ class GetDeployments extends Component
public string $status;
public function polling()
{
- $activity = Activity::where('properties->deployment_uuid', '=', $this->deployment_uuid)->first();
+ $activity = Activity::where('properties->type_uuid', '=', $this->deployment_uuid)->first();
$this->created_at = $activity->created_at;
$this->status = data_get($activity, 'properties.status');
}
diff --git a/app/Models/Application.php b/app/Models/Application.php
index 48234efe0..b79ca182d 100644
--- a/app/Models/Application.php
+++ b/app/Models/Application.php
@@ -94,13 +94,12 @@ class Application extends BaseModel
return $this->morphMany(LocalPersistentVolume::class, 'resource');
}
-
public function deployments()
{
- return Activity::where('subject_id', $this->id)->where('properties->deployment_uuid', '!=', null)->orderBy('created_at', 'desc')->get();
+ return Activity::where('subject_id', $this->id)->where('properties->type', '=', 'deployment')->orderBy('created_at', 'desc')->get();
}
public function get_deployment(string $deployment_uuid)
{
- return Activity::where('subject_id', $this->id)->where('properties->deployment_uuid', '=', $deployment_uuid)->first();
+ return Activity::where('subject_id', $this->id)->where('properties->type_uuid', '=', $deployment_uuid)->first();
}
}
diff --git a/resources/views/project/application/deployments.blade.php b/resources/views/project/application/deployments.blade.php
index dd159d173..3d3e76d5b 100644
--- a/resources/views/project/application/deployments.blade.php
+++ b/resources/views/project/application/deployments.blade.php
@@ -3,7 +3,7 @@
No deployments found.
@endforelse