validasi kinerja
This commit is contained in:
@@ -196,6 +196,7 @@ var KinerjaJS = {
|
||||
}
|
||||
});
|
||||
});
|
||||
this.data_query('tabel-eviden');
|
||||
});
|
||||
}
|
||||
}).send();
|
||||
@@ -238,6 +239,31 @@ var KinerjaJS = {
|
||||
}).send();
|
||||
},
|
||||
|
||||
eviden_open_doc: function(nfile){
|
||||
FoniaJS.showConfirm('Konfirmasi', 'Yakin akan buka file Dokumen ?', () => {
|
||||
window.open(nfile);
|
||||
}, 'info');
|
||||
},
|
||||
|
||||
eviden_open_pdf: function(nfile){
|
||||
var dpdf = new cPDF(nfile);
|
||||
dpdf.set_zoom(100);
|
||||
dpdf.showPDF();
|
||||
},
|
||||
|
||||
eviden_hapus: function(id, nama){
|
||||
FoniaJS.showConfirm('Konfirmasi', 'Yakin akan hapus <b>"'+nama+'"</b> ?', () => {
|
||||
new Request.JSON({
|
||||
url: this.PHP,
|
||||
sendParam: ['data=tabel-eviden','mode_detail=delete','ORGID','OPDID','ProgID','KegID','SubID','DPASubID','DPAEvidenID='+id],
|
||||
onSuccess: (ajson) => {
|
||||
FoniaJS.showInfo('Proses hapus file sukses!');
|
||||
this.create_Eviden_Table(ajson);
|
||||
}
|
||||
}).send();
|
||||
}, 'danger');
|
||||
},
|
||||
|
||||
akun_ubah: function(acell){
|
||||
new Request({
|
||||
url: this.PHP,
|
||||
@@ -291,6 +317,54 @@ var KinerjaJS = {
|
||||
}).send();
|
||||
},
|
||||
|
||||
create_Eviden_Table: function(ajson) {
|
||||
var opsi = { responsive: true, columnDefs: [{responsivePriority:1,targets:0}, {responsivePriority:2,targets:-1}, {orderable:false,targets:-1}], dom: 'r<"row"<"col-sm-12"t>><"row"<"col-sm-12 col-md-6"<"toolbar">><"col-sm-12 col-md-6"p>>', autoWidth: false, processing: true, searching: false };
|
||||
|
||||
opsi.drawCallback = function(){
|
||||
$('#tabelEviden tbody').on('click', '.fon-tabel-dt', (e) => {
|
||||
var tr = $(e.currentTarget).closest('tr');
|
||||
var row = otabel.row(tr);
|
||||
if (row.child.isShown()){
|
||||
row.child.hide();
|
||||
tr.removeClass('shown');
|
||||
}else{
|
||||
if (otabel.row('.shown').length){
|
||||
$('.fon-tabel-dt', otabel.row('.shown').node()).click();
|
||||
}
|
||||
var _dt_id = $('<div id="TD_Fonia_' + parseInt(Math.random() * 99999999) + '" class="fon-tabel-child" />');
|
||||
row.child(_dt_id).show();
|
||||
tr.addClass('shown');
|
||||
ValidKinerjaJS.eviden_form(row.data(), _dt_id);
|
||||
}
|
||||
});
|
||||
|
||||
$('#tabelEviden tbody').on('click', 'td.dtr-control', (e) => {
|
||||
var tr = $(e.currentTarget).closest('tr');
|
||||
var row = otabel.row(tr);
|
||||
if (row.child.isShown()){
|
||||
row.child.hide();
|
||||
tr.removeClass('dt-hasChild parent');
|
||||
}else{
|
||||
var ind = 0;
|
||||
var tampil = '<ul class="list-unstyled">';
|
||||
api.columns().every(function(){
|
||||
var kol = this.header();
|
||||
if (kol.className.indexOf('dtr-hidden') != -1){
|
||||
tampil += '<li class="py-1"><span class="d-inline-block" style="min-width:100px;">' + kol.textContent + '</span><span class="text-break">' + row.data()[ind] + '</span></li>';
|
||||
}
|
||||
ind++;
|
||||
})
|
||||
tampil += '</ul>';
|
||||
row.child(tampil).show();
|
||||
tr.addClass('dt-hasChild parent');
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
$('#divEviden').html(ajson.html)
|
||||
var otabel = $('#tabelEviden').DataTable(opsi);
|
||||
},
|
||||
|
||||
data_query: function(tipe, mode){
|
||||
if (tipe=="tabel-opd"){
|
||||
new Request.JSONF({
|
||||
@@ -312,6 +386,12 @@ var KinerjaJS = {
|
||||
url: this.PHP,
|
||||
sendParam: ['data=tabel-sub','Hak_Bln','ORGID','OPDID','ProgID','KegID']
|
||||
}).send();
|
||||
} else if (tipe=="tabel-eviden"){
|
||||
new Request.JSON({
|
||||
url: this.PHP,
|
||||
sendParam: ['data=tabel-eviden','Hak_Bln','ORGID','OPDID','ProgID','KegID','SubID','DPASubID'],
|
||||
onSuccess: (ajson) => this.create_Eviden_Table(ajson)
|
||||
}).send();
|
||||
} else if (tipe=="tabel-akun"){
|
||||
new Request.JSONF({
|
||||
url: this.PHP,
|
||||
|
||||
Reference in New Issue
Block a user