adding pdf and phone number
This commit is contained in:
@ -4,8 +4,8 @@
|
||||
<button type="button" class="button-close fa fa-times js__menu_close"></button>
|
||||
<div class="user">
|
||||
<a href="#" class="avatar"><img src="<?=base_url()?>/assets/images/admin.png" alt=""><span class="status online"></span></a>
|
||||
<h5 class="name"></h5>
|
||||
<h5 class="position"></h5>
|
||||
<h5 class="name">Admin</h5>
|
||||
<h5 class="position">Admin</h5>
|
||||
<!-- /.name -->
|
||||
|
||||
</div>
|
||||
@ -30,6 +30,9 @@
|
||||
<li <?php if ($this->uri->segment(2) == "laporan"): ?>class="current"<?php endif ?>>
|
||||
<a class="waves-effect" href="<?=base_url()?>home/laporan"><i class="menu-icon zmdi zmdi-storage"></i><span>Laporan Absensi</span></a>
|
||||
</li>
|
||||
<li <?php if ($this->uri->segment(2) == "notifikasi"): ?>class="current"<?php endif ?>>
|
||||
<a class="waves-effect" href="<?=base_url()?>home/notifikasi"><i class="menu-icon fa fa-phone"></i><span>No Telpon Notifikasi</span></a>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
<!-- /.menu js__accordion -->
|
||||
|
||||
@ -243,7 +243,7 @@
|
||||
|
||||
block_ui()
|
||||
},
|
||||
success: function (response) {
|
||||
success: function (response) {
|
||||
$('#sini_form')[0].reset();
|
||||
$('#table_list_karyawan').dataTable().fnDestroy();
|
||||
datatables()
|
||||
@ -263,10 +263,8 @@
|
||||
timer : 3000
|
||||
// dangerMode: true,
|
||||
})
|
||||
|
||||
|
||||
|
||||
|
||||
qrcode_karyawan(nik_karyawan)
|
||||
},
|
||||
error: function(XMLHttpRequest, textStatus, errorThrown) {
|
||||
// console.log(errorThrown)
|
||||
@ -574,6 +572,18 @@
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
async function qrcode_karyawan(nik_karyawan){
|
||||
let html = await `<div class="row small-spacing">
|
||||
<div class="col-lg-12 col-xs-12" style="overflow-x: auto; ">
|
||||
<iframe src="${url}home/print_id_karyawan/${nik_karyawan}" width="100%" height="450px"></iframe>
|
||||
</div>
|
||||
</div>`
|
||||
|
||||
await $("#sini_modalnya .modal-body").html(html)
|
||||
|
||||
await $('#sini_modalnya').modal('show');
|
||||
}
|
||||
</script>
|
||||
|
||||
</body>
|
||||
|
||||
@ -51,8 +51,8 @@
|
||||
</thead> -->
|
||||
|
||||
</table>
|
||||
<hr>
|
||||
<center><button type="button" class="btn btn-primary btn-sm waves-effect waves-light" onclick="cetak_laporan()">Cetak Laporan</button></center>
|
||||
<!-- <hr>
|
||||
<center><button type="button" class="btn btn-primary btn-sm waves-effect waves-light" onclick="cetak_laporan()">Cetak Laporan</button></center> -->
|
||||
</div>
|
||||
<!-- /.card-content -->
|
||||
</div>
|
||||
@ -240,7 +240,7 @@
|
||||
await $("#sini_modalnya .modal-header .modal-title").html(`Laporan Bulan ${$("#val_bulan").val()} , Tahun ${$("#val_tahun").val()}`)
|
||||
await $("#sini_modalnya .modal-dialog").attr('class','modal-dialog modal-lg')
|
||||
|
||||
console.log(``)
|
||||
// console.log(``)
|
||||
let html = await `<div class="row small-spacing">
|
||||
<div class="col-lg-12 col-xs-12" style="overflow-x: auto; ">
|
||||
<iframe src="${url}home/cetak/${$("#val_tahun").val()}/${$("#val_bulan").val()}" title="W3Schools Free Online Web Tutorials" width="100%" height="600px"></iframe>
|
||||
|
||||
@ -259,8 +259,19 @@
|
||||
},
|
||||
success: function (response) {
|
||||
$.unblockUI();
|
||||
console.log(response)
|
||||
|
||||
// console.log(response)
|
||||
swal({
|
||||
title : "Sukses",
|
||||
text: "Libur Berhasil Ditambah ",
|
||||
icon: "success",
|
||||
buttons: {
|
||||
cancel: false,
|
||||
confirm: true,
|
||||
},
|
||||
timer : 3000
|
||||
// dangerMode: true,
|
||||
})
|
||||
$('#sini_modalnya').modal('hide');
|
||||
},
|
||||
error: function(XMLHttpRequest, textStatus, errorThrown) {
|
||||
// console.log(errorThrown)
|
||||
@ -272,6 +283,17 @@
|
||||
}
|
||||
}
|
||||
|
||||
async function qrcode_karyawan(nik_karyawan){
|
||||
let html = await `<div class="row small-spacing">
|
||||
<div class="col-lg-12 col-xs-12" style="overflow-x: auto; ">
|
||||
<iframe src="${url}home/print_id_karyawan/${nik_karyawan}" width="100%" height="450px"></iframe>
|
||||
</div>
|
||||
</div>`
|
||||
|
||||
await $("#sini_modalnya .modal-body").html(html)
|
||||
|
||||
await $('#sini_modalnya').modal('show');
|
||||
}
|
||||
</script>
|
||||
|
||||
</body>
|
||||
|
||||
147
application/views/home/menu/notifikasi.php
Normal file
147
application/views/home/menu/notifikasi.php
Normal file
@ -0,0 +1,147 @@
|
||||
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
|
||||
<?php $this->load->view('home/head');?>
|
||||
|
||||
<link rel="stylesheet" href="<?=base_url()?>assets/plugin/datatables/media/css/dataTables.bootstrap.min.css">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
<?php $this->load->view('home/header');?>
|
||||
|
||||
<div class="modal fade" id="sini_modalnya" role="dialog">
|
||||
<div class="modal-dialog ">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal">×</button>
|
||||
<h4 class="modal-title">Modal Header</h4>
|
||||
</div>
|
||||
<div class="modal-body row">
|
||||
<p>This is a small modal.</p>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="wrapper">
|
||||
<div class="main-content">
|
||||
<div class="row small-spacing">
|
||||
|
||||
<div class="col-lg-2 col-md-2 col-xs-12"></div>
|
||||
<input type="hidden" id="sini_no_telpon" value="<?=$no_telpon?>">
|
||||
<div class="col-lg-8 col-md-8 col-xs-12">
|
||||
<div class="box-content card">
|
||||
<h4 class="box-title" style="background: #0055FF ;cursor: pointer;" onclick="myFunction('div_notifikasi')">No Telpon Notifikasi</h4>
|
||||
<!-- /.box-title -->
|
||||
<div class="card-content" style="overflow-x: auto;" id="div_notifikasi">
|
||||
<form id="sini_form">
|
||||
<div class="form-group">
|
||||
<label for="exampleInputEmail1">No Telpon Notifikasi</label>
|
||||
<input type="text" class="form-control" id="no_telpon" name="no_telpon" placeholder="Masukkan No Telpon Notifikasi" maxlength="13" onkeypress="return isNumberKey(event)" value="<?=$no_telpon?>" >
|
||||
</div>
|
||||
|
||||
|
||||
<center><button type="button" class="btn btn-primary btn-sm waves-effect waves-light" onclick="tambah_notifikasi()">Tambah / Edit No Telpon</button></center>
|
||||
</form>
|
||||
</div>
|
||||
<!-- /.card-content -->
|
||||
</div>
|
||||
<!-- /.box-content -->
|
||||
</div>
|
||||
<div class="col-lg-2 col-md-2 col-xs-12"></div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<?php $this->load->view('home/footer');?>
|
||||
|
||||
</div>
|
||||
<!-- /.main-content -->
|
||||
</div><!--/#wrapper -->
|
||||
|
||||
<?php $this->load->view('home/script'); ?>
|
||||
|
||||
<!-- <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> -->
|
||||
|
||||
<script async="">
|
||||
async function tambah_notifikasi(){
|
||||
|
||||
let no_telpon = $("#no_telpon").val();
|
||||
|
||||
if(no_telpon == ''){
|
||||
toastnya('Nomor Telpon Harus Terisi');
|
||||
$("#no_telpon").focus();
|
||||
}
|
||||
else if(no_telpon.length < 10){
|
||||
toastnya('Panjang Nomor Telpon Minimal 10 Karakter');
|
||||
$("#no_telpon").focus();
|
||||
}else{
|
||||
// console.log($("#sini_no_telpon").val())
|
||||
let ada_nom = ($("#sini_no_telpon").val() != '') ? true : false
|
||||
|
||||
|
||||
|
||||
swal({
|
||||
title : (ada_nom) ? `Update Nomor` : `Tambah Nomor`,
|
||||
text: (ada_nom) ? `Update Nomor Notifkasi Dari ${$("#sini_no_telpon").val()} kepada ${no_telpon}` : `Tambah Nomor ${no_telpon}`,
|
||||
icon: "info",
|
||||
buttons: {
|
||||
cancel: false,
|
||||
confirm: true,
|
||||
},
|
||||
// timer : 3000
|
||||
// dangerMode: true,
|
||||
})
|
||||
.then((hehe) => {
|
||||
if (hehe) {
|
||||
$.ajax({
|
||||
url: url+"api_server/notifikasi",
|
||||
type: 'post',
|
||||
data: {no_telpon : no_telpon},
|
||||
beforeSend: function(res) {
|
||||
|
||||
block_ui()
|
||||
},
|
||||
success: (response) => {
|
||||
console.log(response);
|
||||
$.unblockUI();
|
||||
$("#sini_no_telpon").val(no_telpon)
|
||||
swal({
|
||||
title : "Sukses",
|
||||
text: "No Telpon Notifikasi Berhasil Ditambah / Diupdate ",
|
||||
icon: "success",
|
||||
buttons: {
|
||||
cancel: false,
|
||||
confirm: true,
|
||||
},
|
||||
timer : 3000
|
||||
// dangerMode: true,
|
||||
})
|
||||
|
||||
},
|
||||
error: function(XMLHttpRequest, textStatus, errorThrown) {
|
||||
// console.log(errorThrown)
|
||||
bad_request(errorThrown,JSON.parse(XMLHttpRequest.responseText).message,'no_telpon')
|
||||
$.unblockUI();
|
||||
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
</script>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user