Refactor AJAX requests from Request.JSONF to Request_JSF across multiple scripts for consistency and improved functionality.
This commit is contained in:
@@ -59,7 +59,7 @@ var PromoBarangJS = {
|
||||
|
||||
detail_hapus: function(acell){
|
||||
FoniaJS.showConfirm('Konfirmasi', 'Yakin akan hapus <b>"'+acell[2]+'"</b> ?', () => {
|
||||
new Request.JSONF({
|
||||
new Request_JSF({
|
||||
url: this.PHP + '/table_promo',
|
||||
sendParam: ['mode_detail=delete','PromoID='+acell[0],'Cari_Promo'],
|
||||
onSuccess: () => FoniaJS.showInfo('Proses hapus data sukses!')
|
||||
@@ -68,7 +68,7 @@ var PromoBarangJS = {
|
||||
},
|
||||
|
||||
detail_save: function(){
|
||||
new Request.JSONF({
|
||||
new Request_JSF({
|
||||
url: this.PHP + '/table_promo',
|
||||
sendParam: ['mode_detail','PromoID','InvID','SatuanID','CabID','Grup_MemberID','Pilih_Qty','Qty_Min','Qty_Kali','Tipe_Promo','Promo_Disc','Promo_InvID','Promo_SatuanID','Promo_Qty','Jumlah_Promo','Tgl_Mulai','Tgl_Akhir','Aktif','Cari_Promo'],
|
||||
onSuccess: () => {
|
||||
@@ -112,12 +112,12 @@ var PromoBarangJS = {
|
||||
|
||||
data_query: function(tipe, mode){
|
||||
if (tipe=="detail"){
|
||||
new Request.JSONF({
|
||||
new Request_JSF({
|
||||
url: this.PHP + '/table_promo',
|
||||
sendParam: ['Cari_Promo']
|
||||
}).send();
|
||||
} else if (tipe=="brow-produk"){
|
||||
new Request.JSONF({
|
||||
new Request_JSF({
|
||||
url: this.PHP + '/brow_produk',
|
||||
sendParam: ['Cari_Produk'],
|
||||
onSuccess: () => FoniaJS.setFocus('#Cari_Produk')
|
||||
|
||||
Reference in New Issue
Block a user