Commit 25e5c6d7 authored by Azy Mushofy Anwary's avatar Azy Mushofy Anwary

Cobaba

parent 700de14c
......@@ -12,20 +12,20 @@ const STATUS_MISSED = 60;
/* JS comes here */
function textToAudio() {
let no_antrian = document.getElementById("no_antrian").innerHTML;
// let msg1 = "nomor antrian";
let voice = "nomor antrian " + no_antrian;
console.log(voice)
let speech = new SpeechSynthesisUtterance();
speech.lang = "id";
speech.text = voice;
speech.volume = 1;
speech.rate = 0.70;
speech.rate = 0.70;
speech.pitch = 1;
window.speechSynthesis.speak(speech);
}
......@@ -34,18 +34,18 @@ function textToAudioRuang() {
let ruang = document.getElementById("nama_ruang").innerHTML;
var res = ruang.replace(".", " ");
document.getElementById("nama_ruang").innerHTML = res;
let voice = "silahkan masuk ke " + res;
console.log(voice)
let speech = new SpeechSynthesisUtterance();
speech.lang = "id";
speech.text = voice;
speech.volume = 1;
speech.rate = 0.70;
speech.rate = 0.70;
speech.pitch = 1;
window.speechSynthesis.speak(speech);
}
......@@ -151,7 +151,7 @@ function loadantrian() {
if (result.code == 0) {
let data = result.data;
console.log(data);
console.log(data);
let counter = 1;
for (x in data) {
......@@ -186,7 +186,7 @@ function loadantrian() {
$('#dokter').on('change', function () {
loadantrian();
tampilangka();
});
......@@ -273,7 +273,7 @@ function tampilangka() {
$('#btnNext').on('click', function () {
actionqueue(noantrian + 1, 20);
loadantrian()
......@@ -281,19 +281,19 @@ $('#btnNext').on('click', function () {
$('#btnCall').on('click', function () {
actionqueue(noantrian, 30);
});
$('#btnDone').on('click', function () {
actionqueue(noantrian, 50);
});
$('#btnMissed').on('click', function () {
actionqueue(noantrian, 60);
});
$('#btnServed').on('click', function () {
actionqueue(noantrian, 40);
});
......@@ -321,7 +321,7 @@ function actionqueue(antrianno, status) {
});
$('#no_antrian').html('-');
return false;
}
if (status == 20) {
......@@ -344,28 +344,30 @@ function actionqueue(antrianno, status) {
} else if (status == 30) {
// SOound call
var flush = new Audio('../../data/tone/a1.mp3');
setTimeout(function() {
flush.play(); }, )
flush.onended = function() {
textToAudio()
setTimeout(function() {
textToAudioRuang() }, 3000)
};
swal({
setTimeout(function () {
flush.play();
})
flush.onended = function () {
textToAudio()
setTimeout(function () {
textToAudioRuang()
}, 3000)
};
swal({
title: "Call!",
text: "Sedang Melakukan Panggilan",
type: "success",
showConfirmButton: false,
timer: 14000
});
$('#btnNext').prop('disabled', true);
......
......@@ -396,8 +396,7 @@ function loadedit(param) {
success: function (result) {
// console.log(result);
// $('.loaddata').empty();
// console.log(result);
// $('.loaddata').empty();
if (result.code == 0) {
......
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