added kadis login
This commit is contained in:
@ -2,11 +2,11 @@
|
||||
<html lang="en">
|
||||
|
||||
|
||||
<?php $this->load->view("admin/header"); ?>
|
||||
<?php $this->load->view("kepaladinas/header"); ?>
|
||||
|
||||
<body>
|
||||
|
||||
<?php $this->load->view("admin/side_topbar"); ?>
|
||||
<?php $this->load->view("kepaladinas/side_topbar"); ?>
|
||||
|
||||
<div id="wrapper">
|
||||
<div class="main-content">
|
||||
@ -67,13 +67,13 @@
|
||||
</div>
|
||||
<!-- /.row -->
|
||||
|
||||
<?php $this->load->view('admin/footer') ?>
|
||||
<?php $this->load->view('kepaladinas/footer') ?>
|
||||
|
||||
</div>
|
||||
<!-- /.main-content -->
|
||||
</div>
|
||||
|
||||
<?php $this->load->view('admin/scripts') ?>
|
||||
<?php $this->load->view('kepaladinas/scripts') ?>
|
||||
<script src="<?= base_url() ?>assets/plugin/datatables/media/js/jquery.dataTables.min.js"></script>
|
||||
<script src="<?= base_url() ?>assets/plugin/datatables/media/js/dataTables.bootstrap.min.js"></script>
|
||||
|
||||
@ -255,7 +255,8 @@
|
||||
// console.log("selalu jalankan")
|
||||
// get current time
|
||||
const today = new Date();
|
||||
const time = today.getHours() + ":" + today.getMinutes() + ":" + today.getSeconds();
|
||||
// chnage time to overall seconds
|
||||
let time = today.getHours() * 3600 + today.getMinutes() * 60 + today.getSeconds();
|
||||
|
||||
let data
|
||||
try {
|
||||
@ -285,6 +286,14 @@
|
||||
jam_masuk = addMinutes(jam_masuk, -30)
|
||||
jam_pulang = addMinutes(jam_pulang, 30)
|
||||
|
||||
// get the overall seconds of jam_masuk and jam_pulang
|
||||
jam_masuk = jam_masuk.split(":")[0] * 3600 + jam_masuk.split(":")[1] * 60
|
||||
jam_pulang = jam_pulang.split(":")[0] * 3600 + jam_pulang.split(":")[1] * 60
|
||||
|
||||
console.log("jam_masuk", jam_masuk)
|
||||
console.log("jam_pulang", jam_pulang)
|
||||
console.log("time", time)
|
||||
|
||||
if (time >= jam_masuk && time <= jam_pulang) {
|
||||
$("#map").attr("hidden", false);
|
||||
$("#title_peta").attr("style", "display:none");
|
||||
|
||||
@ -1283,7 +1283,7 @@
|
||||
$("#isi_laporan").append(laporan);
|
||||
$("#modal_pdf").modal("show");
|
||||
// await 2 sec
|
||||
await new Promise(r => setTimeout(r, 500));
|
||||
await new Promise(r => setTimeout(r, 5000));
|
||||
// close modal
|
||||
$("#modal_pdf").modal("hide");
|
||||
}
|
||||
|
||||
@ -302,6 +302,7 @@
|
||||
block_ui("Sedang Proses");
|
||||
},
|
||||
success: function(data) {
|
||||
$.unblockUI();
|
||||
// hide modal
|
||||
$('#modal_surat_masuk').modal('hide');
|
||||
// console.log(data)
|
||||
|
||||
@ -54,7 +54,7 @@
|
||||
}
|
||||
}).then((result) => {
|
||||
if (result) {
|
||||
window.location.href = server_url + 'admin/logout';
|
||||
window.location.href = server_url + 'kepaladinas/logout';
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user