clients profile,slack, new email, bug fixes

This commit is contained in:
Kwesi Banson
2023-04-17 20:25:52 +00:00
parent a8301660fc
commit 903c1703b9
37 changed files with 2031 additions and 165 deletions

View File

@@ -6,7 +6,7 @@ use Illuminate\Database\Eloquent\Model;
class ClickServer extends Model
{
protected $guarded = array('id');
protected $guarded = array('id');
public $table = "click_servers";
protected $appends = ['root_password'];

View File

@@ -33,6 +33,9 @@ class Client extends Model
public function modified_by_info(){
return $this->hasOne('App\Models\Account', 'id', 'last_modified_by');
}
public function short_code_info(){
return $this->hasMany('App\Models\ShortCode', 'client_id', 'id');
}
public function getClientServicesAttribute(){

View File

@@ -0,0 +1,18 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
class ClientPayment extends Model
{
protected $guarded = array('id');
public $table = "client_finances";
public function client_info(){
return $this->hasOne('App\Models\Client', 'id', 'client_id');
}
public function created_by_info(){
return $this->hasOne('App\Models\Account', 'id', 'auth_user_id');
}
}

View File

@@ -0,0 +1,18 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
class ClientShortCode extends Model
{
protected $guarded = array('id');
public $table = "client_short_codes";
public function client_info(){
return $this->hasOne('App\Models\Client', 'id', 'client_id');
}
public function update_info(){
return $this->hasOne('App\Models\SystemUser', 'id', 'last_updated_by');
}
}

10
app/Models/Industry.php Normal file
View File

@@ -0,0 +1,10 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
class Industry extends Model
{
public $table = "client_industries";
}

21
app/Models/ShortCode.php Normal file
View File

@@ -0,0 +1,21 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
class ShortCode extends Model
{
protected $guarded = array('id');
public $table = "short_codes";
public function client_info(){
return $this->hasOne('App\Models\Client', 'id', 'client_id');
}
public function update_info(){
return $this->hasOne('App\Models\SystemUser', 'id', 'last_updated_by');
}
public function account_mgr_info(){
return $this->hasOne('App\Models\SystemUser', 'id', 'account_manager_id');
}
}

View File

@@ -8,7 +8,8 @@ class SystemUser extends Model
{
protected $guarded = array('id');
public $table = "auth_users";
public function designation_info(){
public function designation_info(){
return $this->hasOne('App\Models\Designation', 'id', 'designation');
}
}