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

Cobaba

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