feat/005-bulk-operations #5
@ -36,7 +36,7 @@ public function backupSet(): BelongsTo
|
||||
|
||||
public function scopeDeletable($query)
|
||||
{
|
||||
return $query->whereIn('status', ['completed', 'failed', 'aborted', 'completed_with_errors', 'partial']);
|
||||
return $query->whereIn('status', ['completed', 'failed', 'aborted', 'completed_with_errors', 'partial', 'previewed']);
|
||||
}
|
||||
|
||||
public function isDeletable(): bool
|
||||
@ -44,6 +44,6 @@ public function isDeletable(): bool
|
||||
$status = strtolower(trim((string) $this->status));
|
||||
$status = str_replace([' ', '-'], '_', $status);
|
||||
|
||||
return in_array($status, ['completed', 'failed', 'aborted', 'completed_with_errors', 'partial'], true);
|
||||
return in_array($status, ['completed', 'failed', 'aborted', 'completed_with_errors', 'partial', 'previewed'], true);
|
||||
}
|
||||
}
|
||||
|
||||
@ -24,6 +24,7 @@
|
||||
'aborted',
|
||||
'completed_with_errors',
|
||||
'partial',
|
||||
'previewed',
|
||||
'running',
|
||||
'pending',
|
||||
];
|
||||
@ -52,6 +53,7 @@
|
||||
'completed_with_errors',
|
||||
'failed',
|
||||
'partial',
|
||||
'previewed',
|
||||
]);
|
||||
});
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user