major update
This commit is contained in:
No files matched your search
@@ -1,5 +1,12 @@
|
||||
<?php
|
||||
|
||||
$riwayat = [
|
||||
[
|
||||
"tanggal" => "3/17/2026, 8:52:26 AM",
|
||||
"status" => "Tervalidasi",
|
||||
"operator" => " dr.SYAIFULLAH AMISRAGANI, Sp.OT"
|
||||
],
|
||||
];
|
||||
if ($_SERVER['REQUEST_METHOD'] == "POST") {
|
||||
echo "<pre>";
|
||||
print_r($_POST);
|
||||
@@ -16,7 +23,7 @@ if ($_SERVER['REQUEST_METHOD'] == "POST") {
|
||||
<title>Laporan Operasi</title>
|
||||
|
||||
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet">
|
||||
|
||||
<link href='/lib/suneditor/dist/css/suneditor.min.css' rel='stylesheet' type='text/css' />
|
||||
<style>
|
||||
.section-title {
|
||||
font-weight: 600;
|
||||
@@ -38,7 +45,7 @@ if ($_SERVER['REQUEST_METHOD'] == "POST") {
|
||||
|
||||
<h4 class="text-center mb-4">FORM LAPORAN OPERASI</h4>
|
||||
|
||||
<form method="POST" enctype="multipart/form-data">
|
||||
<form method="POST" id="formLaporanOperasi" enctype="multipart/form-data">
|
||||
|
||||
<!-- IDENTITAS -->
|
||||
|
||||
@@ -54,6 +61,9 @@ if ($_SERVER['REQUEST_METHOD'] == "POST") {
|
||||
autocomplete="off"
|
||||
>
|
||||
<input type="hidden" name="dpjp_operator" id="dpjp_operator">
|
||||
<input type="hidden" name="nama_dpjp_operator" id="nama_dpjp_operator">
|
||||
<input type="hidden" name="nip_dpjp_operator" id="nip_dpjp_operator">
|
||||
|
||||
<div
|
||||
id="resultDPJP"
|
||||
class="list-group position-absolute w-100"
|
||||
@@ -85,6 +95,7 @@ if ($_SERVER['REQUEST_METHOD'] == "POST") {
|
||||
autocomplete="off"
|
||||
>
|
||||
<input type="hidden" name="dpjp_anestesi" id="dpjp_anestesi">
|
||||
<input type="hidden" name="nama_dpjp_anestesi" id="nama_dpjp_anestesi">
|
||||
<div
|
||||
id="resultDokterAnestesi"
|
||||
class="list-group position-absolute w-100"
|
||||
@@ -224,7 +235,7 @@ if ($_SERVER['REQUEST_METHOD'] == "POST") {
|
||||
</div>
|
||||
<div class="col-md-8">
|
||||
<div class="input-group">
|
||||
<input type="number" id="lama_op" class="form-control">
|
||||
<input type="number" name="lama_operasi" id="lama_op" class="form-control">
|
||||
<span class="input-group-text">menit</span>
|
||||
</div>
|
||||
</div>
|
||||
@@ -362,7 +373,7 @@ if ($_SERVER['REQUEST_METHOD'] == "POST") {
|
||||
<label>Uraian Operasi</label>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<textarea class="form-control" rows="5" name="uraian"></textarea>
|
||||
<textarea class="form-control" id="fr_uraian_operasi" name="uraian"></textarea>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -671,13 +682,23 @@ if ($_SERVER['REQUEST_METHOD'] == "POST") {
|
||||
</div>
|
||||
|
||||
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js"></script>
|
||||
<script type='text/javascript' src='/lib/suneditor/dist/suneditor.min.js'></script>
|
||||
|
||||
<script>
|
||||
const BASEURL = "http://localhost:8080/dataLaporanOperasi.php";
|
||||
const frUraianOperasi = SUNEDITOR.create((document.getElementById('fr_uraian_operasi') || 'fr_uraian_operasi'), {
|
||||
height: '200px',
|
||||
})
|
||||
</script>
|
||||
|
||||
<script>
|
||||
const BASEURL = "http://10.10.150.191:8000/dataLaporanOperasi.php";
|
||||
|
||||
/* SEARCH AND SHOW DPJP*/
|
||||
const inputDokter = document.getElementById("searchDPJP")
|
||||
const resultDokter = document.getElementById("resultDPJP")
|
||||
const hiddenDokter = document.getElementById("dpjp_operator")
|
||||
const hiddenNamaDokter = document.getElementById("nama_dpjp_operator")
|
||||
const hiddenNipDokter = document.getElementById("nip_dpjp_operator")
|
||||
|
||||
let timer = null
|
||||
|
||||
@@ -712,6 +733,8 @@ if ($_SERVER['REQUEST_METHOD'] == "POST") {
|
||||
|
||||
inputDokter.value = d.namadokter
|
||||
hiddenDokter.value = d.kddokter
|
||||
hiddenNamaDokter.value = d.namadokter
|
||||
hiddenNipDokter.value = d.nip
|
||||
|
||||
resultDokter.innerHTML = ""
|
||||
|
||||
@@ -731,6 +754,7 @@ if ($_SERVER['REQUEST_METHOD'] == "POST") {
|
||||
const inputDokterAnestesi = document.getElementById("searchDokterAnestesi")
|
||||
const resultDokterAnestesi = document.getElementById("resultDokterAnestesi")
|
||||
const hiddenDokterAnestesi = document.getElementById("dpjp_anestesi")
|
||||
const hiddenNamaDokterAnestesi = document.getElementById("nama_dpjp_anestesi")
|
||||
|
||||
inputDokterAnestesi.addEventListener("input", () => {
|
||||
|
||||
@@ -763,6 +787,7 @@ if ($_SERVER['REQUEST_METHOD'] == "POST") {
|
||||
|
||||
inputDokterAnestesi.value = d.namadokter
|
||||
hiddenDokterAnestesi.value = d.kddokter
|
||||
hiddenNamaDokterAnestesi.value = d.namadokter
|
||||
|
||||
resultDokterAnestesi.innerHTML = ""
|
||||
|
||||
@@ -828,7 +853,7 @@ if ($_SERVER['REQUEST_METHOD'] == "POST") {
|
||||
|
||||
timerTindakan = setTimeout(() => {
|
||||
|
||||
fetch(`http://localhost:8080/dataLaporanOperasi.php?action=searchTindakan&q=${keyword}`)
|
||||
fetch(`${BASEURL}?action=searchTindakan&q=${keyword}`)
|
||||
.then(res => res.json())
|
||||
.then(data => {
|
||||
|
||||
@@ -1031,7 +1056,7 @@ if ($_SERVER['REQUEST_METHOD'] == "POST") {
|
||||
|
||||
/* Tabel Riwayat Operasi */
|
||||
document.getElementById("btnSimpanLaporan").addEventListener("click", function() {
|
||||
let operatorDPJP = document.getElementById("dpjp_operator").value
|
||||
let operatorDPJP = document.getElementById("searchDPJP").value
|
||||
let tglBedah = document.getElementById("tgl_bedah")
|
||||
let dateNow = new Date()
|
||||
|
||||
@@ -1062,6 +1087,27 @@ if ($_SERVER['REQUEST_METHOD'] == "POST") {
|
||||
|
||||
tglBedah.value = ""
|
||||
})
|
||||
|
||||
// SUBMIT FORM
|
||||
document.getElementById("btnSimpanLaporan").addEventListener("click", async function() {
|
||||
|
||||
const form = document.getElementById("formLaporanOperasi")
|
||||
|
||||
let formData = new FormData(form)
|
||||
// const plainObject = Object.fromEntries(formData.entries());
|
||||
|
||||
// console.log("form value: ", plainObject)
|
||||
let res = await fetch(`${BASEURL}?action=postLaporanOperasi`, {
|
||||
method: "POST",
|
||||
body: formData
|
||||
})
|
||||
|
||||
let data = await res.json()
|
||||
|
||||
console.log(data)
|
||||
|
||||
})
|
||||
|
||||
</script>
|
||||
|
||||
</body>
|
||||
|
||||
Reference in New Issue
Block a user