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
+12 -12
View File
@@ -258,7 +258,7 @@ var ProdukJS = {
kemasan_del: function(acell){
FoniaJS.showConfirm('Konfirmasi', 'Yakin akan hapus <b>"'+acell[2]+'"</b> ?', () => {
new Request.JSONF({
new Request_JSF({
url: this.PHP + '/tabel_kemasan',
sendParam: ['mode','mode_detail=delete','InvID','InvKemasanID='+acell[0],'SatuanLamaID='+acell[1],'Satuan_Stok='+$('#StokID').find(":selected").text()],
onSuccess: () => {
@@ -275,7 +275,7 @@ var ProdukJS = {
FoniaJS.showInfo('Mohon isi jumlah Qty / Kemasan !');
return false;
}
new Request.JSONF({
new Request_JSF({
url: this.PHP + '/tabel_kemasan',
sendParam: ['mode','mode_detail=update','InvID','InvKemasanID','SatuanID','SatuanLamaID','Qty','Satuan_Stok='+$('#StokID').find(":selected").text()],
onSuccess: () => {
@@ -340,7 +340,7 @@ var ProdukJS = {
varian_del: function(acell){
FoniaJS.showConfirm('Konfirmasi', 'Yakin akan hapus <b>"'+acell[4]+'"</b> ?', () => {
new Request.JSONF({
new Request_JSF({
url: this.PHP + '/tabel_varian',
sendParam: ['mode','mode_detail=delete','InvID','InvVarianID='+acell[0]],
onSuccess: () => FoniaJS.showInfo('Proses hapus data sukses!')
@@ -349,7 +349,7 @@ var ProdukJS = {
},
varian_save: function(){
new Request.JSONF({
new Request_JSF({
url: this.PHP + '/tabel_varian',
sendParam: ['mode','mode_detail=update','InvID','InvVarianID','SatuanID','VarianID','Kode_Barcode'],
onSuccess: () => FoniaJS.showInfo('Sukses menyimpan varian produk.')
@@ -412,7 +412,7 @@ var ProdukJS = {
harga_del: function(acell){
FoniaJS.showConfirm('Konfirmasi', 'Yakin akan hapus <b>"'+acell[1]+' - '+acell[2]+'"</b> ?', () => {
new Request.JSONF({
new Request_JSF({
url: this.PHP + '/tabel_harga',
sendParam: ['mode','mode_detail=delete','InvID','InvHargaID='+acell[0]],
onSuccess: () => FoniaJS.showInfo('Proses hapus data sukses!')
@@ -421,7 +421,7 @@ var ProdukJS = {
},
harga_save: function(){
new Request.JSONF({
new Request_JSF({
url: this.PHP + '/tabel_harga',
sendParam: ['mode','mode_detail=update','InvID','InvHargaID','SatuanID','Grup_MemberID','Harga_Jual'],
onSuccess: () => FoniaJS.showInfo('Sukses menyimpan harga produk.')
@@ -448,12 +448,12 @@ var ProdukJS = {
data_query: function(tipe, mode){
if (tipe=="tabel-produk"){
new Request.JSONF({
new Request_JSF({
url: this.PHP + '/tabel_produk',
sendParam: ['Cari_Produk','Filter_Produk']
}).send();
} else if (tipe=="tabel-kemasan"){
new Request.JSONF({
new Request_JSF({
url: this.PHP + '/tabel_kemasan',
sendParam: ['mode','InvID','Satuan_Stok='+$('#StokID').find(":selected").text()],
onSuccess: () => {
@@ -462,22 +462,22 @@ var ProdukJS = {
}
}).send();
} else if (tipe=="tabel-varian"){
new Request.JSONF({
new Request_JSF({
url: this.PHP + '/tabel_varian',
sendParam: ['mode','InvID']
}).send();
} else if (tipe=="tabel-harga"){
new Request.JSONF({
new Request_JSF({
url: this.PHP + '/tabel_harga',
sendParam: ['mode','InvID']
}).send();
} else if (tipe=="tabel-restore"){
new Request.JSONF({
new Request_JSF({
url: this.PHP + '/tabel_restore',
sendParam: ['InvID']
}).send();
} else if (tipe=="brow-produk"){
new Request.JSONF({
new Request_JSF({
url: this.PHP + '/brow_produk',
sendParam: ['Cari_Produk2'],
onSuccess: () => FoniaJS.setFocus('#Cari_Produk2')