added sender ID to the clients Tab in Show view plus bug fixes
This commit is contained in:
@@ -4,11 +4,29 @@ namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use App\Models;
|
||||
#use Spatie\Activitylog\Traits\LogsActivity;
|
||||
//use Spatie\Activitylog\Traits\CausesActivity;
|
||||
#use Spatie\Activitylog\LogOptions;
|
||||
|
||||
class Client extends Model
|
||||
{
|
||||
#use LogsActivity;
|
||||
|
||||
protected $guarded = array('id');
|
||||
public $table = "clients";
|
||||
protected $appends = ['client_services'];
|
||||
/*
|
||||
protected static $logName = 'clients_log';
|
||||
protected static $logOnlyDirty = true;
|
||||
protected static $dontSubmitEmptyLogs = true;
|
||||
|
||||
|
||||
protected static $logUnguarded = true;
|
||||
public function getActivitylogOptions(): LogOptions{
|
||||
return LogOptions::defaults()
|
||||
->logUnguarded()->useLogName('client')->logOnlyDirty()->dontSubmitEmptyLogs();
|
||||
}
|
||||
*/
|
||||
|
||||
/*
|
||||
public function getprogressIndicatorsAttribute($value){
|
||||
@@ -17,8 +35,8 @@ class Client extends Model
|
||||
$indicator_score = (count($current_indicator_count)/$general_indicators) * 100;
|
||||
return number_format($indicator_score);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
public function getOnboardingProgressStageAttribute($value){
|
||||
$onboarding_stage = json_decode($value, true);
|
||||
|
||||
@@ -55,8 +73,8 @@ class Client extends Model
|
||||
public function short_code_info(){
|
||||
return $this->hasMany('App\Models\ShortCode', 'client_id', 'id');
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
public function getClientServicesAttribute(){
|
||||
$services = $this->service_info;
|
||||
$service_name_arr = [];
|
||||
@@ -66,5 +84,5 @@ class Client extends Model
|
||||
}
|
||||
return $service_name_arr;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user