Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Q
queue
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
5
Merge Requests
5
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Indra Raja
queue
Commits
25e5c6d7
Commit
25e5c6d7
authored
Oct 23, 2020
by
Azy Mushofy Anwary
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Cobaba
parent
700de14c
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
36 additions
and
35 deletions
+36
-35
public/action-js/antrian-js/action-admin.js
public/action-js/antrian-js/action-admin.js
+35
-33
public/action-js/antrian-js/action-kelolapoli.js
public/action-js/antrian-js/action-kelolapoli.js
+1
-2
No files found.
public/action-js/antrian-js/action-admin.js
View file @
25e5c6d7
...
@@ -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
);
...
...
public/action-js/antrian-js/action-kelolapoli.js
View file @
25e5c6d7
...
@@ -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
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment