Refactor AJAX requests from Request.JSONF to Request_JSF across multiple scripts for consistency and improved functionality.
This commit is contained in:
@@ -53,7 +53,7 @@ var PointSkemaJS = {
|
||||
|
||||
detail_hapus: function(acell){
|
||||
FoniaJS.showConfirm('Konfirmasi', 'Yakin akan hapus <b>"'+acell[5]+'"</b> ?', () => {
|
||||
new Request.JSONF({
|
||||
new Request_JSF({
|
||||
url: this.PHP + '/table_detail',
|
||||
sendParam: ['mode_detail=delete','PointID='+acell[0],'Cari_Skema'],
|
||||
onSuccess: () => FoniaJS.showInfo('Proses hapus data sukses!')
|
||||
@@ -62,7 +62,7 @@ var PointSkemaJS = {
|
||||
},
|
||||
|
||||
detail_save: function(){
|
||||
new Request.JSONF({
|
||||
new Request_JSF({
|
||||
url: this.PHP + '/table_detail',
|
||||
sendParam: ['mode_detail','PointID','Point_TipeID','KartuID','CabID','Grup_MemberID','Nilai_Jual','Grup_Barang','Kode_Barang','Tgl_Mulai','Aktif','Cari_Skema'],
|
||||
onSuccess: () => {
|
||||
@@ -119,7 +119,7 @@ var PointSkemaJS = {
|
||||
|
||||
barang_hapus: function(acell){
|
||||
FoniaJS.showConfirm('Konfirmasi', 'Yakin akan hapus <b>"'+acell[1]+'"</b> ?', () => {
|
||||
new Request.JSONF({
|
||||
new Request_JSF({
|
||||
url: this.PHP + '/table_barang',
|
||||
sendParam: ['mode_detail=delete','InvID='+acell[0],'Kode_Barang'],
|
||||
onSuccess: () => FoniaJS.showInfo('Proses hapus data sukses!')
|
||||
@@ -129,12 +129,12 @@ var PointSkemaJS = {
|
||||
|
||||
data_query: function(tipe, mode){
|
||||
if (tipe=="detail"){
|
||||
new Request.JSONF({
|
||||
new Request_JSF({
|
||||
url: this.PHP + '/table_detail',
|
||||
sendParam: ['Cari_Skema']
|
||||
}).send();
|
||||
} else if (tipe=="tabel-barang"){
|
||||
new Request.JSONF({
|
||||
new Request_JSF({
|
||||
url: this.PHP + '/table_barang',
|
||||
sendParam: ['Kode_Barang'],
|
||||
onSuccess: () => FoniaJS.setFocus('#Nama_Produk')
|
||||
@@ -143,7 +143,7 @@ var PointSkemaJS = {
|
||||
},
|
||||
|
||||
Produk_Comp: function(item){
|
||||
new Request.JSONF({
|
||||
new Request_JSF({
|
||||
url: PointSkemaJS.PHP + '/table_barang',
|
||||
sendParam: ['mode_detail=insert','Kode_Barang','InvID='+item.value]
|
||||
}).send();
|
||||
|
||||
Reference in New Issue
Block a user