Add Appointment Type
This commit is contained in:
@@ -31,7 +31,8 @@ class AppointmentResource extends JsonResource
|
||||
'his_detail' => [
|
||||
'RegID' => $this->sRegID,
|
||||
'Medrec' => $this->sNomorRekamMedis
|
||||
]
|
||||
],
|
||||
'type' => $this->type
|
||||
];
|
||||
|
||||
$payment_detail = null;
|
||||
|
||||
@@ -31,6 +31,12 @@ class Appointment extends Model
|
||||
5 => 'Voucher',
|
||||
];
|
||||
|
||||
public $nIDJenisBookingNames = [
|
||||
1 => 'Rawat Jalan',
|
||||
2 => 'Telekonsultasi',
|
||||
3 => 'Chat Sekarang'
|
||||
];
|
||||
|
||||
protected $connection = 'oldlms';
|
||||
|
||||
protected $table = 'tx_appointment';
|
||||
@@ -53,7 +59,8 @@ class Appointment extends Model
|
||||
|
||||
protected $appends = [
|
||||
'status_name',
|
||||
'payment_method'
|
||||
'payment_method',
|
||||
'type'
|
||||
];
|
||||
|
||||
protected function statusName(): Attribute
|
||||
@@ -74,6 +81,15 @@ class Appointment extends Model
|
||||
);
|
||||
}
|
||||
|
||||
protected function type(): Attribute
|
||||
{
|
||||
return Attribute::make(
|
||||
get: function($value) {
|
||||
return $this->nIDJenisBookingNames[$this->nIDJenisBooking] ?? '-';
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
public function appointmentDetail()
|
||||
{
|
||||
|
||||
@@ -189,6 +189,7 @@ export default function List() {
|
||||
<TableCell align="left">{row.patient_name ? row.patient_name : '-'}</TableCell>
|
||||
<TableCell align="left">{row.health_care ? row.health_care : '-'}</TableCell>
|
||||
<TableCell align="left">{row.doctor_name ? row.doctor_name : '-'}</TableCell>
|
||||
<TableCell align="left">{row.type ? row.type : '-'}</TableCell>
|
||||
|
||||
<TableCell align="left">{row.status ? row.status : '-'}</TableCell>
|
||||
<TableCell align="center">
|
||||
@@ -370,7 +371,7 @@ export default function List() {
|
||||
Dokter
|
||||
</TableCell>
|
||||
<TableCell style={headStyle} align="left">
|
||||
Appointment Via App/Website
|
||||
Jenis
|
||||
</TableCell>
|
||||
<TableCell style={headStyle} align="left">
|
||||
Status Appointment
|
||||
|
||||
Reference in New Issue
Block a user