diff --git a/Modules/HospitalPortal/Http/Controllers/ApotekController.php b/Modules/HospitalPortal/Http/Controllers/ApotekController.php index 8967dcd0..2e732ab0 100644 --- a/Modules/HospitalPortal/Http/Controllers/ApotekController.php +++ b/Modules/HospitalPortal/Http/Controllers/ApotekController.php @@ -51,7 +51,7 @@ class ApotekController extends Controller $query->where('tx_prescriptions.dTanggalresep', '<', $start_date); }); }) - ->when($request->input('status'), function ($query, $status) { + ->when($request->input('status') && $request->input('status') != 'all', function ($query, $status) { $query->where(function ($query) use ($status) { $query->where('tx_prescription_orders.sStatus', '=', $status); }); diff --git a/frontend/hospital-portal/src/sections/dashboardApotek/TableList.tsx b/frontend/hospital-portal/src/sections/dashboardApotek/TableList.tsx index 2302e1dd..02fce5c7 100644 --- a/frontend/hospital-portal/src/sections/dashboardApotek/TableList.tsx +++ b/frontend/hospital-portal/src/sections/dashboardApotek/TableList.tsx @@ -335,7 +335,8 @@ export default function TableList() { : Object.fromEntries([...searchParams.entries(), ['order', order], ['orderBy', orderBy]]); const response = await axios.get(`/get-prescription-orders`, { - params: { ...parameters, type: 'prescription-orders' }, + params: { ...parameters, search:searchText, order: order, + orderBy: orderBy, status:statusValue, type: 'prescription-orders' }, }); setDataTableData(response.data); setData(