Update
This commit is contained in:
@@ -26,7 +26,14 @@ class PrescriptionController extends Controller
|
||||
{
|
||||
// return $request->toArray();
|
||||
$prescription = Prescription::query()
|
||||
->with(['livechat', 'user', 'items']);
|
||||
->with(['livechat', 'user', 'items'])
|
||||
->join('tx_prescription_orders', 'tx_prescriptions.nID', '=', 'tx_prescription_orders.nIDPrescription')
|
||||
->select(
|
||||
'tx_prescriptions.*',
|
||||
'tx_prescription_orders.sStatus as status_prescription',
|
||||
'tx_prescription_orders.sAddress as kirim_ke',
|
||||
'tx_prescription_orders.sDeliveryMethod as delivery',
|
||||
);
|
||||
if ($request->has('search')) {
|
||||
$search = $request->search;
|
||||
$prescription->where(function ($query) use ($search) {
|
||||
@@ -156,6 +163,7 @@ class PrescriptionController extends Controller
|
||||
'Date Consultation',
|
||||
'Patient',
|
||||
'Doctor',
|
||||
'Status',
|
||||
'Jenis Obat (Drugs)',
|
||||
'Jumlah Obat (QTY)',
|
||||
'Cara Minum Obat',
|
||||
|
||||
@@ -25,6 +25,7 @@ class ReportPrescriptionResource extends JsonResource
|
||||
'date_consultation' => $this->dTanggalResep ? Carbon::parse($this->dTanggalResep)->format('Y-m-d H:i:s') : null,
|
||||
'doctor_name' => $this->sDokterName ? $this->sDokterName : '-',
|
||||
'items' => $this->items ? $this->items : [],
|
||||
'status_prescription' => $this->status_prescription
|
||||
];
|
||||
|
||||
return $data;
|
||||
|
||||
@@ -337,6 +337,7 @@ export default function List() {
|
||||
<TableCell align="left">{row.date_consultation ? fDateTime(row.date_consultation) : '-'}</TableCell>
|
||||
<TableCell align="left">{row.patient_name ?? '-'}</TableCell>
|
||||
<TableCell align="left">{row.doctor_name ?? '-'}</TableCell>
|
||||
<TableCell align="left">{row.status_prescription ?? '-'}</TableCell>
|
||||
{/* <TableCell align="center">
|
||||
<ButtonGroup variant="text" aria-label="text button group">
|
||||
<Link to={'/report/appointments/' + row.id + '/show'}>
|
||||
@@ -542,6 +543,9 @@ export default function List() {
|
||||
<TableCell style={headStyle} align="left">
|
||||
Doctor
|
||||
</TableCell>
|
||||
<TableCell style={headStyle} align="left">
|
||||
Status
|
||||
</TableCell>
|
||||
{/* <TableCell style={headStyle} align="center">
|
||||
Aksi
|
||||
</TableCell> */}
|
||||
|
||||
Reference in New Issue
Block a user