update fix listing final log

This commit is contained in:
2024-01-07 22:25:52 +07:00
parent 5c26076806
commit f05716756b

View File

@@ -62,7 +62,11 @@ class RequestLogController extends Controller
$q->where('final_log', $final_log);
})
->when($request->service_code, function($q, $service_code) {
$q->where('service_code', $service_code);
if ($service_code == 'IP'){ // Penjagaan sementara agar ini hanya muncul di inpatient monitoring
$q->where('service_code', $service_code);
} else {
$q->where('service_code', '!=', 'IP'); // Dan selain IP muncul di final LOG
}
})
// ->where('status', $request->status)
->with(['member', 'files', 'service', 'member.currentPolicy'])