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