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