Fixed document canceled button issue..
This commit is contained in:
parent
80b6b19b52
commit
889640c1bd
@ -521,6 +521,7 @@ class Document extends Model
|
||||
];
|
||||
} catch (\Exception $e) {}
|
||||
|
||||
if ($this->status != 'cancelled') {
|
||||
try {
|
||||
$actions[] = [
|
||||
'title' => trans('general.print'),
|
||||
@ -533,6 +534,7 @@ class Document extends Model
|
||||
],
|
||||
];
|
||||
} catch (\Exception $e) {}
|
||||
}
|
||||
|
||||
try {
|
||||
$actions[] = [
|
||||
@ -547,7 +549,8 @@ class Document extends Model
|
||||
];
|
||||
} catch (\Exception $e) {}
|
||||
|
||||
if (!str_contains($this->type, 'recurring')) {
|
||||
if (! str_contains($this->type, 'recurring')) {
|
||||
if ($this->status != 'cancelled') {
|
||||
$actions[] = [
|
||||
'type' => 'divider',
|
||||
];
|
||||
@ -581,11 +584,13 @@ class Document extends Model
|
||||
];
|
||||
}
|
||||
} catch (\Exception $e) {}
|
||||
}
|
||||
|
||||
$actions[] = [
|
||||
'type' => 'divider',
|
||||
];
|
||||
|
||||
if ($this->status != 'cancelled') {
|
||||
try {
|
||||
$actions[] = [
|
||||
'title' => trans('general.cancel'),
|
||||
@ -601,6 +606,7 @@ class Document extends Model
|
||||
$actions[] = [
|
||||
'type' => 'divider',
|
||||
];
|
||||
}
|
||||
|
||||
try {
|
||||
$actions[] = [
|
||||
|
@ -52,13 +52,13 @@
|
||||
|
||||
@stack('button_pdf_end')
|
||||
|
||||
@if (! in_array($document->status, $hideButtonStatuses))
|
||||
@if (! $hideDivider2)
|
||||
<x-dropdown.divider />
|
||||
@endif
|
||||
|
||||
@stack('share_button_start')
|
||||
|
||||
@if (! in_array($document->status, $hideButtonStatuses))
|
||||
@if (! $hideShare)
|
||||
@if ($document->status != 'cancelled')
|
||||
<x-dropdown.button @click="onShareLink('{{ route($shareRoute, $document->id) }}')">
|
||||
|
Loading…
x
Reference in New Issue
Block a user