upgrade mengikuti dalev

This commit is contained in:
2026-05-24 15:56:42 +07:00
parent 2884ce69f1
commit 3837516de1
65 changed files with 1083 additions and 8518 deletions
+86
View File
@@ -0,0 +1,86 @@
/*******************************************************************
App. Name : SISTEM INFORMASI MONITORING DAN EVALUASI
Module : /apps/js/mon/faktor_opd.js
Desc. : JS - Kelola Faktor Pendukung OPD
Created By : Siau Pheng ([email protected]).
Created Date : December 7th, 2011.
Last Modified : May 24th, 2026.
(c) 2011 - 2026, 3FONIA Software; WWW.3FONIA.COM.
*******************************************************************/
var FaktorOPDJS = {
PHP: '',
KODE: '',
loading: function(){
$('#butOPD').click(() => {
if ($('#OPDID').val()>0) this.show_hide(1);
});
this.show_hide(1);
},
show_hide: function(no){
$('#divOPD').addClass('d-none'); $('#butOPD').removeClass('btn-secondary').addClass('btn-info');
$('#divFAKTOR').addClass('d-none');
if (no == 1) {
$('#OPDID').val(0);
$('#ORGID').val(0);
$('#Nama_OPD').val('');
$('#Hak_Real').val(1);
$('#K_OPD').val('');
}
if (no <= 1) {
$('#butOPD').removeClass('btn-info').addClass('btn-secondary');
}
if (no == 1) { $('#divOPD').removeClass('d-none'); this.data_query('tabel-opd'); }
if (no == 2) { $('#divFAKTOR').removeClass('d-none'); this.data_query('detail-faktor'); }
},
opd_select: function(acell){
$('#OPDID').val(acell[0]);
$('#ORGID').val(acell[1]);
$('#Nama_OPD').val(acell[2]);
$('#Hak_Real').val(acell[3]);
$('#K_OPD').val(acell[4]);
this.show_hide(2);
},
faktor_save: function(){
var _param = ['data=simpan-faktor','ORGID','OPDID','K_OPD','DalevRenjaID'];
$(':input[id^="Pendorong_"]').each((i,e) => { _param.push(e.id); });
$(':input[id^="Penghambat_"]').each((i,e) => { _param.push(e.id); });
$(':input[id^="Lanjut_"]').each((i,e) => { _param.push(e.id); });
new Request({
url: this.PHP,
sendParam: _param,
onSuccess: () => {
FoniaJS.showInfo('Sukses menyimpan Faktor Pendukung OPD.');
this.data_query('detail-faktor');
}
}).send();
},
data_query: function(tipe, mode){
if (tipe=="tabel-opd"){
new Request.JSONF({
url: this.PHP,
sendParam: ['data=tabel-opd']
}).send();
} else if (tipe=="detail-faktor"){
new Request.JSON({
url: this.PHP,
sendParam: ['data=detail-faktor','Hak_Real','ORGID','OPDID'],
onSuccess: (adata) => {
$('#divFAKTOR').html(adata.html);
$('#divFAKTOR')
.find('#butBatalFaktor').click((e) => this.show_hide(1)).end()
.find('#butSimpanFaktor').click((e) => this.faktor_save());
}
}).send();
}
}
};