Fixed recurring template end button issue ( #866au7m2v )
This commit is contained in:
parent
c5c6bb2755
commit
e1b47a6f8a
@ -610,17 +610,19 @@ class Transaction extends Model
|
||||
} catch (\Exception $e) {}
|
||||
}
|
||||
} else {
|
||||
try {
|
||||
$actions[] = [
|
||||
'title' => trans('general.end'),
|
||||
'icon' => 'block',
|
||||
'url' => route($prefix. '.end', $this->id),
|
||||
'permission' => 'update-banking-transactions',
|
||||
'attributes' => [
|
||||
'id' => 'index-line-actions-end-' . $this->type . '-' . $this->id,
|
||||
],
|
||||
];
|
||||
} catch (\Exception $e) {}
|
||||
if ($this->recurring && $this->recurring->status != 'ended') {
|
||||
try {
|
||||
$actions[] = [
|
||||
'title' => trans('general.end'),
|
||||
'icon' => 'block',
|
||||
'url' => route($prefix. '.end', $this->id),
|
||||
'permission' => 'update-banking-transactions',
|
||||
'attributes' => [
|
||||
'id' => 'index-line-actions-end-' . $this->type . '-' . $this->id,
|
||||
],
|
||||
];
|
||||
} catch (\Exception $e) {}
|
||||
}
|
||||
}
|
||||
|
||||
return $actions;
|
||||
|
@ -672,17 +672,19 @@ class Document extends Model
|
||||
];
|
||||
} catch (\Exception $e) {}
|
||||
} else {
|
||||
try {
|
||||
$actions[] = [
|
||||
'title' => trans('general.end'),
|
||||
'icon' => 'block',
|
||||
'url' => route($prefix. '.end', $this->id),
|
||||
'permission' => 'update-' . $group . '-' . $permission_prefix,
|
||||
'attributes' => [
|
||||
'id' => 'index-line-actions-end-' . $this->type . '-' . $this->id,
|
||||
],
|
||||
];
|
||||
} catch (\Exception $e) {}
|
||||
if ($this->recurring && $this->recurring->status != 'ended') {
|
||||
try {
|
||||
$actions[] = [
|
||||
'title' => trans('general.end'),
|
||||
'icon' => 'block',
|
||||
'url' => route($prefix. '.end', $this->id),
|
||||
'permission' => 'update-' . $group . '-' . $permission_prefix,
|
||||
'attributes' => [
|
||||
'id' => 'index-line-actions-end-' . $this->type . '-' . $this->id,
|
||||
],
|
||||
];
|
||||
} catch (\Exception $e) {}
|
||||
}
|
||||
}
|
||||
|
||||
return $actions;
|
||||
|
@ -98,7 +98,7 @@
|
||||
|
||||
@stack('end_button_start')
|
||||
|
||||
@if (! $hideEnd && $document->recurring)
|
||||
@if (! $hideEnd && $document->recurring && $document->recurring->status != 'ended')
|
||||
<x-dropdown.link href="{{ route($endRoute, $document->id) }}" id="show-more-actions-end-{{ $document->type }}">
|
||||
{{ trans('recurring.end') }}
|
||||
</x-dropdown.link>
|
||||
|
@ -107,7 +107,7 @@
|
||||
|
||||
@stack('button_end_start')
|
||||
|
||||
@if (! $hideButtonEnd)
|
||||
@if (! $hideButtonEnd && $transaction->recurring && $transaction->recurring->status != 'ended')
|
||||
<x-dropdown.link href="{{ route($routeButtonEnd, $transaction->id) }}" id="show-more-actions-end-{{ $transaction->type }}">
|
||||
{{ trans('recurring.end') }}
|
||||
</x-dropdown.link>
|
||||
|
Loading…
x
Reference in New Issue
Block a user