progress indicators, bug fixes, after a while

This commit is contained in:
Kwesi Banson
2023-12-13 12:13:47 +00:00
parent ea6d83e5d9
commit bc97f69748
1283 changed files with 1010757 additions and 7379 deletions

15
app/Models/BranchFile.php Normal file
View File

@@ -0,0 +1,15 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
class BranchFile extends Model
{
protected $guarded = array('id');
public $table = "branch_files";
public function branch_info(){
return $this->hasOne('App\Models\OfficeLocation', 'id', 'branch_id');
}
}

View File

@@ -10,6 +10,14 @@ class Client extends Model
public $table = "clients";
protected $appends = ['client_services'];
/*
public function getprogressIndicatorsAttribute($value){
$current_indicator_count = json_decode($value, true);
$general_indicators = Models\ClientIndicator::count();
$indicator_score = (count($current_indicator_count)/$general_indicators) * 100;
return number_format($indicator_score);
}
*/
public function country_info(){
return $this->hasOne('App\Models\Country', 'alpha_2_code', 'country');
}

View File

@@ -0,0 +1,10 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
class ClientIndicator extends Model
{
protected $guarded = array('id');
}

19
app/Models/Mnopayment.php Normal file
View File

@@ -0,0 +1,19 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
class Mnopayment extends Model
{
protected $guarded = array('id');
public $table = "mno_payments";
public function client_info(){
return $this->hasOne('App\Models\NetworkOps', 'id', 'mno_id');
}
public function created_by_info(){
return $this->hasOne('App\Models\SystemUser', 'id', 'user_id');
}
}