Update dan Bugs Fix

This commit is contained in:
Pusdatin BPKD Jkt
2022-09-12 11:49:56 +07:00
parent 145f9d4c48
commit 35b4c72eb3
11 changed files with 130 additions and 126 deletions
@@ -171,38 +171,6 @@
<td>AKB</td>
<td>Realisasi</td>
</tr>
<!--<tr class="drop-search">
<th></th>
<th></th>
<th></th>
<th></th>
<th></th>
<th></th>
<th></th>
<th></th>
<th></th>
<th></th>
<th></th>
<th></th>
<th></th>
<th></th>
<th></th>
<th></th>
<th></th>
<th></th>
<th></th>
<th></th>
<th></th>
<th></th>
<th></th>
<th></th>
<th></th>
<th></th>
<th></th>
<th></th>
<th></th>
<th></th>
</tr>-->
</thead>
<tbody>
<?php
@@ -260,6 +228,27 @@
$(document).ready(function(){
var srcDate1 = null, srcDate2 = null;
optionDAK = () =>{
$.ajax({
url: '{{ $baseUrl }}/item-search-sps?ta='+$("#srcTA").val()+'&jenis=dak',
dataType: 'json',
async: false,
success: function (data) {
$('#txt_id_sps').empty();
$('#txt_id_sps').append($('<option>',{value:"",text:""}));
$.map(data, function (item) {
$('#txt_id_sps').append($('<option>', {
value: item.id,
text : item.name
}));
})
},
});
}
optionDAK();
$('#txt_id_sps').val({{ $idSPS }});
$("#src").keyup(function(e){
if (e.keyCode == 13){
e.preventDefault();
@@ -304,27 +293,6 @@
},
scrollX: true,
scrollY: "350px",
// initComplete: function () {
// this.api().columns([1]).every( function () {
// var column = this;
// // console.log(this.index())
// var select = $('<select><option value=""></option></select>')
// .appendTo( $('.drop-search th:eq(' + this.index() + ')') )
// .on( 'change', function () {
// var val = $.fn.dataTable.util.escapeRegex(
// $(this).val()
// );
// column
// .search( val ? '^'+val+'$' : '', true, false )
// .draw();
// } );
// column.data().unique().sort().each( function ( d, j ) {
// select.append( '<option value="'+d+'">'+d+'</option>' )
// } );
// });
// }
initComplete: function () {
this.api().columns([1]).every( function () {
var column = this;
@@ -522,28 +490,12 @@
],
});
optionDAK = () =>{
$.ajax({
url: '{{ $baseUrl }}/item-search-sps?ta='+$("#srcTA").val()+'&jenis=dak',
dataType: 'json',
success: function (data) {
$('#txt_id_sps').empty();
$('#txt_id_sps').append($('<option>',{value:"",text:""}));
$.map(data, function (item) {
$('#txt_id_sps').append($('<option>', {
value: item.id,
text : item.name
}));
})
},
});
}
$('#txt_id_sps').on('change', function (e) {
dtTableSalur.draw();
//dtTableSalur.draw();
$(".dataTables_processing").show();
location.href = "?id_sps="+$(this).val();
})
optionDAK();
});
</script>
@endsection