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
Hide 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,12 +35,12 @@ $('#cetak').on('click', function (e) {
'
</th></tr></tbody></table></body></html>
'
);
w
.
window
.
print
();
w
.
document
.
close
();
w
.
window
.
onafterprint
=
function
()
{
setTimeout
(
function
()
{
w
.
close
()
window
.
location
.
href
=
baseURL
+
"
/queue/beranda
"
},
3000
);
w
.
window
.
onafterprint
=
function
()
{
setTimeout
(
function
()
{
w
.
close
()
window
.
location
.
href
=
baseURL
+
"
/queue/beranda
"
},
3000
);
}
})
...
...
@@ -87,9 +87,9 @@ function SaveDataAja(param) {
success
:
function
(
response
)
{
// alert("success");
// response[data];
if
(
response
[
'
code
'
]
==
0
)
{
let
$id
=
response
.
data
.
id_pasien
;
let
$id
=
response
.
data
.
id_pasien
;
console
.
log
(
response
.
data
);
// alert($id);
let
$encodedId
=
btoa
(
$id
);
...
...
@@ -273,94 +273,94 @@ function pilihAntrian() {
// console.log($antrian);
// console.log(response);
if
(
$antrian
)
{
var
hour
=
0
;;
var
splithour
=
[];
splithour
[
0
]
=
$antrian
[
0
][
'
jam_mulai
'
].
split
(
'
:
'
);
var
hour
=
0
;;
var
splithour
=
[];
splithour
[
0
]
=
$antrian
[
0
][
'
jam_mulai
'
].
split
(
'
:
'
);
hour
+=
parseInt
(
splithour
[
0
][
0
]);
minute
=
parseInt
(
splithour
[
0
][
1
]);
for
(
var
i
=
0
;
i
<
$antrian
.
length
;
i
++
)
{
if
(
$antrian
[
i
][
'
id_pasien
'
]
===
null
)
{
let
y
=
''
;
var
splittime
=
[];
splittime
[
i
]
=
$antrian
[
i
][
'
waktu_antrian
'
].
split
(
'
:
'
);
var
splittime
=
[];
splittime
[
i
]
=
$antrian
[
i
][
'
waktu_antrian
'
].
split
(
'
:
'
);
if
(
minute
>=
60
)
{
hour
+=
Math
.
floor
(
minute
/
60
);
minute
=
minute
%
60
;
hour
+=
Math
.
floor
(
minute
/
60
);
minute
=
minute
%
60
;
}
if
(
minute
.
toString
().
length
===
1
)
{
if
(
minute
.
toString
().
length
===
1
)
{
y
+=
`<div class="col-lg-1">
<div class="buttons" >
<input type="radio" name="antrian" value="`
+
$antrian
[
i
][
'
no_antrian
'
]
+
`" id="antrian`
+
i
+
`" />
<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 > `
;
$
(
'
.antrian
'
).
append
(
y
);
}
else
{
}
else
{
y
+=
`<div class="col-lg-1">
<div class="buttons" >
<input type="radio" name="antrian" value="`
+
$antrian
[
i
][
'
no_antrian
'
]
+
`" id="antrian`
+
i
+
`" />
<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 > `
;
$
(
'
.antrian
'
).
append
(
y
);
}
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
)
{
var
splittime
=
[];
splittime
[
i
]
=
$antrian
[
i
][
'
waktu_antrian
'
].
split
(
'
:
'
);
}
else
if
(
$antrian
[
i
][
'
status_code
'
]
==
10
||
$antrian
[
i
][
'
status_code
'
]
==
20
||
$antrian
[
i
][
'
status_code
'
]
==
30
||
$antrian
[
i
][
'
status_code
'
]
==
40
)
{
var
splittime
=
[];
splittime
[
i
]
=
$antrian
[
i
][
'
waktu_antrian
'
].
split
(
'
:
'
);
let
y
=
''
;
if
(
minute
>=
60
)
{
hour
+=
Math
.
floor
(
minute
/
60
);
minute
=
minute
%
60
;
hour
+=
Math
.
floor
(
minute
/
60
);
minute
=
minute
%
60
;
}
if
(
minute
.
toString
().
length
===
1
)
{
if
(
minute
.
toString
().
length
===
1
)
{
y
+=
`<div class="col-lg-1">
<div class="buttons" >
<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
+
`">`
+
hour
+
'
:
'
+
'
0
'
+
minute
+
`</label>
<label for="antrian`
+
i
+
`">`
+
hour
+
'
:
'
+
'
0
'
+
minute
+
`</label>
</div>
</div > `
;
$
(
'
.antrian
'
).
append
(
y
);
}
else
{
}
else
{
y
+=
`<div class="col-lg-1">
<div class="buttons" >
<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
+
`">`
+
hour
+
'
:
'
+
minute
+
`</label>
<label for="antrian`
+
i
+
`">`
+
hour
+
'
:
'
+
minute
+
`</label>
</div>
</div > `
;
$
(
'
.antrian
'
).
append
(
y
);
}
minute
+=
parseInt
(
splittime
[
i
][
1
]);
}
else
if
(
$antrian
[
i
][
'
status_code
'
]
==
60
)
{
else
if
(
$antrian
[
i
][
'
status_code
'
]
==
60
)
{
let
y
=
''
;
y
+=
`<div class="col-lg-1">
<div class="buttons" >
...
...
@@ -370,20 +370,20 @@ function pilihAntrian() {
</div>
</div > `
;
$
(
'
.antrian
'
).
append
(
y
);
}
else
if
(
$antrian
[
i
][
'
status_code
'
]
==
50
){
}
else
if
(
$antrian
[
i
][
'
status_code
'
]
==
50
)
{
var
splittime
=
[];
splittime
[
i
]
=
$antrian
[
i
][
'
waktu_antrian
'
].
split
(
'
:
'
);
var
splittime
=
[];
splittime
[
i
]
=
$antrian
[
i
][
'
waktu_antrian
'
].
split
(
'
:
'
);
if
(
minute
>=
60
)
{
hour
+=
Math
.
floor
(
minute
/
60
);
minute
=
minute
%
60
;
hour
+=
Math
.
floor
(
minute
/
60
);
minute
=
minute
%
60
;
}
let
y
=
''
;
y
+=
`<div class="col-lg-1">
<div class="buttons" >
...
...
@@ -400,7 +400,7 @@ function pilihAntrian() {
}
}
else
{
}
},
error
:
function
(
xhr
)
{
...
...
public/action-js/antrian-js/action-cetak.js
View file @
10fccefe
...
...
@@ -14,7 +14,12 @@ $('#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
=
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