Merge branch 'akaunting:master' into master

This commit is contained in:
Burak Civan 2022-11-02 14:25:29 +03:00 committed by GitHub
commit 3393c84633
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 12 additions and 8 deletions

View File

@ -57,17 +57,17 @@ class Tips extends Component
protected function setTips($tips) protected function setTips($tips)
{ {
if (!empty($tips)) { if (! empty($tips)) {
$this->tips = $tips; $this->tips = $tips;
} }
if (!$path = Route::current()->uri()) { if (! $path = Route::current()->uri()) {
return; return;
} }
$path = Str::replace('{company_id}/', '', $path); $path = Str::replace('{company_id}/', '', $path);
if (!$tips = $this->getTips($path)) { if (! $tips = $this->getTips($path)) {
return; return;
} }
@ -76,10 +76,14 @@ class Tips extends Component
continue; continue;
} }
if (!empty($tip->alias) && $this->moduleIsEnabled($tip->alias)) { if (! empty($tip->alias) && $this->moduleIsEnabled($tip->alias)) {
continue; continue;
} }
if (Str::contains($tip->action, '{company_id}')) {
$tip->action = Str::replace('{company_id}', company_id(), $tip->action);
}
$this->tips->push($tip); $this->tips->push($tip);
} }
} }

View File

@ -10,9 +10,9 @@
{{ $item->title }} {{ $item->title }}
</h2> </h2>
<p class="text-sm mb-2"> <div class="text-sm mb-2">
{!! $item->description !!} {!! $item->description !!}
</p> </div>
<x-link href="{{ $item->action }}" class="font-light text-sm" override="class" target="_blank"> <x-link href="{{ $item->action }}" class="font-light text-sm" override="class" target="_blank">
<x-link.hover> <x-link.hover>

View File

@ -10,9 +10,9 @@
{{ $item->title }} {{ $item->title }}
</h2> </h2>
<p class="text-sm mb-2"> <div class="text-sm mb-2">
{!! $item->description !!} {!! $item->description !!}
</p> </div>
<x-link href="{{ $item->action }}" class="font-light text-sm" override="class" target="_blank"> <x-link href="{{ $item->action }}" class="font-light text-sm" override="class" target="_blank">
<x-link.hover> <x-link.hover>