From 799fc642c2d7220c5a5a4a25d331eeeb6d6cd5a6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=BCneyt=20=C5=9Eent=C3=BCrk?= Date: Tue, 25 Oct 2022 13:34:50 +0300 Subject: [PATCH] fixed document table action issue.. --- app/Models/Document/Document.php | 39 ++++++++++---------------------- 1 file changed, 12 insertions(+), 27 deletions(-) diff --git a/app/Models/Document/Document.php b/app/Models/Document/Document.php index 9928ff50b..5847368bc 100644 --- a/app/Models/Document/Document.php +++ b/app/Models/Document/Document.php @@ -542,35 +542,20 @@ class Document extends Model ], ]; } catch (\Exception $e) {} - } else { - try { - $actions[] = [ - 'title' => trans('general.print'), - 'icon' => 'print', - 'url' => route($prefix . '.print', $this->id), - 'permission' => 'read-' . $group . '-' . $permission_prefix, - 'attributes' => [ - 'id' => 'index-line-actions-print-' . $this->type . '-' . $this->id, - 'target' => '_blank', - ], - ]; - } catch (\Exception $e) {} } - if (($actions[1]['icon'] != 'print') && ($actions[2]['icon'] != 'print')) { - try { - $actions[] = [ - 'title' => trans('general.print'), - 'icon' => 'print', - 'url' => route($prefix . '.print', $this->id), - 'permission' => 'read-' . $group . '-' . $permission_prefix, - 'attributes' => [ - 'id' => 'index-line-actions-print-' . $this->type . '-' . $this->id, - 'target' => '_blank', - ], - ]; - } catch (\Exception $e) {} - } + try { + $actions[] = [ + 'title' => trans('general.print'), + 'icon' => 'print', + 'url' => route($prefix . '.print', $this->id), + 'permission' => 'read-' . $group . '-' . $permission_prefix, + 'attributes' => [ + 'id' => 'index-line-actions-print-' . $this->type . '-' . $this->id, + 'target' => '_blank', + ], + ]; + } catch (\Exception $e) {} try { $actions[] = [