This commit is contained in:
Bozhidar 2024-05-10 14:49:47 +03:00
parent c164b93526
commit b865f1ef35
2 changed files with 10 additions and 1 deletions

View file

@ -10,6 +10,7 @@ use Filament\Forms\Form;
use Filament\Pages\Concerns\ExposesTableToWidgets;
use Filament\Resources\Components\Tab;
use Filament\Resources\Pages\ManageRecords;
use Illuminate\Support\Facades\DB;
class ManageBackups extends ManageRecords
{
@ -19,8 +20,15 @@ class ManageBackups extends ManageRecords
protected function getActions(): array
{
$restoringBackup = false;
$checkJob = DB::table('jobs')->where('payload', 'like', '%RestoreBackup%')->first();
if ($checkJob) {
$restoringBackup = true;
}
return [
Actions\Action::make('restore')
->hidden($restoringBackup)
->icon('heroicon-o-cloud-arrow-up')
->slideOver()
->modalHeading('Restore data from backup file')

View file

@ -37,7 +37,8 @@ class RestoreBackup implements ShouldQueue
return;
}
sleep(14);
}
}