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

updateterbaru

parent bea28e6d
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
"zendframework/zend-component-installer": "^1.0 || ^0.7 || ^1.0.0-dev@dev", "zendframework/zend-component-installer": "^1.0 || ^0.7 || ^1.0.0-dev@dev",
"zendframework/zend-mvc": "^3.0.1", "zendframework/zend-mvc": "^3.0.1",
"zfcampus/zf-development-mode": "^3.0", "zfcampus/zf-development-mode": "^3.0",
"multidots/zf3-rest-api": "dev-master", "multidots/zf3-rest-api": "dev-master",
"zendframework/zend-db": "^2.9", "zendframework/zend-db": "^2.9",
"zendframework/zend-inputfilter": "^2.8", "zendframework/zend-inputfilter": "^2.8",
"zendframework/zend-session": "^2.8", "zendframework/zend-session": "^2.8",
...@@ -48,4 +48,4 @@ ...@@ -48,4 +48,4 @@
"serve": "php -S 0.0.0.0:8080 -t public public/index.php", "serve": "php -S 0.0.0.0:8080 -t public public/index.php",
"test": "phpunit" "test": "phpunit"
} }
} }
\ No newline at end of file
...@@ -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,43 +537,27 @@ class ApiController extends \Application\Master\GlobalActionController { ...@@ -541,43 +537,27 @@ class ApiController extends \Application\Master\GlobalActionController {
); );
$dataArrayAntrian = array (
// $dataArrayDokter = array(
// 'id_condition' => 2,
// ); 'antrian_all' =>$antrian_all,
'waktu_antrian' =>$waktu_antrian,
// $dataArrayRuang = array( 'jam_mulai' =>$jam_mulai,
// '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);
// $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);
$table_register= 'register_dokter'; $table_register= 'register_dokter';
$where = 'id_register='.$id_register; $where = 'id_register='.$id_register;
// 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';
...@@ -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">
...@@ -68,8 +66,4 @@ ...@@ -68,8 +66,4 @@
<div><input type="hidden" value="nama_ruang" id="nama_ruang" /><span style="visibility:hidden" id="nama_ruang"></span></div> --> <div><input type="hidden" value="nama_ruang" id="nama_ruang" /><span style="visibility:hidden" id="nama_ruang"></span></div> -->
<!-- </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>
......
...@@ -4,22 +4,22 @@ ...@@ -4,22 +4,22 @@
function textToAudio() { function textToAudio() {
// let msg1 = "nomor antrian"; // let msg1 = "nomor antrian";
let no_antrian = document.getElementById("no_antrian").innerHTML; let no_antrian = document.getElementById("no_antrian").innerHTML;
let voice = "nomor antrian " + no_antrian; let voice = "nomor antrian " + no_antrian;
console.log(voice) console.log(voice)
let speech = new SpeechSynthesisUtterance(); let speech = new SpeechSynthesisUtterance();
speech.lang = "id"; speech.lang = "id";
speech.text = voice; speech.text = voice;
speech.volume = 1; speech.volume = 1;
speech.rate = 0.70; speech.rate = 0.70;
speech.pitch = 1; speech.pitch = 1;
window.speechSynthesis.speak(speech); window.speechSynthesis.speak(speech);
} }
function textToAudioRuang() { function textToAudioRuang() {
// let msg1 = "nomor antrian"; // let msg1 = "nomor antrian";
...@@ -32,12 +32,12 @@ function textToAudioRuang() { ...@@ -32,12 +32,12 @@ function textToAudioRuang() {
console.log(voice) console.log(voice)
let speech = new SpeechSynthesisUtterance(); let speech = new SpeechSynthesisUtterance();
speech.lang = "id"; speech.lang = "id";
speech.text = voice; speech.text = voice;
speech.volume = 1; speech.volume = 1;
speech.rate = 0.70; speech.rate = 0.70;
speech.pitch = 1; speech.pitch = 1;
window.speechSynthesis.speak(speech); window.speechSynthesis.speak(speech);
} }
...@@ -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
}, },
...@@ -117,7 +118,7 @@ function loadantrian() { ...@@ -117,7 +118,7 @@ function loadantrian() {
if (result.code == 0) { if (result.code == 0) {
let data = result.data; let data = result.data;
console.log(data); console.log(data);
let counter = 1; let counter = 1;
for (x in data) { for (x in data) {
...@@ -153,7 +154,7 @@ function loadantrian() { ...@@ -153,7 +154,7 @@ function loadantrian() {
$('#dokter').on('change', function () { $('#dokter').on('change', function () {
loadantrian(); loadantrian();
tampilangka(); tampilangka();
}); });
...@@ -240,7 +241,7 @@ function tampilangka() { ...@@ -240,7 +241,7 @@ function tampilangka() {
$('#btnNext').on('click', function () { $('#btnNext').on('click', function () {
actionqueue(noantrian + 1, 20); actionqueue(noantrian + 1, 20);
loadantrian() loadantrian()
...@@ -248,19 +249,19 @@ $('#btnNext').on('click', function () { ...@@ -248,19 +249,19 @@ $('#btnNext').on('click', function () {
$('#btnCall').on('click', function () { $('#btnCall').on('click', function () {
actionqueue(noantrian, 30); actionqueue(noantrian, 30);
}); });
$('#btnDone').on('click', function () { $('#btnDone').on('click', function () {
actionqueue(noantrian, 50); actionqueue(noantrian, 50);
}); });
$('#btnMissed').on('click', function () { $('#btnMissed').on('click', function () {
actionqueue(noantrian, 60); actionqueue(noantrian, 60);
}); });
$('#btnServed').on('click', function () { $('#btnServed').on('click', function () {
actionqueue(noantrian, 40); actionqueue(noantrian, 40);
}); });
...@@ -288,7 +289,7 @@ function actionqueue(antrianno, status) { ...@@ -288,7 +289,7 @@ function actionqueue(antrianno, status) {
}); });
$('#no_antrian').html('-'); $('#no_antrian').html('-');
return false; return false;
} }
if (status == 20) { if (status == 20) {
...@@ -311,9 +312,9 @@ function actionqueue(antrianno, status) { ...@@ -311,9 +312,9 @@ function actionqueue(antrianno, status) {
} else if (status == 30) { } else if (status == 30) {
// SOound call // SOound call
swal({ swal({
title: "Call!", title: "Call!",
text: "Sedang Melakukan Panggilan", text: "Sedang Melakukan Panggilan",
type: "success", type: "success",
...@@ -323,19 +324,21 @@ function actionqueue(antrianno, status) { ...@@ -323,19 +324,21 @@ 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() {
textToAudio() flush.onended = function () {
textToAudio()
setTimeout(function() {
textToAudioRuang() }, 3000) setTimeout(function () {
}; textToAudioRuang()
}, 3000)
};
$('#btnNext').prop('disabled', true); $('#btnNext').prop('disabled', true);
......
...@@ -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