added sender ID to the clients Tab in Show view plus bug fixes

This commit is contained in:
Kwesi Banson
2024-08-26 10:23:49 +00:00
parent 4a0248e40d
commit 6cede6d980
54 changed files with 1948 additions and 120 deletions

View File

@@ -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;
}
}