destination and dashboard confirmation

This commit is contained in:
ayntk-ai
2024-08-31 14:51:59 +02:00
parent b118a627d0
commit a3dd48de1d
5 changed files with 55 additions and 24 deletions

View File

@@ -30,10 +30,10 @@ class Dashboard extends Component
public function cleanup_queue()
{
$this->dispatch('success', 'Cleanup started.');
Artisan::queue('cleanup:application-deployment-queue', [
'--team-id' => currentTeam()->id,
]);
return redirect()->route('dashboard')->with('success', 'Cleanup started.');
}
public function get_deployments()

View File

@@ -1,7 +1,8 @@
<?php
namespace App\Livewire\Destination;
use Illuminate\Support\Facades\Auth;
use Illuminate\Support\Facades\Hash;
use Livewire\Component;
class Form extends Component
@@ -26,8 +27,13 @@ class Form extends Component
$this->destination->save();
}
public function delete()
public function delete($password)
{
if (!Hash::check($password, Auth::user()->password)) {
$this->addError('password', 'The provided password is incorrect.');
return;
}
try {
if ($this->destination->getMorphClass() === 'App\Models\StandaloneDocker') {
if ($this->destination->attachedTo()) {