diff --git a/app/Models/transaksi.php b/app/Models/transaksi.php index 8e2fee7..ee1e8c5 100644 --- a/app/Models/transaksi.php +++ b/app/Models/transaksi.php @@ -10,12 +10,15 @@ class transaksi extends Model use HasFactory; protected $guarded = ['id']; - protected $with = ['register', 'tindakan']; + protected $with = ['register', 'tindakan', 'pegawai']; public function register(){ return $this->belongsTo(registrasiPasien::class, 'reg_uid', 'uid'); } public function tindakan(){ return $this->belongsTo(service::class, 'services_uid', 'uid'); } + public function pegawai(){ + return $this->belongsTo(User::class, 'pegawai_uid', 'uid'); + } } diff --git a/public/js/transaksi/dt.js b/public/js/transaksi/dt.js index 64bc53f..a89bcea 100644 --- a/public/js/transaksi/dt.js +++ b/public/js/transaksi/dt.js @@ -64,7 +64,11 @@ dataTable.bootstrapTable({ } }, - + { + title: "Asuransi", + field:"register.asuransi.name", + sortable: true, + }, { title: "Tindakan", field:"tindakan.name", @@ -80,6 +84,11 @@ dataTable.bootstrapTable({ } }, + { + title: "Pegawai", + field:"pegawai.name", + sortable: true, + }, ], }); diff --git a/resources/views/dashboard/index.blade.php b/resources/views/dashboard/index.blade.php index 09f1dd9..56391ca 100644 --- a/resources/views/dashboard/index.blade.php +++ b/resources/views/dashboard/index.blade.php @@ -52,6 +52,7 @@