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