user added
This commit is contained in:
406
user/index.html
406
user/index.html
@ -22,6 +22,7 @@
|
||||
|
||||
<link rel="stylesheet" href="../assets/fonts/fontello/fontello.css">
|
||||
<link rel="stylesheet" href="../assets/fonts/material-design/css/materialdesignicons.css">
|
||||
<link rel="stylesheet" href="../assets/plugin/datatables/media/css/dataTables.bootstrap.min.css">
|
||||
<!-- Dark Themes -->
|
||||
<!-- <link rel="stylesheet" href="../assets/styles/style-dark.min.css"> -->
|
||||
<link rel="stylesheet" href="../assets/sweet-alert/sweetalert.css">
|
||||
@ -39,7 +40,7 @@
|
||||
<a href="index.html" class="logo">Koperasi Guru</a>
|
||||
<button type="button" class="button-close fa fa-times js__menu_close"></button>
|
||||
<div class="user">
|
||||
<a href="#" class="avatar"><img src="http://placehold.it/80x80" alt=""><span class="status online"></span></a>
|
||||
<a href="#" class="avatar"><img src="../assets/images/user.png" alt=""><span class="status online"></span></a>
|
||||
<h5 class="name"></h5>
|
||||
<h5 class="position"></h5>
|
||||
<!-- /.name -->
|
||||
@ -57,7 +58,7 @@
|
||||
<li class="current">
|
||||
<a class="waves-effect" href="index.html"><i class="menu-icon fa fa-home"></i><span>Halaman Utama</span></a>
|
||||
</li>
|
||||
<li>
|
||||
<!-- <li>
|
||||
<a class="waves-effect parent-item js__control" href="#"><i class="menu-icon mdi mdi-cube-outline"></i><span>Halaman Simpanan</span><span class="menu-arrow fa fa-angle-down"></span></a>
|
||||
<ul class="sub-menu js__content">
|
||||
<li><a href="simpanan_pokok.html">Simpanan Pokok</a></li>
|
||||
@ -65,10 +66,9 @@
|
||||
<li><a href="simpanan_sukarela.html">Simpanan Sukarela</a></li>
|
||||
<li><a href="pinjaman.html">Pinjaman</a></li>
|
||||
</ul>
|
||||
<!-- /.sub-menu js__content -->
|
||||
</li>
|
||||
</li> -->
|
||||
<li>
|
||||
<a class="waves-effect" href="list_barang.html"><i class="menu-icon zmdi zmdi-storage"></i><span>List Barang</span></a>
|
||||
<a class="waves-effect" href="list_barang.html"><i class="menu-icon zmdi zmdi-storage"></i><span>List Pinjaman Barang</span></a>
|
||||
</li>
|
||||
|
||||
|
||||
@ -105,29 +105,161 @@
|
||||
<div id="wrapper">
|
||||
<div class="main-content">
|
||||
<div class="row small-spacing">
|
||||
<div class="col-lg-6 col-md-6 col-xs-12">
|
||||
<div class="col-lg-1 col-md-6 col-xs-12"></div>
|
||||
<div class="col-lg-5 col-md-6 col-xs-12">
|
||||
<div class="box-content bg-success text-white">
|
||||
<div class="statistics-box with-icon">
|
||||
<i class="ico small fa fa-users"></i>
|
||||
<p class="text text-white">Tanggal Registrasi</p>
|
||||
<h2 class="counter">??</h2>
|
||||
<h2 class="counter" id="tanggal_registrasi"></h2>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.box-content -->
|
||||
</div>
|
||||
<!-- /.col-lg-3 col-md-6 col-xs-12 -->
|
||||
<div class="col-lg-6 col-md-6 col-xs-12">
|
||||
<div class="col-lg-5 col-md-6 col-xs-12">
|
||||
<div class="box-content bg-info text-white">
|
||||
<div class="statistics-box with-icon">
|
||||
<i class="ico small fa fa-dollar"></i>
|
||||
<p class="text text-white">Total Simpanan</p>
|
||||
<h2 class="counter">??</h2>
|
||||
<h2 class="counter" id="jumlah_semua"></h2>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.box-content -->
|
||||
<div class="col-lg-1 col-md-6 col-xs-12"></div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="row small-spacing">
|
||||
<div class="col-lg-2 col-xs-12"></div>
|
||||
<div class="col-lg-8 col-xs-12">
|
||||
<div class="box-content card">
|
||||
<h4 class="box-title" style="background: #0055FF ;cursor: pointer;" onclick="myFunction('div_detail_user')">Detail User</h4>
|
||||
<!-- /.box-title -->
|
||||
<div class="card-content" style="overflow-x: auto; display: none;" id="div_detail_user">
|
||||
<form>
|
||||
<div class="form-group">
|
||||
<label for="exampleInputEmail1">Nama</label>
|
||||
<input type="text" id="nama" class="form-control" disabled>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="exampleInputEmail1">NIK</label>
|
||||
<input type="text" id="nik" class="form-control" disabled>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="exampleInputEmail1">Simpanan Pokok</label>
|
||||
<input type="text" id="simpanan_pokok" class="form-control" disabled>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="exampleInputEmail1">Simpanan Wajib</label>
|
||||
<input type="text" id="simpanan_wajib" class="form-control" disabled>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="exampleInputEmail1">Simpanan Sukarela</label>
|
||||
<input type="text" id="simpanan_sukarela" class="form-control" disabled>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="exampleInputEmail1">Pinjaman</label>
|
||||
<input type="text" id="pinjaman" class="form-control" disabled>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="exampleInputEmail1">Pengembalian Pinjaman</label>
|
||||
<input type="text" id="pengembalian" class="form-control" disabled>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
</div>
|
||||
<!-- /.card-content -->
|
||||
</div>
|
||||
<!-- /.box-content -->
|
||||
|
||||
|
||||
</div>
|
||||
<div class="col-lg-2 col-xs-12"></div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="row small-spacing">
|
||||
|
||||
<div class="col-lg-2 col-xs-12"></div>
|
||||
<div class="col-lg-8 col-xs-12">
|
||||
<div class="box-content card">
|
||||
<h4 class="box-title" style="background: #0055FF ;cursor: pointer;" onclick="myFunction('div_list_simpanan_wajib')">Laporan Simpanan Wajib</h4>
|
||||
<!-- /.box-title -->
|
||||
<div class="card-content" style="overflow-x: auto; display: none;" id="div_list_simpanan_wajib">
|
||||
<table id="table_simpanan_wajib" class="table table-striped table-bordered display" style="width:100%">
|
||||
|
||||
</table>
|
||||
</div>
|
||||
<!-- /.card-content -->
|
||||
</div>
|
||||
<!-- /.box-content -->
|
||||
</div>
|
||||
<div class="col-lg-2 col-xs-12"></div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="row small-spacing">
|
||||
<div class="col-lg-2 col-xs-12"></div>
|
||||
<div class="col-lg-8 col-xs-12">
|
||||
<div class="box-content card">
|
||||
<h4 class="box-title" style="background: #0055FF ;cursor: pointer;" onclick="myFunction('div_list_simpanan_sukarela')">Laporan Simpanan Sukarela</h4>
|
||||
<!-- /.box-title -->
|
||||
<div class="card-content" style="overflow-x: auto; display: none;" id="div_list_simpanan_sukarela">
|
||||
<table id="table_simpanan_sukarela" class="table table-striped table-bordered display" style="width:100%">
|
||||
|
||||
</table>
|
||||
</div>
|
||||
<!-- /.card-content -->
|
||||
</div>
|
||||
<!-- /.box-content -->
|
||||
</div>
|
||||
<div class="col-lg-2 col-xs-12"></div>
|
||||
</div>
|
||||
|
||||
<div class="row small-spacing">
|
||||
<div class="col-lg-2 col-xs-12"></div>
|
||||
<div class="col-lg-8 col-xs-12">
|
||||
<div class="box-content card">
|
||||
<h4 class="box-title" style="background: #0055FF ;cursor: pointer;" onclick="myFunction('div_list_pinjaman')">Laporan Pinjaman</h4>
|
||||
<!-- /.box-title -->
|
||||
<div class="card-content" style="overflow-x: auto; display: none;" id="div_list_pinjaman">
|
||||
<table id="table_pinjaman" class="table table-striped table-bordered display" style="width:100%">
|
||||
|
||||
</table>
|
||||
</div>
|
||||
<!-- /.card-content -->
|
||||
</div>
|
||||
<!-- /.box-content -->
|
||||
</div>
|
||||
<div class="col-lg-2 col-xs-12"></div>
|
||||
</div>
|
||||
|
||||
<div class="row small-spacing">
|
||||
<div class="col-lg-2 col-xs-12"></div>
|
||||
<div class="col-lg-8 col-xs-12">
|
||||
<div class="box-content card">
|
||||
<h4 class="box-title" style="background: #0055FF ;cursor: pointer;" onclick="myFunction('div_list_pengembalian')">Laporan Pengembalian</h4>
|
||||
<!-- /.box-title -->
|
||||
<div class="card-content" style="overflow-x: auto; display: none;" id="div_list_pengembalian">
|
||||
<table id="table_pengembalian" class="table table-striped table-bordered display" style="width:100%">
|
||||
|
||||
</table>
|
||||
</div>
|
||||
<!-- /.card-content -->
|
||||
</div>
|
||||
<!-- /.box-content -->
|
||||
</div>
|
||||
<div class="col-lg-2 col-xs-12"></div>
|
||||
</div>
|
||||
|
||||
<footer class="footer">
|
||||
<ul class="list-inline">
|
||||
<li>2021 © Dinas Pendidikan Kabupaten Enrekang.</li>
|
||||
@ -157,6 +289,8 @@
|
||||
<!-- Full Screen Plugin -->
|
||||
<script src="../assets/plugin/fullscreen/jquery.fullscreen-min.js"></script>
|
||||
|
||||
<script src="../assets/plugin/datatables/media/js/jquery.dataTables.min.js"></script>
|
||||
<script src="../assets/plugin/datatables/media/js/dataTables.bootstrap.min.js"></script>
|
||||
|
||||
<script src="../assets/scripts/main.min.js"></script>
|
||||
<script type="text/javascript" src="../js/url.js"></script>
|
||||
@ -166,8 +300,258 @@
|
||||
<link rel="stylesheet" type="text/css" href="../assets/sweet-alert/toastr/toastr.min.css">
|
||||
<script src="../assets/sweet-alert/block/jquery.blockUI.js"></script>
|
||||
<script type="text/javascript">
|
||||
// localStorage.removeItem("level");
|
||||
// localStorage.removeItem("nik");
|
||||
var detail_user = JSON.parse( $.ajax({
|
||||
url: url+'api/user',
|
||||
type: 'get',
|
||||
data: {where : {nik_user : nik}},
|
||||
async : false,
|
||||
}).responseText).data[0];
|
||||
|
||||
var dateObj = new Date(detail_user?.tanggal_pendaftaran);
|
||||
|
||||
$("#tanggal_registrasi").html(addZero(dateObj.getUTCDate()) +'-'+`${addZero(Number(dateObj.getUTCMonth()) + 1)}`+'-'+ dateObj.getUTCFullYear());
|
||||
|
||||
var simpanan_wajib = 0;
|
||||
var simpanan_sukarela = 0;
|
||||
var pinjaman = 0;
|
||||
var pengembalian = 0;
|
||||
if (detail_user?.simpanan_wajib != null) {
|
||||
JSON.parse(detail_user?.simpanan_wajib).forEach(element => {
|
||||
simpanan_wajib += Number(element?.simpanan);
|
||||
});
|
||||
}
|
||||
|
||||
if (detail_user?.simpanan_sukarela != null) {
|
||||
JSON.parse(detail_user?.simpanan_sukarela).forEach(element => {
|
||||
simpanan_sukarela += Number(element?.simpanan);
|
||||
// console.log(element?.simpanan)
|
||||
});
|
||||
}
|
||||
|
||||
if (detail_user?.pinjaman != null) {
|
||||
JSON.parse(detail_user?.pinjaman).forEach(element => {
|
||||
pinjaman += Number(element?.pinjaman);
|
||||
// console.log(element?.simpanan)
|
||||
});
|
||||
}
|
||||
|
||||
if (detail_user?.pengembalian != null) {
|
||||
JSON.parse(detail_user?.pengembalian).forEach(element => {
|
||||
pengembalian += Number(element?.pengembalian);
|
||||
// console.log(element?.simpanan)
|
||||
});
|
||||
}
|
||||
|
||||
var jumlah_semua = Number(detail_user?.simpanan_pokok) + Number(simpanan_wajib) + Number(simpanan_sukarela) - Number(pinjaman) + Number(pengembalian);
|
||||
console.log(detail_user)
|
||||
$("#jumlah_semua").html("Rp. "+ numberWithCommas(jumlah_semua))
|
||||
$("#nama").val(detail_user?.nama)
|
||||
$("#nik").val(detail_user?.nik_user)
|
||||
$("#simpanan_pokok").val("Rp. "+ numberWithCommas(detail_user?.simpanan_pokok))
|
||||
$("#simpanan_wajib").val("Rp. "+ numberWithCommas(simpanan_wajib));
|
||||
$("#simpanan_sukarela").val("Rp. "+ numberWithCommas(simpanan_sukarela));
|
||||
$("#pinjaman").val("Rp. "+ numberWithCommas(pinjaman));
|
||||
$("#pengembalian").val("Rp. "+ numberWithCommas(pengembalian));
|
||||
|
||||
function datatables_simpanan_wajib_all() {
|
||||
$('#table_simpanan_wajib').DataTable({
|
||||
responsive: true,
|
||||
"ajax": {
|
||||
"type": "POST",
|
||||
"url": url,
|
||||
"data" :{'proses' : 'table_simpanan_user_wajib', nik_user : nik},
|
||||
"timeout": 120000,
|
||||
"dataSrc": function (json) {
|
||||
// console.log(json);
|
||||
if(json != null){
|
||||
return json
|
||||
} else {
|
||||
return "";
|
||||
}
|
||||
}
|
||||
},
|
||||
"sAjaxDataProp": "",
|
||||
"width": "100%",
|
||||
"order": [[ 0, "asc" ]],
|
||||
"aoColumns": [
|
||||
{
|
||||
"mData": null,
|
||||
"title": "No",
|
||||
render: function (data, type, row, meta) {
|
||||
return meta.row + meta.settings._iDisplayStart + 1;
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
"mData": null,
|
||||
"title": "Tanggal",
|
||||
"render": function (data, row, type, meta) {
|
||||
return data.waktu;
|
||||
}
|
||||
},
|
||||
{
|
||||
"mData": null,
|
||||
"title": "Jumlah",
|
||||
"render": function (data, row, type, meta) {
|
||||
return data.ket;
|
||||
}
|
||||
},
|
||||
]
|
||||
});
|
||||
|
||||
|
||||
}
|
||||
datatables_simpanan_wajib_all()
|
||||
|
||||
function datatables_simpanan_sukarela_all() {
|
||||
$('#table_simpanan_sukarela').DataTable({
|
||||
responsive: true,
|
||||
"ajax": {
|
||||
"type": "POST",
|
||||
"url": url,
|
||||
"data" :{'proses' : 'table_simpanan_user_sukarela', nik_user : nik},
|
||||
"timeout": 120000,
|
||||
"dataSrc": function (json) {
|
||||
// console.log(json);
|
||||
if(json != null){
|
||||
return json
|
||||
} else {
|
||||
return "";
|
||||
}
|
||||
}
|
||||
},
|
||||
"sAjaxDataProp": "",
|
||||
"width": "100%",
|
||||
"order": [[ 0, "asc" ]],
|
||||
"aoColumns": [
|
||||
{
|
||||
"mData": null,
|
||||
"title": "No",
|
||||
render: function (data, type, row, meta) {
|
||||
return meta.row + meta.settings._iDisplayStart + 1;
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
"mData": null,
|
||||
"title": "Tanggal",
|
||||
"render": function (data, row, type, meta) {
|
||||
return data.waktu;
|
||||
}
|
||||
},
|
||||
{
|
||||
"mData": null,
|
||||
"title": "Jumlah",
|
||||
"render": function (data, row, type, meta) {
|
||||
return data.ket;
|
||||
}
|
||||
},
|
||||
]
|
||||
});
|
||||
|
||||
|
||||
}
|
||||
datatables_simpanan_sukarela_all()
|
||||
|
||||
function datatables_pinjaman() {
|
||||
$('#table_pinjaman').DataTable({
|
||||
responsive: true,
|
||||
"ajax": {
|
||||
"type": "POST",
|
||||
"url": url,
|
||||
"data" :{'proses' : 'table_pinjaman_user', nik_user : nik},
|
||||
"timeout": 120000,
|
||||
"dataSrc": function (json) {
|
||||
// console.log(json);
|
||||
if(json != null){
|
||||
return json
|
||||
} else {
|
||||
return "";
|
||||
}
|
||||
}
|
||||
},
|
||||
"sAjaxDataProp": "",
|
||||
"width": "100%",
|
||||
"order": [[ 0, "asc" ]],
|
||||
"aoColumns": [
|
||||
{
|
||||
"mData": null,
|
||||
"title": "No",
|
||||
render: function (data, type, row, meta) {
|
||||
return meta.row + meta.settings._iDisplayStart + 1;
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
"mData": null,
|
||||
"title": "Tanggal",
|
||||
"render": function (data, row, type, meta) {
|
||||
return data.waktu;
|
||||
}
|
||||
},
|
||||
{
|
||||
"mData": null,
|
||||
"title": "Jumlah",
|
||||
"render": function (data, row, type, meta) {
|
||||
return data.ket;
|
||||
}
|
||||
},
|
||||
]
|
||||
});
|
||||
|
||||
|
||||
}
|
||||
datatables_pinjaman()
|
||||
|
||||
function datatables_pengembalian() {
|
||||
$('#table_pengembalian').DataTable({
|
||||
responsive: true,
|
||||
"ajax": {
|
||||
"type": "POST",
|
||||
"url": url,
|
||||
"data" :{'proses' : 'table_pengembalian_user', nik_user : nik},
|
||||
"timeout": 120000,
|
||||
"dataSrc": function (json) {
|
||||
// console.log(json);
|
||||
if(json != null){
|
||||
return json
|
||||
} else {
|
||||
return "";
|
||||
}
|
||||
}
|
||||
},
|
||||
"sAjaxDataProp": "",
|
||||
"width": "100%",
|
||||
"order": [[ 0, "asc" ]],
|
||||
"aoColumns": [
|
||||
{
|
||||
"mData": null,
|
||||
"title": "No",
|
||||
render: function (data, type, row, meta) {
|
||||
return meta.row + meta.settings._iDisplayStart + 1;
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
"mData": null,
|
||||
"title": "Tanggal",
|
||||
"render": function (data, row, type, meta) {
|
||||
return data.waktu;
|
||||
}
|
||||
},
|
||||
{
|
||||
"mData": null,
|
||||
"title": "Jumlah",
|
||||
"render": function (data, row, type, meta) {
|
||||
return data.ket;
|
||||
}
|
||||
},
|
||||
]
|
||||
});
|
||||
|
||||
|
||||
}
|
||||
datatables_pengembalian()
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
@ -41,7 +41,7 @@
|
||||
<a href="index.html" class="logo">Koperasi Guru</a>
|
||||
<button type="button" class="button-close fa fa-times js__menu_close"></button>
|
||||
<div class="user">
|
||||
<a href="#" class="avatar"><img src="http://placehold.it/80x80" alt=""><span class="status online"></span></a>
|
||||
<a href="#" class="avatar"><img src="../assets/images/user.png" alt=""><span class="status online"></span></a>
|
||||
<h5 class="name"></h5>
|
||||
<h5 class="position"></h5>
|
||||
<!-- /.name -->
|
||||
@ -59,7 +59,7 @@
|
||||
<li>
|
||||
<a class="waves-effect" href="index.html"><i class="menu-icon fa fa-home"></i><span>Halaman Utama</span></a>
|
||||
</li>
|
||||
<li>
|
||||
<!-- <li>
|
||||
<a class="waves-effect parent-item js__control" href="#"><i class="menu-icon mdi mdi-cube-outline"></i><span>Halaman Simpanan</span><span class="menu-arrow fa fa-angle-down"></span></a>
|
||||
<ul class="sub-menu js__content">
|
||||
<li><a href="simpanan_pokok.html">Simpanan Pokok</a></li>
|
||||
@ -67,8 +67,7 @@
|
||||
<li><a href="simpanan_sukarela.html">Simpanan Sukarela</a></li>
|
||||
<li><a href="pinjaman.html">Pinjaman</a></li>
|
||||
</ul>
|
||||
<!-- /.sub-menu js__content -->
|
||||
</li>
|
||||
</li> -->
|
||||
<li class="current">
|
||||
<a class="waves-effect" href="list_barang.html"><i class="menu-icon zmdi zmdi-storage"></i><span>List Barang</span></a>
|
||||
</li>
|
||||
|
||||
@ -41,7 +41,7 @@
|
||||
<a href="index.html" class="logo">Koperasi Guru</a>
|
||||
<button type="button" class="button-close fa fa-times js__menu_close"></button>
|
||||
<div class="user">
|
||||
<a href="#" class="avatar"><img src="http://placehold.it/80x80" alt=""><span class="status online"></span></a>
|
||||
<a href="#" class="avatar"><img src="../assets/images/user.png" alt=""><span class="status online"></span></a>
|
||||
<h5 class="name"></h5>
|
||||
<h5 class="position"></h5>
|
||||
<!-- /.name -->
|
||||
|
||||
@ -41,7 +41,7 @@
|
||||
<a href="index.html" class="logo">Koperasi Guru</a>
|
||||
<button type="button" class="button-close fa fa-times js__menu_close"></button>
|
||||
<div class="user">
|
||||
<a href="#" class="avatar"><img src="http://placehold.it/80x80" alt=""><span class="status online"></span></a>
|
||||
<a href="#" class="avatar"><img src="../assets/images/user.png" alt=""><span class="status online"></span></a>
|
||||
<h5 class="name"></h5>
|
||||
<h5 class="position"></h5>
|
||||
<!-- /.name -->
|
||||
|
||||
@ -41,7 +41,7 @@
|
||||
<a href="index.html" class="logo">Koperasi Guru</a>
|
||||
<button type="button" class="button-close fa fa-times js__menu_close"></button>
|
||||
<div class="user">
|
||||
<a href="#" class="avatar"><img src="http://placehold.it/80x80" alt=""><span class="status online"></span></a>
|
||||
<a href="#" class="avatar"><img src="../assets/images/user.png" alt=""><span class="status online"></span></a>
|
||||
<h5 class="name"></h5>
|
||||
<h5 class="position"></h5>
|
||||
<!-- /.name -->
|
||||
|
||||
@ -41,7 +41,7 @@
|
||||
<a href="index.html" class="logo">Koperasi Guru</a>
|
||||
<button type="button" class="button-close fa fa-times js__menu_close"></button>
|
||||
<div class="user">
|
||||
<a href="#" class="avatar"><img src="http://placehold.it/80x80" alt=""><span class="status online"></span></a>
|
||||
<a href="#" class="avatar"><img src="../assets/images/user.png" alt=""><span class="status online"></span></a>
|
||||
<h5 class="name"></h5>
|
||||
<h5 class="position"></h5>
|
||||
<!-- /.name -->
|
||||
|
||||
Reference in New Issue
Block a user