view, search dan tambah daily monitoring
This commit is contained in:
@@ -236,6 +236,25 @@ class RequestLogController extends Controller
|
||||
return Helper::responseJson(data: $manipulatedIcds);
|
||||
}
|
||||
|
||||
public function codeLog(Request $request){
|
||||
$codeLogs = RequestLog::with(['member'])->when($request->search, function ($q, $search) {
|
||||
$q->where('code', 'LIKE', "%".$search."%");
|
||||
$q->orWhereHas('member', function ($subQuery) use ($search) {
|
||||
$subQuery->where('name', 'LIKE', "%".$search."%");
|
||||
});
|
||||
})
|
||||
->paginate();
|
||||
|
||||
$manipulatedIcds = $codeLogs->map(function ($codeLog) {
|
||||
// Contoh manipulasi, tambahkan atau ubah properti sesuai kebutuhan
|
||||
return [
|
||||
'value' => $codeLog->id, // Ganti dengan properti yang sesuai dari model Icd
|
||||
'label' => $codeLog->code . ' - ' .$codeLog->member->name, // Ganti dengan properti yang sesuai dari model Icd
|
||||
];
|
||||
});
|
||||
return Helper::responseJson(data: $manipulatedIcds);
|
||||
}
|
||||
|
||||
public function hospitals(){
|
||||
$organizations = Organization::query()
|
||||
->where([
|
||||
|
||||
Reference in New Issue
Block a user