Merge pull request #2874 from novag/hide-cancel

hide cancel button for drafts
This commit is contained in:
EnesSacid-Buker
2023-02-15 16:50:01 +03:00
committed by GitHub
4 changed files with 7 additions and 9 deletions

View File

@@ -611,7 +611,7 @@ class Document extends Model
'type' => 'divider',
];
if ($this->status != 'cancelled') {
if (! in_array($this->status, ['cancelled', 'draft'])) {
try {
$actions[] = [
'title' => trans('general.cancel'),