update bugs fix api mobile
This commit is contained in:
@@ -47,51 +47,11 @@ class ShowProfileResource extends JsonResource
|
||||
}
|
||||
|
||||
// Marital Status
|
||||
switch ($this->detail->sMartialStatus) {
|
||||
case "1":
|
||||
$maritalStatus = 'Single';
|
||||
break;
|
||||
case "2":
|
||||
$maritalStatus = 'Married';
|
||||
break;
|
||||
case "3":
|
||||
$maritalStatus = 'Widowed';
|
||||
break;
|
||||
default:
|
||||
$maritalStatus = '-';
|
||||
break;
|
||||
}
|
||||
$maritalStatus = DB::connection('oldlms')->table('tm_status_pernikahan')->where('nID', $this->detail->sMartialStatus)->first('sStatusPernikahan');
|
||||
|
||||
// Hubungan Keluarga
|
||||
switch ($this->detail->nIDHubunganKeluarga) {
|
||||
case 1:
|
||||
$relationship = 'Father';
|
||||
break;
|
||||
case 2:
|
||||
$relationship = 'Mother';
|
||||
break;
|
||||
case 3:
|
||||
$relationship = 'Husband';
|
||||
break;
|
||||
case 4:
|
||||
$relationship = 'Wife';
|
||||
break;
|
||||
case 5:
|
||||
$relationship = 'Child';
|
||||
break;
|
||||
case 6:
|
||||
$relationship = 'Grandmother';
|
||||
break;
|
||||
case 7:
|
||||
$relationship = 'Grandfather';
|
||||
break;
|
||||
case 8:
|
||||
$relationship = 'Sibling';
|
||||
break;
|
||||
default:
|
||||
$relationship = '-';
|
||||
break;
|
||||
}
|
||||
$relationship = DB::connection('oldlms')->table('tm_hubungan_keluarga')->where('nID', $this->nIDHubunganKeluarga)->first('sHubunganKeluarga');
|
||||
// dd( $this->detail->nIDGolonganDarah);
|
||||
|
||||
return [
|
||||
'id' => $this->nID,
|
||||
@@ -103,8 +63,8 @@ class ShowProfileResource extends JsonResource
|
||||
'phone' => $this->sPhone,
|
||||
'email' => $this->sEmail,
|
||||
'blood_type' => $goldar,
|
||||
'marital_status' => $maritalStatus,
|
||||
'relationship' => $relationship,
|
||||
'marital_status' => $maritalStatus ? $maritalStatus->sStatusPernikahan : '-',
|
||||
'relationship' => $relationship ? $relationship->sHubunganKeluarga : '-',
|
||||
'weight' => $this->detail->sWeight,
|
||||
'height' => $this->detail->sHeight,
|
||||
];
|
||||
|
||||
Reference in New Issue
Block a user