This commit is contained in:
Dwi Swandhana
2026-01-30 09:39:19 +07:00
parent c2b25fa4ca
commit 55a1229440
@@ -1561,8 +1561,10 @@ class DokterController extends Controller
return back();
}
} else if ($worklist == 'hapusdatapertumbuhankoloni'){
$getdataawal = Periksa::where('nofoto', $nofoto)->first();
$id = $getdataawal->id ?? $nofoto;
try {
$ceksek = DB::table('pertumkolomni')->where('id', $nofoto)->first();
$ceksek = DB::table('pertumkolomni')->where('orderid', $id)->first();
Riwayat::create([
'nofoto' => $nofoto,
'jawaban' => 'Menghapus Data Pertumbuhan Koloni',
@@ -1570,7 +1572,7 @@ class DokterController extends Controller
'keterangan' => json_encode($ceksek),
'verifikasi' => '',
]);
DB::table('pertumkolomni')->where('id', $nofoto)->delete();
DB::table('pertumkolomni')->where('orderid', $id)->delete();
return response()->json(['icon' => 'success', 'warna' => '#1dcbbd', 'status' => 'Success', 'message' => 'Delete Data Pertumbuhan Koloni Berhasil']);
} catch (Exception $e) {
$pesan = $e->getMessage();