Add Appointment Type
This commit is contained in:
@@ -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()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user