add logic

This commit is contained in:
ayntk-ai
2024-08-09 00:30:11 +02:00
parent 2f95349888
commit 0135e2b5c0
7 changed files with 94 additions and 64 deletions

View File

@@ -18,6 +18,10 @@ class Danger extends Component
public bool $delete_volumes = true;
public bool $delete_images = true;
public bool $delete_connected_networks = true;
public ?string $modalId = null;
public function mount()
@@ -33,7 +37,13 @@ class Danger extends Component
try {
// $this->authorize('delete', $this->resource);
$this->resource->delete();
DeleteResourceJob::dispatch($this->resource, $this->delete_configurations, $this->delete_volumes);
DeleteResourceJob::dispatch(
$this->resource,
$this->delete_configurations,
$this->delete_volumes,
$this->delete_images,
$this->delete_connected_networks
);
return redirect()->route('project.resource.index', [
'project_uuid' => $this->projectUuid,