From fa001632264a5697ba7afeb1db5eb47fab818404 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=BCneyt=20=C5=9Eent=C3=BCrk?= Date: Wed, 2 Nov 2022 11:53:49 +0300 Subject: [PATCH] Tip feature changes styling and action.. --- app/View/Components/Tips.php | 12 ++++++++---- resources/views/components/tips/fixed.blade.php | 4 ++-- resources/views/components/tips/relative.blade.php | 4 ++-- 3 files changed, 12 insertions(+), 8 deletions(-) diff --git a/app/View/Components/Tips.php b/app/View/Components/Tips.php index e474cd493..58936daac 100644 --- a/app/View/Components/Tips.php +++ b/app/View/Components/Tips.php @@ -57,17 +57,17 @@ class Tips extends Component protected function setTips($tips) { - if (!empty($tips)) { + if (! empty($tips)) { $this->tips = $tips; } - if (!$path = Route::current()->uri()) { + if (! $path = Route::current()->uri()) { return; } $path = Str::replace('{company_id}/', '', $path); - if (!$tips = $this->getTips($path)) { + if (! $tips = $this->getTips($path)) { return; } @@ -76,10 +76,14 @@ class Tips extends Component continue; } - if (!empty($tip->alias) && $this->moduleIsEnabled($tip->alias)) { + if (! empty($tip->alias) && $this->moduleIsEnabled($tip->alias)) { continue; } + if (Str::contains($tip->action, '{company_id}')) { + $tip->action = Str::replace('{company_id}', company_id(), $tip->action); + } + $this->tips->push($tip); } } diff --git a/resources/views/components/tips/fixed.blade.php b/resources/views/components/tips/fixed.blade.php index 3c21a29bb..f7a48cb02 100644 --- a/resources/views/components/tips/fixed.blade.php +++ b/resources/views/components/tips/fixed.blade.php @@ -10,9 +10,9 @@ {{ $item->title }} -

+

{!! $item->description !!} -

+
diff --git a/resources/views/components/tips/relative.blade.php b/resources/views/components/tips/relative.blade.php index 05727dcd8..bf56e29f2 100644 --- a/resources/views/components/tips/relative.blade.php +++ b/resources/views/components/tips/relative.blade.php @@ -10,9 +10,9 @@ {{ $item->title }} -

+

{!! $item->description !!} -

+