hide cancel button for drafts
This commit is contained in:
parent
e429d2f283
commit
510c38adcc
@ -67,7 +67,7 @@ class Invoices extends BulkAction
|
|||||||
$invoices = $this->getSelectedRecords($request);
|
$invoices = $this->getSelectedRecords($request);
|
||||||
|
|
||||||
foreach ($invoices as $invoice) {
|
foreach ($invoices as $invoice) {
|
||||||
if ($invoice->status == 'cancelled') {
|
if ($invoice->status == 'cancelled' || $invoice->status == 'draft') {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -611,7 +611,7 @@ class Document extends Model
|
|||||||
'type' => 'divider',
|
'type' => 'divider',
|
||||||
];
|
];
|
||||||
|
|
||||||
if ($this->status != 'cancelled') {
|
if ($this->status != 'cancelled' && $this->status != 'draft') {
|
||||||
try {
|
try {
|
||||||
$actions[] = [
|
$actions[] = [
|
||||||
'title' => trans('general.cancel'),
|
'title' => trans('general.cancel'),
|
||||||
|
@ -112,7 +112,7 @@
|
|||||||
@can($permissionUpdate)
|
@can($permissionUpdate)
|
||||||
<x-dropdown.divider />
|
<x-dropdown.divider />
|
||||||
|
|
||||||
@if ($document->status != 'cancelled')
|
@if ($document->status != 'cancelled' && $document->status != 'draft')
|
||||||
<x-dropdown.link href="{{ route($cancelledRoute, $document->id) }}" id="show-more-actions-cancel-{{ $document->type }}">
|
<x-dropdown.link href="{{ route($cancelledRoute, $document->id) }}" id="show-more-actions-cancel-{{ $document->type }}">
|
||||||
{{ trans('general.cancel') }}
|
{{ trans('general.cancel') }}
|
||||||
</x-dropdown.link>
|
</x-dropdown.link>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user