Refactor AJAX requests from Request.JSONF to Request_JSF across multiple scripts for consistency and improved functionality.

This commit is contained in:
2026-11-01 13:11:40 +07:00
parent 52897c25c5
commit 7a585ab7c2
58 changed files with 200 additions and 200 deletions
+6 -6
View File
@@ -187,7 +187,7 @@ var GELGajiJS = {
detail_hapus: function(acell){
FoniaJS.showConfirm('Konfirmasi', 'Hapus item <strong>"'+acell[2]+'"</strong> ?', () => {
new Request.JSONF({
new Request_JSF({
url: this.PHP + '/table_detail',
sendParam: ['mode','mode_detail=delete','No_Gaji','ID='+acell[0]]
}).send();
@@ -203,7 +203,7 @@ var GELGajiJS = {
FoniaJS.showError('Jumlah Potongan melebihi Jumlah Pinjaman !');
}
var _mdetail = $('#mode_detail').val();
new Request.JSONF({
new Request_JSF({
url: this.PHP + '/table_detail',
sendParam: ['mode','mode_detail','No_Gaji','KaryaID','Qty_Harian','Gaji_Harian','Qty_Lembur','Lembur_Harian','Qty_BonusM','Qty_BonusB','Bonus_Minggu','Bonus_Bulan','Total_Potong','CatatKar','ID'],
onSuccess: () => {
@@ -248,24 +248,24 @@ var GELGajiJS = {
}
}).send();
} else if (tipe=="tabel-detail"){
new Request.JSONF({
new Request_JSF({
url: this.PHP + '/table_detail',
sendParam: ['mode','No_Gaji']
}).send();
} else if (tipe=="brow-tx"){
new Request.JSONF({
new Request_JSF({
url: this.PHP + '/brow_tx',
sendParam: ['Cari_TX'],
onSuccess: () => FoniaJS.setFocus('#Cari_TX')
}).send();
} else if (tipe=="brow-karya"){
new Request.JSONF({
new Request_JSF({
url: this.PHP + '/brow_karya',
sendParam: ['No_Gaji','Cari_Karya'],
onSuccess: () => FoniaJS.setFocus('#Cari_Karya')
}).send();
} else if (tipe=="brow-cetak"){
new Request.JSONF({
new Request_JSF({
url: this.PHP + '/brow_cetak',
sendParam: ['No_Gaji']
}).send();
+5 -5
View File
@@ -98,7 +98,7 @@ var GELHutangJS = {
bayar_hapus: function(acell){
FoniaJS.showConfirm('Konfirmasi', 'Hapus item <strong>"'+acell[1]+'"</strong> ?', () => {
new Request.JSONF({
new Request_JSF({
url: this.PHP + '/table_bayar',
sendParam: ['mode_detail=delete','No_Beli','ID='+acell[0]]
}).send();
@@ -110,7 +110,7 @@ var GELHutangJS = {
FoniaJS.showError("Jumlah pelunasan melebihi jumlah faktur!");
return;
}
new Request.JSONF({
new Request_JSF({
url: this.PHP + '/table_bayar',
sendParam: ['mode_detail=insert','SupID','No_Beli','Tgl_Bayar','Kode_Rek','Total_Bayar','Total_Potong','Tipe_Nota','Nama_Sup'],
onSuccess: () => FoniaJS.closeWindow(this.winBayar)
@@ -135,17 +135,17 @@ var GELHutangJS = {
}
}).send();
} else if (tipe=="tabel-nota"){
new Request.JSONF({
new Request_JSF({
url: this.PHP + '/table_nota',
sendParam: ['SupID','Mode_Tampil']
}).send();
} else if (tipe=="tabel-bayar"){
new Request.JSONF({
new Request_JSF({
url: this.PHP + '/table_bayar',
sendParam: ['No_Beli','Lunas','Mode_Tampil']
}).send();
} else if (tipe=="brow-sup"){
new Request.JSONF({
new Request_JSF({
url: this.PHP + '/brow_sup',
sendParam: ['Cari_Sup'],
onSuccess: () => FoniaJS.setFocus('#Cari_Sup')
+4 -4
View File
@@ -51,7 +51,7 @@ var GELKaryaJS = {
FoniaJS.showError("Silahkan masukkan jumlah pinjaman !");
return;
}
new Request.JSONF({
new Request_JSF({
url: this.PHP + '/table_karya',
sendParam: ['mode_detail=insert','Tgl_Trans','Kode_Rek','Total_Pinjam','KaryaID','Nama_Karya='+$('#KaryaID').find(':selected').text(),'Catatan','is_pinjam=1'],
onSuccess: () => FoniaJS.closeWindow(this.winPinjam)
@@ -63,7 +63,7 @@ var GELKaryaJS = {
FoniaJS.showError("Silahkan masukkan jumlah pembayaran !");
return;
}
new Request.JSONF({
new Request_JSF({
url: this.PHP + '/table_karya',
sendParam: ['mode_detail=insert','Tgl_Trans','Kode_Rek','Total_Bayar','KaryaID','Nama_Karya='+$('#KaryaID').find(':selected').text(),'Catatan','is_pinjam=0'],
onSuccess: () => FoniaJS.closeWindow(this.winBayar)
@@ -72,7 +72,7 @@ var GELKaryaJS = {
karya_hapus: function(acell){
FoniaJS.showConfirm('Konfirmasi', 'Hapus item <strong>"'+acell[0]+'"</strong> ?', () => {
new Request.JSONF({
new Request_JSF({
url: this.PHP + '/table_karya',
sendParam: ['mode_detail=delete','KaryaID','No_Trans='+acell[0]]
}).send();
@@ -91,7 +91,7 @@ var GELKaryaJS = {
}
}).send();
} else if (tipe=="tabel-karya"){
new Request.JSONF({
new Request_JSF({
url: this.PHP + '/table_karya',
sendParam: ['KaryaID']
}).send();
+5 -5
View File
@@ -169,7 +169,7 @@ var GELKeluarJS = {
detail_hapus: function(acell){
FoniaJS.showConfirm('Konfirmasi', 'Hapus item <strong>"'+acell[1]+' - '+acell[2]+'"</strong> ?', () => {
new Request.JSONF({
new Request_JSF({
url: this.PHP + '/table_detail',
sendParam: ['mode','mode_detail=delete','Kode_Jurnal','ID='+acell[0]]
}).send();
@@ -182,7 +182,7 @@ var GELKeluarJS = {
return;
}
var _mdetail = $('#mode_detail').val();
new Request.JSONF({
new Request_JSF({
url: this.PHP + '/table_detail',
sendParam: ['mode','mode_detail','Kode_Jurnal','Kode_Rek','Jumlah','ID'],
onSuccess: () => {
@@ -234,18 +234,18 @@ var GELKeluarJS = {
}
}).send();
} else if (tipe=="tabel-detail"){
new Request.JSONF({
new Request_JSF({
url: this.PHP + '/table_detail',
sendParam: ['mode','Kode_Jurnal']
}).send();
} else if (tipe=="brow-tx"){
new Request.JSONF({
new Request_JSF({
url: this.PHP + '/brow_tx',
sendParam: ['Cari_TX'],
onSuccess: () => FoniaJS.setFocus('#Cari_TX')
}).send();
} else if (tipe=="brow-rek"){
new Request.JSONF({
new Request_JSF({
url: this.PHP + '/brow_rek',
sendParam: ['Cari_Rek'],
onSuccess: () => FoniaJS.setFocus('#Cari_Rek')
+5 -5
View File
@@ -98,7 +98,7 @@ var GELPiutangJS = {
bayar_hapus: function(acell){
FoniaJS.showConfirm('Konfirmasi', 'Hapus item <strong>"'+acell[1]+'"</strong> ?', () => {
new Request.JSONF({
new Request_JSF({
url: this.PHP + '/table_bayar',
sendParam: ['mode_detail=delete','No_Jual','ID='+acell[0]]
}).send();
@@ -110,7 +110,7 @@ var GELPiutangJS = {
FoniaJS.showError("Jumlah pelunasan melebihi jumlah faktur!");
return;
}
new Request.JSONF({
new Request_JSF({
url: this.PHP + '/table_bayar',
sendParam: ['mode_detail=insert','MemberID','No_Jual','Tgl_Bayar','Kode_Rek','Total_Bayar','Total_Potong','Tipe_Nota','Nama_Member'],
onSuccess: () => FoniaJS.closeWindow(this.winBayar)
@@ -135,17 +135,17 @@ var GELPiutangJS = {
}
}).send();
} else if (tipe=="tabel-nota"){
new Request.JSONF({
new Request_JSF({
url: this.PHP + '/table_nota',
sendParam: ['MemberID','Mode_Tampil']
}).send();
} else if (tipe=="tabel-bayar"){
new Request.JSONF({
new Request_JSF({
url: this.PHP + '/table_bayar',
sendParam: ['No_Jual','Lunas','Mode_Tampil']
}).send();
} else if (tipe=="brow-buyer"){
new Request.JSONF({
new Request_JSF({
url: this.PHP + '/brow_buyer',
sendParam: ['Cari_Buyer'],
onSuccess: () => FoniaJS.setFocus('#Cari_Buyer')
+5 -5
View File
@@ -169,7 +169,7 @@ var GELTerimaJS = {
detail_hapus: function(acell){
FoniaJS.showConfirm('Konfirmasi', 'Hapus item <strong>"'+acell[1]+' - '+acell[2]+'"</strong> ?', () => {
new Request.JSONF({
new Request_JSF({
url: this.PHP + '/table_detail',
sendParam: ['mode','mode_detail=delete','Kode_Jurnal','ID='+acell[0]]
}).send();
@@ -182,7 +182,7 @@ var GELTerimaJS = {
return;
}
var _mdetail = $('#mode_detail').val();
new Request.JSONF({
new Request_JSF({
url: this.PHP + '/table_detail',
sendParam: ['mode','mode_detail','Kode_Jurnal','Kode_Rek','Jumlah','ID'],
onSuccess: () => {
@@ -234,18 +234,18 @@ var GELTerimaJS = {
}
}).send();
} else if (tipe=="tabel-detail"){
new Request.JSONF({
new Request_JSF({
url: this.PHP + '/table_detail',
sendParam: ['mode','Kode_Jurnal']
}).send();
} else if (tipe=="brow-tx"){
new Request.JSONF({
new Request_JSF({
url: this.PHP + '/brow_tx',
sendParam: ['Cari_TX'],
onSuccess: () => FoniaJS.setFocus('#Cari_TX')
}).send();
} else if (tipe=="brow-rek"){
new Request.JSONF({
new Request_JSF({
url: this.PHP + '/brow_rek',
sendParam: ['Cari_Rek'],
onSuccess: () => FoniaJS.setFocus('#Cari_Rek')
+5 -5
View File
@@ -172,7 +172,7 @@ var GELUmumJS = {
detail_hapus: function(acell){
FoniaJS.showConfirm('Konfirmasi', 'Hapus item <strong>"'+acell[1]+' - '+acell[2]+'"</strong> ?', () => {
new Request.JSONF({
new Request_JSF({
url: this.PHP + '/table_detail',
sendParam: ['mode','mode_detail=delete','Kode_Jurnal','ID='+acell[0]]
}).send();
@@ -185,7 +185,7 @@ var GELUmumJS = {
return;
}
var _mdetail = $('#mode_detail').val();
new Request.JSONF({
new Request_JSF({
url: this.PHP + '/table_detail',
sendParam: ['mode','mode_detail','Kode_Jurnal','Kode_Rek','DK','Jumlah','ID'],
onSuccess: () => {
@@ -237,18 +237,18 @@ var GELUmumJS = {
}
}).send();
} else if (tipe=="tabel-detail"){
new Request.JSONF({
new Request_JSF({
url: this.PHP + '/table_detail',
sendParam: ['mode','Kode_Jurnal']
}).send();
} else if (tipe=="brow-tx"){
new Request.JSONF({
new Request_JSF({
url: this.PHP + '/brow_tx',
sendParam: ['Cari_TX'],
onSuccess: () => FoniaJS.setFocus('#Cari_TX')
}).send();
} else if (tipe=="brow-rek"){
new Request.JSONF({
new Request_JSF({
url: this.PHP + '/brow_rek',
sendParam: ['Cari_Rek'],
onSuccess: () => FoniaJS.setFocus('#Cari_Rek')