Commit b59ed23d authored by Indra Raja's avatar Indra Raja

update panggilan antrian dan cetak antrian

parent 3f6ed735
...@@ -130,7 +130,6 @@ class QueueController extends \Application\Master\GlobalActionController ...@@ -130,7 +130,6 @@ class QueueController extends \Application\Master\GlobalActionController
$view->setVariable('kode_dokter', $result['kode_dokter']); $view->setVariable('kode_dokter', $result['kode_dokter']);
// print_r($result);die; // print_r($result);die;
$this->headScript->appendScript(' var baseURL = "' . $baseurl . '"'); $this->headScript->appendScript(' var baseURL = "' . $baseurl . '"');
$this->headScript->appendScript(' var nama_pasien_cetak = "' . $result['nama'] . '"'); $this->headScript->appendScript(' var nama_pasien_cetak = "' . $result['nama'] . '"');
$this->headScript->appendScript(' var nama_dokter_cetak = "' . $result['nama_dokter'] . '"'); $this->headScript->appendScript(' var nama_dokter_cetak = "' . $result['nama_dokter'] . '"');
......
...@@ -23,7 +23,7 @@ function textToAudio() { ...@@ -23,7 +23,7 @@ function textToAudio() {
speech.lang = "id"; speech.lang = "id";
speech.text = voice; speech.text = voice;
speech.volume = 1;//como estas jol speech.volume = 1;
speech.rate = 0.70; speech.rate = 0.70;
speech.pitch = 1; speech.pitch = 1;
...@@ -33,16 +33,17 @@ function textToAudio() { ...@@ -33,16 +33,17 @@ function textToAudio() {
function textToAudioRuang() { function textToAudioRuang() {
// let msg1 = "nomor antrian"; // let msg1 = "nomor antrian";
let ruang = document.getElementById("nama_ruang").innerHTML; let ruang = document.getElementById("nama_ruang").innerHTML;
var res = ruang.replace(".", " ");
document.getElementById("nama_ruang").innerHTML = res;
let voice = "silahkan masuk ke " + ruang; let voice = "silahkan masuk ke " + res;
console.log(voice)
let speech = new SpeechSynthesisUtterance(); let speech = new SpeechSynthesisUtterance();
speech.lang = "id"; speech.lang = "id";
console.log(voice);
speech.text = voice; speech.text = voice;
speech.volume = 1;//como estas jol speech.volume = 1;
speech.rate = 0.70; speech.rate = 0.70;
speech.pitch = 1; speech.pitch = 1;
...@@ -344,18 +345,12 @@ function actionqueue(antrianno, status) { ...@@ -344,18 +345,12 @@ function actionqueue(antrianno, status) {
} else if (status == 30) { } else if (status == 30) {
// SOound call // SOound call
swal({
title: "Call!",
text: "Sedang Melakukan Panggilan",
type: "success",
showConfirmButton: false,
timer: 8000
});
var flush = new Audio('../../data/tone/a1.mp3'); var flush = new Audio('../../data/tone/a1.mp3');
setTimeout(function() { setTimeout(function() {
flush.play(); }, 1000) flush.play(); }, )
flush.onended = function() { flush.onended = function() {
textToAudio() textToAudio()
...@@ -364,6 +359,14 @@ function actionqueue(antrianno, status) { ...@@ -364,6 +359,14 @@ function actionqueue(antrianno, status) {
textToAudioRuang() }, 3000) textToAudioRuang() }, 3000)
}; };
swal({
title: "Call!",
text: "Sedang Melakukan Panggilan",
type: "success",
showConfirmButton: false,
timer: 14000
});
$('#btnNext').prop('disabled', true); $('#btnNext').prop('disabled', true);
......
...@@ -35,8 +35,13 @@ $('#cetak').on('click', function (e) { ...@@ -35,8 +35,13 @@ $('#cetak').on('click', function (e) {
'</th></tr></tbody></table></body></html>'); '</th></tr></tbody></table></body></html>');
w.window.print(); w.window.print();
w.document.close(); w.document.close();
return false; w.window.onafterprint = function(){
setTimeout(function() {
w.close()
window.location.href = baseURL + "/queue/beranda"
}, 3000);
}
}) })
...@@ -85,10 +90,11 @@ function SaveDataAja(param) { ...@@ -85,10 +90,11 @@ function SaveDataAja(param) {
if (response['code'] == 0) { if (response['code'] == 0) {
let $id = response.data.id_pasien; let $id = response.data.id_pasien;
console.log(response.data);
// alert($id); // alert($id);
let $encodedId = btoa($id); let $encodedId = btoa($id);
// console.log($encodedId); // console.log($encodedId);
window.location.href = ("cetakantrian/" + $encodedId); //window.location.href = ("cetakantrian/" + $encodedId);
} else { } else {
bootbox.alert({ message: ' gagal', centerVertical: true }); bootbox.alert({ message: ' gagal', centerVertical: true });
...@@ -262,6 +268,8 @@ function pilihAntrian() { ...@@ -262,6 +268,8 @@ function pilihAntrian() {
success: function (response) { success: function (response) {
console.log(response.data); console.log(response.data);
var $antrian = (response.data); var $antrian = (response.data);
$('.antrian').empty();
// console.log($antrian); // console.log($antrian);
// console.log(response); // console.log(response);
if ($antrian) { if ($antrian) {
......
...@@ -21,10 +21,6 @@ function loadantrianumum() { ...@@ -21,10 +21,6 @@ function loadantrianumum() {
} }
// result.data[0]['no_antrian']+result.data[0]['kode_dokter'];
$("#box").append(hasil); $("#box").append(hasil);
} else { } else {
......
...@@ -5,8 +5,6 @@ $('#pilih').on('click', function () { ...@@ -5,8 +5,6 @@ $('#pilih').on('click', function () {
window.location.href = ("tampilanantrian"); window.location.href = ("tampilanantrian");
}); });
function loadpoli() { function loadpoli() {
$.ajax({ $.ajax({
type: 'POST', type: 'POST',
......
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