Able to remove scheduled backups

This commit is contained in:
Andras Bacsai 2023-08-10 16:25:59 +02:00
parent e17f1935d2
commit fcb2e10097
2 changed files with 8 additions and 0 deletions

View File

@ -19,6 +19,13 @@ class BackupEdit extends Component
'backup.number_of_backups_locally' => 'Number of Backups Locally', 'backup.number_of_backups_locally' => 'Number of Backups Locally',
]; ];
public function delete()
{
$this->backup->delete();
$this->emit('success', 'Backup deleted successfully');
$this->emit('refreshScheduledBackups');
}
public function instantSave() public function instantSave()
{ {
$this->backup->save(); $this->backup->save();

View File

@ -4,6 +4,7 @@
<x-forms.button type="submit"> <x-forms.button type="submit">
Save Save
</x-forms.button> </x-forms.button>
<x-forms.button isError wire:click="delete">Delete</x-forms.button>
</div> </div>
<div class="flex py-2 gap-10"> <div class="flex py-2 gap-10">
<x-forms.checkbox instantSave label="Enabled" id="backup.enabled"/> <x-forms.checkbox instantSave label="Enabled" id="backup.enabled"/>