Refactor backup execution and cleanup functionality

This commit is contained in:
Andras Bacsai
2024-03-07 10:27:21 +01:00
parent a6669ed876
commit 051a1405e7
3 changed files with 13 additions and 4 deletions

View File

@@ -34,7 +34,7 @@ class BackupExecutions extends Component
}
$execution->delete();
$this->dispatch('success', 'Backup deleted.');
$this->dispatch('refreshBackupExecutions');
$this->refreshBackupExecutions();
}
public function download($exeuctionId)
{
@@ -65,6 +65,6 @@ class BackupExecutions extends Component
}
public function refreshBackupExecutions(): void
{
$this->executions = data_get($this->backup, 'executions', []);
$this->executions = $this->backup->executions()->get()->sortByDesc('created_at');
}
}