Fix client link on portal dashboard
This commit is contained in:
parent
4f76a96048
commit
d34531d178
2 changed files with 16 additions and 1 deletions
|
|
@ -2,6 +2,8 @@
|
|||
|
||||
namespace App\Ninja\Presenters;
|
||||
|
||||
use Utils;
|
||||
|
||||
class ClientPresenter extends EntityPresenter
|
||||
{
|
||||
public function country()
|
||||
|
|
@ -17,6 +19,19 @@ class ClientPresenter extends EntityPresenter
|
|||
return $account->formatMoney($client->balance, $client);
|
||||
}
|
||||
|
||||
public function websiteLink()
|
||||
{
|
||||
$client = $this->entity;
|
||||
|
||||
if (! $client->website) {
|
||||
return '';
|
||||
}
|
||||
|
||||
$link = Utils::addHttp($client->website);
|
||||
|
||||
return link_to($link, $client->website, ['target' => '_blank']);
|
||||
}
|
||||
|
||||
public function paid_to_date()
|
||||
{
|
||||
$client = $this->entity;
|
||||
|
|
|
|||
|
|
@ -300,7 +300,7 @@
|
|||
{!! HTML::mailto($contact->email, $contact->email) !!}<br>
|
||||
@endif
|
||||
@if ($client->website)
|
||||
{!! HTML::link($client->website, $client->website) !!}<br>
|
||||
{{ $client->present()->websiteLink }}<br>
|
||||
@endif
|
||||
@if ($contact->phone)
|
||||
{{ $contact->phone }}<br>
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue