[Client Portal] Alarm Center
This commit is contained in:
@@ -197,6 +197,11 @@ class Member extends Model
|
||||
{
|
||||
return $this->hasOneThrough(CorporateDivision::class, CorporateEmployee::class, 'member_id', 'id', 'id', 'division_id');
|
||||
}
|
||||
|
||||
public function requestLogs()
|
||||
{
|
||||
return $this->hasMany(RequestLog::class);
|
||||
}
|
||||
/* -------------------------------------------------------------------------- */
|
||||
|
||||
/* -------------------------------------------------------------------------- */
|
||||
@@ -270,13 +275,13 @@ class Member extends Model
|
||||
protected function relations(): Attribute
|
||||
{
|
||||
$relation = '-';
|
||||
if ($this->relation_with_principal == 'H'){
|
||||
if ($this->relation_with_principal == 'H') {
|
||||
$relation = 'Husbund';
|
||||
} else if ($this->relation_with_principal == 'W'){
|
||||
} else if ($this->relation_with_principal == 'W') {
|
||||
$relation = 'Wife';
|
||||
} else if ($this->relation_with_principal == 'S'){
|
||||
} else if ($this->relation_with_principal == 'S') {
|
||||
$relation = 'Son';
|
||||
} else if ($this->relation_with_principal == 'D'){
|
||||
} else if ($this->relation_with_principal == 'D') {
|
||||
$relation = 'Daughter';
|
||||
}
|
||||
return Attribute::make(
|
||||
@@ -287,11 +292,11 @@ class Member extends Model
|
||||
protected function statusMarital(): Attribute
|
||||
{
|
||||
$maritalStatus = '-';
|
||||
if ($this->marital_status == 'M'){
|
||||
if ($this->marital_status == 'M') {
|
||||
$maritalStatus = 'Married';
|
||||
} else if ($this->relation_with_principal == 'D'){
|
||||
} else if ($this->relation_with_principal == 'D') {
|
||||
$maritalStatus = 'Divorced';
|
||||
} else if ($this->relation_with_principal == 'S'){
|
||||
} else if ($this->relation_with_principal == 'S') {
|
||||
$maritalStatus = 'Single';
|
||||
}
|
||||
return Attribute::make(
|
||||
@@ -311,12 +316,12 @@ class Member extends Model
|
||||
protected function birthDateeCard(): Attribute
|
||||
{
|
||||
// $date = $this->person->birth_date ?? ($this->birth_date ?? null);
|
||||
if ($this->birth_date){
|
||||
if ($this->birth_date) {
|
||||
$date = $this->birth_date;
|
||||
return Attribute::make(
|
||||
get: fn () => !empty($date) ? Carbon::parse($date)->format('d / M / Y') : null
|
||||
);
|
||||
} else if ($this->person->birth_date){
|
||||
} else if ($this->person->birth_date) {
|
||||
return Attribute::make(
|
||||
get: fn () => !empty($date) ? Carbon::parse($date)->format('d / M / Y') : null
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user