Commit 2e081da6 authored by Azy Mushofy Anwary's avatar Azy Mushofy Anwary

updateterbaru

parent bea28e6d
...@@ -2005,6 +2005,5 @@ ...@@ -2005,6 +2005,5 @@
"platform": { "platform": {
"php": "^5.6 || ^7.0" "php": "^5.6 || ^7.0"
}, },
"platform-dev": [], "platform-dev": []
"plugin-api-version": "1.1.0"
} }
...@@ -270,10 +270,6 @@ class ApiController extends \Application\Master\GlobalActionController { ...@@ -270,10 +270,6 @@ class ApiController extends \Application\Master\GlobalActionController {
$tb_antrian ='antrian'; $tb_antrian ='antrian';
$tb_antrian_pasien ='antrian_pasien'; $tb_antrian_pasien ='antrian_pasien';
if ($request->isPost()) { if ($request->isPost()) {
...@@ -541,36 +537,15 @@ class ApiController extends \Application\Master\GlobalActionController { ...@@ -541,36 +537,15 @@ class ApiController extends \Application\Master\GlobalActionController {
); );
$dataArrayAntrian = array (
// $dataArrayDokter = array(
// 'id_condition' => 2,
// );
// $dataArrayRuang = array(
// 'id_condition' => 2,
// );
// if($dokter){
// $where = 'id_dokter='.$dokter;
// $x = $param->updateGlobal($tb_dokter, $dataArrayDokter, $where);
// $result->code = $result::CODE_SUCCESS; // code 0
// $result->info = $result::INFO_SUCCESS;
// $result->data = $dokter;
// }
// if($ruang){
// $where = 'id_ruang='.$ruang;
// $x = $param->updateGlobal($tb_ruang, $dataArrayRuang, $where);
'antrian_all' =>$antrian_all,
'waktu_antrian' =>$waktu_antrian,
'jam_mulai' =>$jam_mulai,
// $result->code = $result::CODE_SUCCESS; // code 0
// $result->info = $result::INFO_SUCCESS;
// $result->data = $ruang;
// }
);
$load = $param->loadantrianregister($post->id); $load = $param->loadantrianregister($post->id);
...@@ -579,6 +554,11 @@ class ApiController extends \Application\Master\GlobalActionController { ...@@ -579,6 +554,11 @@ class ApiController extends \Application\Master\GlobalActionController {
// print_r ($where);die; // print_r ($where);die;
$param->updateGlobal($table_register, $dataArrayRegister, $where); $param->updateGlobal($table_register, $dataArrayRegister, $where);
// $table_antrian= 'register_antrian';
// $where1 = 'id_registerantrian='.$id_register;
// // print_r ($where);die;
// $param->updateGlobal($table_antrian, $dataArrayAntrian, $where1);
$result->code = 0; $result->code = 0;
$result->info = 'ok'; $result->info = 'ok';
$result->data = $load->data; $result->data = $load->data;
...@@ -1833,7 +1813,7 @@ class ApiController extends \Application\Master\GlobalActionController { ...@@ -1833,7 +1813,7 @@ class ApiController extends \Application\Master\GlobalActionController {
$storage = \Application\Model\Param\Storage::factory($this->getDb(), $this->getConfig()); $storage = \Application\Model\Param\Storage::factory($this->getDb(), $this->getConfig());
$test = new \Application\Model\Param($storage); $test = new \Application\Model\Param($storage);
$idokter = $post->iid; $idokter = $post->iddok;
$loadAntrianAdmin = $test->loadAntrianAdmin($idokter); $loadAntrianAdmin = $test->loadAntrianAdmin($idokter);
// print_r( $idokter);die; // print_r( $idokter);die;
...@@ -1929,6 +1909,7 @@ class ApiController extends \Application\Master\GlobalActionController { ...@@ -1929,6 +1909,7 @@ class ApiController extends \Application\Master\GlobalActionController {
return $this->getOutput($result->toJson()); return $this->getOutput($result->toJson());
} }
public function updateantrianmissAction(){ public function updateantrianmissAction(){
$result = new Result(); $result = new Result();
$request = $this->getRequest(); $request = $this->getRequest();
......
...@@ -70,12 +70,11 @@ class UmumController extends \Application\Master\GlobalActionController ...@@ -70,12 +70,11 @@ class UmumController extends \Application\Master\GlobalActionController
$this->headScript->appendScript(' var baseURL = "' . $baseurl . '"'); $this->headScript->appendScript(' var baseURL = "' . $baseurl . '"');
$this->headScript->appendScript(' var id_poli = "' . $decodeid . '"'); $this->headScript->appendScript(' var id_poli = "' . $decodeid . '"');
$this->headScript->appendFile('/action-js/tampilanantiran-js/action-umumtampilan.js'); $this->headScript->appendFile('/action-js/antrian-js/action-umumtampilan.js');
$this->layout("layout/layoutUmum"); $this->layout("layout/layoutUmum");
return $view; return $view;
} }
} }
\ No newline at end of file
...@@ -136,10 +136,7 @@ class Param extends Mapper { ...@@ -136,10 +136,7 @@ class Param extends Mapper {
return $data; return $data;
} }
public function loadantrianregister($id = null){
$data = $this->_storage->loadantrianregister($id);
return $data;
}
public function loadPoli($id_poli = null){ public function loadPoli($id_poli = null){
$data = $this->_storage->loadPoli($id_poli); $data = $this->_storage->loadPoli($id_poli);
...@@ -161,8 +158,8 @@ class Param extends Mapper { ...@@ -161,8 +158,8 @@ class Param extends Mapper {
$data = $this->_storage->loadDokter($id); $data = $this->_storage->loadDokter($id);
return $data; return $data;
} }
public function loadAntrianAdmin($id = null){ public function loadAntrianAdmin($idokter = null){
$data = $this->_storage->loadAntrianAdmin($id); $data = $this->_storage->loadAntrianAdmin($idokter);
return $data; return $data;
} }
public function loadAntrianUmum($id = null){ public function loadAntrianUmum($id = null){
......
...@@ -1288,59 +1288,7 @@ class Mysql extends \Khansia\Db\Storage implements Skeleton { ...@@ -1288,59 +1288,7 @@ class Mysql extends \Khansia\Db\Storage implements Skeleton {
} }
return $result; return $result;
} }
public function loadantrianregister($id = null){
$result = new Result();
try {
$sql = " SELECT register_dokter.id_register, dokter_to_poli.nama_dokter, poli.nama_poli, ruang.nama_ruang,register_dokter.antrian_all,register_dokter.waktu_antrian, register_dokter.jam_mulai, register_dokter.create_date
FROM register_dokter
INNER JOIN poli
ON register_dokter.id_poli = poli.id_poli
INNER JOIN dokter_to_poli
ON register_dokter.id_dokter = dokter_to_poli.id_dokter
INNER JOIN ruang
ON register_dokter.id_ruang = ruang.id_ruang
Where register_dokter.create_date = CURRENT_DATE
";
if($id){
$sql .= " AND register_dokter.id_register= $id AND register_dokter.id_register IS NOT NULL" ;
}
$sql .= " ORDER BY poli.nama_poli asc , register_dokter.create_date";
// print_r($sql);die;
$stmt = $this->_db->query($sql);
$resdata = $stmt->execute();
$listdata = array();
foreach($resdata as $val){
// print_r($val);die;
array_push($listdata, $val);
}
if ($listdata) {
$result->code = 0;
$result->info = 'OK';
$result->data = $listdata;
}else{
$result->code = 1;
$result->info = 'nok';
}
}catch (\Zend\Db\Adapter\Exception\RuntimeException $ex) {
$result->code = 3;
$result->info = 'ERROR : ' . $ex->getMessage();
}catch (\Exception $ex) {
$result->code = 4;
$result->info = 'ERROR : ' . $ex->getMessage();
}
return $result;
}
public function loadantrianmiss($id){ public function loadantrianmiss($id){
$result = new Result(); $result = new Result();
try { try {
...@@ -1811,7 +1759,7 @@ class Mysql extends \Khansia\Db\Storage implements Skeleton { ...@@ -1811,7 +1759,7 @@ class Mysql extends \Khansia\Db\Storage implements Skeleton {
return $result; return $result;
} }
public function loadAntrianAdmin($id = null){ public function loadAntrianAdmin($idokter = null){
$result = new Result(); $result = new Result();
try { try {
...@@ -1829,8 +1777,8 @@ class Mysql extends \Khansia\Db\Storage implements Skeleton { ...@@ -1829,8 +1777,8 @@ class Mysql extends \Khansia\Db\Storage implements Skeleton {
" ; " ;
if ($id){ if ($idokter){
$sql .= " AND antrian_pasien.id_pasien IS NOT NULL AND dokter_to_poli.id_dokter = $id AND antrian_pasien.status_code=10 ORDER BY no_antrian ASC"; $sql .= " AND antrian_pasien.id_pasien IS NOT NULL AND dokter_to_poli.id_dokter = $idokter AND antrian_pasien.status_code=10 ORDER BY no_antrian ASC";
} }
......
<!-- Page header -->
<div class="row">
<!-- Page header -->
<div class="row">
<div class="page-header" style="border-bottom: 0px solid #ddd0;"> <div class="page-header" style="border-bottom: 0px solid #ddd0;">
<!-- Header content --> <!-- Header content -->
<div class="page-header-content"> <div class="page-header-content">
...@@ -69,7 +67,3 @@ ...@@ -69,7 +67,3 @@
<!-- </div> <!-- </div>
</div> </div>
</div> --> </div> -->
\ No newline at end of file
\ No newline at end of file
...@@ -26,7 +26,7 @@ ...@@ -26,7 +26,7 @@
</div> </div>
<div class="text-center content-group"> <div class="text-center content-group">
<div><input type="hidden" value="nomer antrian" id="text-to-speech" placeholder="Enter text to speak..."/></div> <div><input type="hidden" value="nomer antrian" id="text-to-speech" placeholder="Enter text to speak..."/></div>
<h1 class="error-title" style=" font-weight: bold;font-size:243px;font-family: Times New Roman, Times, serif;color: #808080"><span id="no_antrian"></span></h1> <h1 class="error-title" style="padding-top: 30px;padding-bottom: 30px; font-weight: bold;font-size:200px;font-family: Times New Roman, Times, serif;color: #808080"><span id="no_antrian"></span></h1>
</div> </div>
<div><input type="hidden" value="no_antrian" id="no_antrian" /></div> <div><input type="hidden" value="no_antrian" id="no_antrian" /></div>
......
...@@ -118,6 +118,7 @@ ...@@ -118,6 +118,7 @@
<form id="myForm" > <form id="myForm" >
<input type="hidden" id="id_register" class="form-control" /></input> <input type="hidden" id="id_register" class="form-control" /></input>
<!-- <input type="text" id="antrian_before" class="form-control" /></input> -->
<div class="form-group"> <div class="form-group">
<label>Nama Poli</label> <label>Nama Poli</label>
......
...@@ -99,12 +99,13 @@ function loadpoli() { ...@@ -99,12 +99,13 @@ function loadpoli() {
function loadantrian() { function loadantrian() {
var iddokter = $('#dokter').val(); var iddokter = $('#dokter').val();
// console.log(iddokter)
$.ajax({ $.ajax({
type: 'POST', type: 'POST',
dataType: 'json', dataType: 'json',
url: baseURL + '/api/loadAntrianAdmin', url: baseURL + '/api/loadAntrianAdmin',
data: { data: {
id: iddokter iddok: iddokter
}, },
...@@ -324,16 +325,18 @@ function actionqueue(antrianno, status) { ...@@ -324,16 +325,18 @@ function actionqueue(antrianno, status) {
var flush = new Audio('../../data/tone/a1.mp3'); var flush = new Audio('../../data/tone/a1.mp3');
flush.muted = true; flush.muted = true;
setTimeout(function() { setTimeout(function () {
flush.muted = false; flush.muted = false;
flush.play() }, ) flush.play()
})
flush.onended = function() { flush.onended = function () {
textToAudio() textToAudio()
setTimeout(function() { setTimeout(function () {
textToAudioRuang() }, 3000) textToAudioRuang()
}, 3000)
}; };
......
...@@ -340,7 +340,7 @@ function SaveDataRegister(param) { ...@@ -340,7 +340,7 @@ function SaveDataRegister(param) {
ipoli: poli, ipoli: poli,
idokter: dokter, idokter: dokter,
ijam_mulai: jam_mulai, ijam_mulai: jam_mulai,
itanggal_buka : tanggal_buka,
}, },
...@@ -405,6 +405,7 @@ function editregister(id_register) { ...@@ -405,6 +405,7 @@ function editregister(id_register) {
let antrian_all = $('#antrian_alledt').val(); let antrian_all = $('#antrian_alledt').val();
let waktu_antrian = $('#waktu_antrianedt').val(); let waktu_antrian = $('#waktu_antrianedt').val();
let jam_mulai = $('#jam_mulaiedt').val(); let jam_mulai = $('#jam_mulaiedt').val();
console.log(antrian_all)
if (antrian_all == null || antrian_all == "") { if (antrian_all == null || antrian_all == "") {
......
loadantrianumum();
function loadantrianumum() {
$.ajax({
type: 'POST',
dataType: 'json',
url: baseURL + '/api/loadantrian',
success: function (result) {
// console.log(result);
// console.log(result.data);
$('loadantrian').empty();
if (result.code == 0) {
var res = result['data'];
let hasil = '';
for (var i = 0; i < res.length; i++) {
hasil += "<div class='box one" + i + "'> <div class='date'> <h4 >" + res[i]['nama_poli'] + "</h4> <h4 >" + res[i]['nama_ruang'] + "</h4></div> <div class='poster p" + i + "'> <h4 >" + res[i]['kode_dokter'] + "" + res[i]['no_antrian'] + "</h4> </div> </div>"
}
$("#box").append(hasil);
} else {
alert(result.info);
}
},
error: function (xhr) {
console.log('ERROR AJAX:' + xhr.status + '-' + xhr.statusText);
}
});
}
...@@ -60,7 +60,7 @@ class ClassLoader ...@@ -60,7 +60,7 @@ class ClassLoader
public function getPrefixes() public function getPrefixes()
{ {
if (!empty($this->prefixesPsr0)) { if (!empty($this->prefixesPsr0)) {
return call_user_func_array('array_merge', array_values($this->prefixesPsr0)); return call_user_func_array('array_merge', $this->prefixesPsr0);
} }
return array(); return array();
......
...@@ -13,9 +13,6 @@ class ComposerAutoloaderInitfe7d3cb9e3e556360705ee29bb11bde9 ...@@ -13,9 +13,6 @@ class ComposerAutoloaderInitfe7d3cb9e3e556360705ee29bb11bde9
} }
} }
/**
* @return \Composer\Autoload\ClassLoader
*/
public static function getLoader() public static function getLoader()
{ {
if (null !== self::$loader) { if (null !== self::$loader) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment