Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
F
frontend
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
0
Merge Requests
0
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
Antrian
frontend
Commits
10fccefe
Commit
10fccefe
authored
Sep 28, 2020
by
Azy Mushofy Anwary
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cetakk
parent
823eb81e
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
61 additions
and
56 deletions
+61
-56
public/action-js/antrian-js/action-antrian.js
public/action-js/antrian-js/action-antrian.js
+55
-55
public/action-js/antrian-js/action-cetak.js
public/action-js/antrian-js/action-cetak.js
+6
-1
No files found.
public/action-js/antrian-js/action-antrian.js
View file @
10fccefe
...
@@ -35,9 +35,9 @@ $('#cetak').on('click', function (e) {
...
@@ -35,9 +35,9 @@ $('#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
();
w
.
window
.
onafterprint
=
function
()
{
w
.
window
.
onafterprint
=
function
()
{
setTimeout
(
function
()
{
setTimeout
(
function
()
{
w
.
close
()
w
.
close
()
window
.
location
.
href
=
baseURL
+
"
/queue/beranda
"
window
.
location
.
href
=
baseURL
+
"
/queue/beranda
"
},
3000
);
},
3000
);
...
@@ -273,10 +273,10 @@ function pilihAntrian() {
...
@@ -273,10 +273,10 @@ function pilihAntrian() {
// console.log($antrian);
// console.log($antrian);
// console.log(response);
// console.log(response);
if
(
$antrian
)
{
if
(
$antrian
)
{
var
hour
=
0
;;
var
hour
=
0
;;
var
splithour
=
[];
var
splithour
=
[];
splithour
[
0
]
=
$antrian
[
0
][
'
jam_mulai
'
].
split
(
'
:
'
);
splithour
[
0
]
=
$antrian
[
0
][
'
jam_mulai
'
].
split
(
'
:
'
);
...
@@ -291,31 +291,31 @@ function pilihAntrian() {
...
@@ -291,31 +291,31 @@ function pilihAntrian() {
let
y
=
''
;
let
y
=
''
;
var
splittime
=
[];
var
splittime
=
[];
splittime
[
i
]
=
$antrian
[
i
][
'
waktu_antrian
'
].
split
(
'
:
'
);
splittime
[
i
]
=
$antrian
[
i
][
'
waktu_antrian
'
].
split
(
'
:
'
);
if
(
minute
>=
60
)
{
if
(
minute
>=
60
)
{
hour
+=
Math
.
floor
(
minute
/
60
);
hour
+=
Math
.
floor
(
minute
/
60
);
minute
=
minute
%
60
;
minute
=
minute
%
60
;
}
}
if
(
minute
.
toString
().
length
===
1
)
{
if
(
minute
.
toString
().
length
===
1
)
{
y
+=
`<div class="col-lg-1">
y
+=
`<div class="col-lg-1">
<div class="buttons" >
<div class="buttons" >
<input type="radio" name="antrian" value="`
+
$antrian
[
i
][
'
no_antrian
'
]
+
`" id="antrian`
+
i
+
`" />
<input type="radio" name="antrian" value="`
+
$antrian
[
i
][
'
no_antrian
'
]
+
`" id="antrian`
+
i
+
`" />
<label for="antrian`
+
i
+
`">`
+
$antrian
[
i
][
'
no_antrian
'
]
+
`</label>
<label for="antrian`
+
i
+
`">`
+
$antrian
[
i
][
'
no_antrian
'
]
+
`</label>
<label style="text-align:center`
+
i
+
`">`
+
hour
+
'
:
'
+
'
0
'
+
minute
+
`</label>
<label style="text-align:center`
+
i
+
`">`
+
hour
+
'
:
'
+
'
0
'
+
minute
+
`</label>
</div>
</div>
</div > `
;
</div > `
;
$
(
'
.antrian
'
).
append
(
y
);
$
(
'
.antrian
'
).
append
(
y
);
}
else
{
}
else
{
y
+=
`<div class="col-lg-1">
y
+=
`<div class="col-lg-1">
<div class="buttons" >
<div class="buttons" >
<input type="radio" name="antrian" value="`
+
$antrian
[
i
][
'
no_antrian
'
]
+
`" id="antrian`
+
i
+
`" />
<input type="radio" name="antrian" value="`
+
$antrian
[
i
][
'
no_antrian
'
]
+
`" id="antrian`
+
i
+
`" />
<label for="antrian`
+
i
+
`">`
+
$antrian
[
i
][
'
no_antrian
'
]
+
`</label>
<label for="antrian`
+
i
+
`">`
+
$antrian
[
i
][
'
no_antrian
'
]
+
`</label>
<label style="text-align:center"`
+
i
+
`">`
+
hour
+
'
:
'
+
minute
+
`</label>
<label style="text-align:center"`
+
i
+
`">`
+
hour
+
'
:
'
+
minute
+
`</label>
</div>
</div>
</div > `
;
</div > `
;
$
(
'
.antrian
'
).
append
(
y
);
$
(
'
.antrian
'
).
append
(
y
);
...
@@ -324,34 +324,34 @@ function pilihAntrian() {
...
@@ -324,34 +324,34 @@ function pilihAntrian() {
minute
+=
parseInt
(
splittime
[
i
][
1
]);
minute
+=
parseInt
(
splittime
[
i
][
1
]);
}
else
if
(
$antrian
[
i
][
'
status_code
'
]
==
10
||
$antrian
[
i
][
'
status_code
'
]
==
20
||
$antrian
[
i
][
'
status_code
'
]
==
30
||
$antrian
[
i
][
'
status_code
'
]
==
40
)
{
}
else
if
(
$antrian
[
i
][
'
status_code
'
]
==
10
||
$antrian
[
i
][
'
status_code
'
]
==
20
||
$antrian
[
i
][
'
status_code
'
]
==
30
||
$antrian
[
i
][
'
status_code
'
]
==
40
)
{
var
splittime
=
[];
var
splittime
=
[];
splittime
[
i
]
=
$antrian
[
i
][
'
waktu_antrian
'
].
split
(
'
:
'
);
splittime
[
i
]
=
$antrian
[
i
][
'
waktu_antrian
'
].
split
(
'
:
'
);
let
y
=
''
;
let
y
=
''
;
if
(
minute
>=
60
)
{
if
(
minute
>=
60
)
{
hour
+=
Math
.
floor
(
minute
/
60
);
hour
+=
Math
.
floor
(
minute
/
60
);
minute
=
minute
%
60
;
minute
=
minute
%
60
;
}
}
if
(
minute
.
toString
().
length
===
1
)
{
if
(
minute
.
toString
().
length
===
1
)
{
y
+=
`<div class="col-lg-1">
y
+=
`<div class="col-lg-1">
<div class="buttons" >
<div class="buttons" >
<input type="picked" name="antrian" value="`
+
$antrian
[
i
][
'
no_antrian
'
]
+
`" id="antrian`
+
i
+
`" />
<input type="picked" name="antrian" value="`
+
$antrian
[
i
][
'
no_antrian
'
]
+
`" id="antrian`
+
i
+
`" />
<label for="antrian`
+
i
+
`">`
+
$antrian
[
i
][
'
no_antrian
'
]
+
`</label>
<label for="antrian`
+
i
+
`">`
+
$antrian
[
i
][
'
no_antrian
'
]
+
`</label>
<label for="antrian`
+
i
+
`">`
+
hour
+
'
:
'
+
'
0
'
+
minute
+
`</label>
<label for="antrian`
+
i
+
`">`
+
hour
+
'
:
'
+
'
0
'
+
minute
+
`</label>
</div>
</div>
</div > `
;
</div > `
;
$
(
'
.antrian
'
).
append
(
y
);
$
(
'
.antrian
'
).
append
(
y
);
}
else
{
}
else
{
y
+=
`<div class="col-lg-1">
y
+=
`<div class="col-lg-1">
<div class="buttons" >
<div class="buttons" >
<input type="picked" name="antrian" value="`
+
$antrian
[
i
][
'
no_antrian
'
]
+
`" id="antrian`
+
i
+
`" />
<input type="picked" name="antrian" value="`
+
$antrian
[
i
][
'
no_antrian
'
]
+
`" id="antrian`
+
i
+
`" />
<label for="antrian`
+
i
+
`">`
+
$antrian
[
i
][
'
no_antrian
'
]
+
`</label>
<label for="antrian`
+
i
+
`">`
+
$antrian
[
i
][
'
no_antrian
'
]
+
`</label>
<label for="antrian`
+
i
+
`">`
+
hour
+
'
:
'
+
minute
+
`</label>
<label for="antrian`
+
i
+
`">`
+
hour
+
'
:
'
+
minute
+
`</label>
</div>
</div>
</div > `
;
</div > `
;
$
(
'
.antrian
'
).
append
(
y
);
$
(
'
.antrian
'
).
append
(
y
);
...
@@ -359,7 +359,7 @@ function pilihAntrian() {
...
@@ -359,7 +359,7 @@ function pilihAntrian() {
minute
+=
parseInt
(
splittime
[
i
][
1
]);
minute
+=
parseInt
(
splittime
[
i
][
1
]);
}
}
else
if
(
$antrian
[
i
][
'
status_code
'
]
==
60
)
{
else
if
(
$antrian
[
i
][
'
status_code
'
]
==
60
)
{
let
y
=
''
;
let
y
=
''
;
y
+=
`<div class="col-lg-1">
y
+=
`<div class="col-lg-1">
...
@@ -370,17 +370,17 @@ function pilihAntrian() {
...
@@ -370,17 +370,17 @@ function pilihAntrian() {
</div>
</div>
</div > `
;
</div > `
;
$
(
'
.antrian
'
).
append
(
y
);
$
(
'
.antrian
'
).
append
(
y
);
}
else
if
(
$antrian
[
i
][
'
status_code
'
]
==
50
)
{
}
else
if
(
$antrian
[
i
][
'
status_code
'
]
==
50
)
{
var
splittime
=
[];
var
splittime
=
[];
splittime
[
i
]
=
$antrian
[
i
][
'
waktu_antrian
'
].
split
(
'
:
'
);
splittime
[
i
]
=
$antrian
[
i
][
'
waktu_antrian
'
].
split
(
'
:
'
);
if
(
minute
>=
60
)
{
if
(
minute
>=
60
)
{
hour
+=
Math
.
floor
(
minute
/
60
);
hour
+=
Math
.
floor
(
minute
/
60
);
minute
=
minute
%
60
;
minute
=
minute
%
60
;
}
}
...
...
public/action-js/antrian-js/action-cetak.js
View file @
10fccefe
...
@@ -14,7 +14,12 @@ $('#cetak').on('click', function (e) {
...
@@ -14,7 +14,12 @@ $('#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
=
baseURL
+
"
/queue/beranda
"
},
3000
);
}
})
})
\ No newline at end of file
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