This commit is contained in:
Dwi Swandhana
2026-05-04 15:32:55 +07:00
parent b751d782c4
commit df3396a776
6 changed files with 70 additions and 9 deletions
@@ -2009,10 +2009,9 @@ class DokterController extends Controller
return back();
}
} else if ($worklist == 'hapusdatapertumbuhankoloni'){
$getdataawal = Periksa::where('nofoto', $nofoto)->first();
$id = $getdataawal->id ?? $nofoto;
$idtabel = $request->input('id');
try {
$ceksek = DB::table('pertumkolomni')->where('orderid', $id)->first();
$ceksek = DB::table('pertumkolomni')->where('id', $idtabel)->first();
Riwayat::create([
'nofoto' => $nofoto,
'jawaban' => 'Menghapus Data Pertumbuhan Koloni',
@@ -2020,7 +2019,7 @@ class DokterController extends Controller
'keterangan' => json_encode($ceksek),
'verifikasi' => '',
]);
DB::table('pertumkolomni')->where('orderid', $id)->delete();
DB::table('pertumkolomni')->where('id', $idtabel)->delete();
return response()->json(['icon' => 'success', 'warna' => '#1dcbbd', 'status' => 'Success', 'message' => 'Delete Data Pertumbuhan Koloni Berhasil']);
} catch (Exception $e) {
$pesan = $e->getMessage();