From ceaa367d8ea0415087eafe0fab2908136b52820d Mon Sep 17 00:00:00 2001 From: Basoro Date: Fri, 27 Sep 2024 22:53:18 +0800 Subject: [PATCH] Update --- plugins/pasien/Admin.php | 6 ++++++ plugins/pasien/js/admin/pasien.js | 9 +++++++-- plugins/pasien/view/admin/form.html | 1 - 3 files changed, 13 insertions(+), 3 deletions(-) diff --git a/plugins/pasien/Admin.php b/plugins/pasien/Admin.php index 09434709d..19e885355 100644 --- a/plugins/pasien/Admin.php +++ b/plugins/pasien/Admin.php @@ -283,6 +283,12 @@ public function anyForm() exit(); } + public function postMaxid() + { + echo $this->core->setNoRM(); + exit(); + } + public function postSave() { $_POST['tgl_daftar'] = date('Y-m-d H:i', strtotime($_POST['tgl_daftar'])); diff --git a/plugins/pasien/js/admin/pasien.js b/plugins/pasien/js/admin/pasien.js index 70dcbf563..e49bf7977 100644 --- a/plugins/pasien/js/admin/pasien.js +++ b/plugins/pasien/js/admin/pasien.js @@ -20,8 +20,13 @@ $("#index").on('click', '#tutupform', function(){ // ketika inputbox no_rm_medis diklik $("#form").on("click","#no_rkm_medis", function(event){ - var no_rkm_medis_baru = $("#no_rkm_medis_baru").val(); - $("#no_rkm_medis").val(no_rkm_medis_baru); + var baseURL = mlite.url + '/' + mlite.admin; + event.preventDefault(); + var url = baseURL + '/pasien/maxid?t=' + mlite.token; + $.post(url, { + } ,function(data) { + $("#no_rkm_medis").val(data); + }); }); // tombol batal diklik diff --git a/plugins/pasien/view/admin/form.html b/plugins/pasien/view/admin/form.html index fc0729440..91cbdd064 100644 --- a/plugins/pasien/view/admin/form.html +++ b/plugins/pasien/view/admin/form.html @@ -8,7 +8,6 @@
-