From 311b6c7da830eda18bc7cccec1330876efe04f84 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=BCneyt=20=C5=9Eent=C3=BCrk?= Date: Mon, 22 May 2023 15:55:23 +0300 Subject: [PATCH] fixed table action permission issue --- app/Models/Common/Company.php | 2 +- .../views/components/table/actions.blade.php | 97 +++++++++---------- 2 files changed, 48 insertions(+), 51 deletions(-) diff --git a/app/Models/Common/Company.php b/app/Models/Common/Company.php index 754c498a1..5756ac02c 100644 --- a/app/Models/Common/Company.php +++ b/app/Models/Common/Company.php @@ -548,7 +548,7 @@ class Company extends Eloquent implements Ownable 'title' => trans('general.switch'), 'icon' => 'settings_ethernet', 'url' => route('companies.switch', $this->id), - 'permission' => 'read-common-companies', + //'permission' => 'read-common-companies', remove this permission to allow switching to any company 'attributes' => [ 'id' => 'index-line-actions-switch-company-' . $this->id, ], diff --git a/resources/views/components/table/actions.blade.php b/resources/views/components/table/actions.blade.php index d9fbd4750..be8853aa8 100644 --- a/resources/views/components/table/actions.blade.php +++ b/resources/views/components/table/actions.blade.php @@ -8,73 +8,70 @@ @else