Edit / PDF / Mail / ->Leads

This commit is contained in:
Kevin Adametz 2021-05-07 17:44:02 +02:00
parent 5d55e5be3f
commit 66ca252bfa
43 changed files with 2915 additions and 76 deletions

View file

@ -47,9 +47,20 @@ class Status extends Model
'color'
];
public function leads()
public function getStatusBadge()
{
return $this->hasMany(Lead::class);
$color = $this->color;
$icon = "";
if($this->id == 14){
$icon = '<i class="fa fa-times-circle"></i> ';
}
if($this->id == 15){
$icon = '<i class="fa fa-balance-scale"></i> ';
}
return '<span data-order="'.$this->id.'"><span class="badge badge-dark" style="background-color: '.$color.'">'.$icon.$this->name.'</span></span>';
}
/*public function status_histories()