Refactor member and product scripts to use concise method definitions
- Updated all function declarations to use ES6 shorthand method syntax in member.js, member_grup.js, point_barang.js, point_skema.js, point_tipe.js, kategori.js, operator.js, produk.js, produk_grup.js, rekpos.js, satuan.js, supplier.js, and varian.js.
This commit is contained in:
@@ -14,7 +14,7 @@ var RekJS = {
|
||||
PHP: '',
|
||||
KODE: '',
|
||||
|
||||
index: function(){
|
||||
index() {
|
||||
this.data_query('detail');
|
||||
$('#butPrint').click(() => this.print_show());
|
||||
$('#Cari_Rek').keydown((e) => {
|
||||
@@ -29,7 +29,7 @@ var RekJS = {
|
||||
FoniaJS.setFocus('#Cari_Rek');
|
||||
},
|
||||
|
||||
print_show: function(){
|
||||
print_show() {
|
||||
new Request({
|
||||
url: this.PHP + '/detail_print',
|
||||
onSuccess: (ajson) => {
|
||||
@@ -42,7 +42,7 @@ var RekJS = {
|
||||
}).send();
|
||||
},
|
||||
|
||||
print_rek: function(prt){
|
||||
print_rek(prt) {
|
||||
var cetak = new Printer(this.PHP + '/print_rek');
|
||||
cetak.add_param("Grup_RekID");
|
||||
cetak.add_param("Level");
|
||||
@@ -51,7 +51,7 @@ var RekJS = {
|
||||
FoniaJS.closeWindow(this.winDPrint);
|
||||
},
|
||||
|
||||
detail_show: function(mode, ID){
|
||||
detail_show(mode, ID) {
|
||||
new Request({
|
||||
url: this.PHP + '/form_rek',
|
||||
sendParam: ['mode_detail='+mode,'Kode_Rek='+ID],
|
||||
@@ -61,15 +61,15 @@ var RekJS = {
|
||||
}).send();
|
||||
},
|
||||
|
||||
detail_tambah: function(){
|
||||
detail_tambah() {
|
||||
this.detail_show('insert', 0);
|
||||
},
|
||||
|
||||
detail_ubah: function(acell){
|
||||
detail_ubah(acell) {
|
||||
this.detail_show('update', acell[0]);
|
||||
},
|
||||
|
||||
detail_hapus: function(acell){
|
||||
detail_hapus(acell) {
|
||||
FoniaJS.showConfirm('Konfirmasi', 'Yakin akan hapus <b>"'+acell[1]+'"</b> ?', () => {
|
||||
new Request_JSF({
|
||||
url: this.PHP + '/table_detail',
|
||||
@@ -79,7 +79,7 @@ var RekJS = {
|
||||
}, 'danger');
|
||||
},
|
||||
|
||||
detail_save: function(){
|
||||
detail_save() {
|
||||
new Request_JSF({
|
||||
url: this.PHP + '/table_detail',
|
||||
sendParam: ['mode_detail','Kode_Rek','Kode_Induk','Nama_Rek','Grup_RekID','Level','Mode','Kas_Rek','Aktif','Cari_Rek'],
|
||||
@@ -90,7 +90,7 @@ var RekJS = {
|
||||
}).send();
|
||||
},
|
||||
|
||||
data_query: function(tipe, mode){
|
||||
data_query(tipe, mode) {
|
||||
if (tipe=="detail"){
|
||||
new Request_JSF({
|
||||
url: this.PHP + '/table_detail',
|
||||
|
||||
Reference in New Issue
Block a user