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,13 +14,13 @@ var GELKaryaJS = {
|
||||
PHP: '',
|
||||
KODE: '',
|
||||
|
||||
index: function(q){
|
||||
index(q) {
|
||||
$('#butPinjam').click(() => this.tx_pinjam());
|
||||
$('#butBayar').click(() => this.tx_bayar());
|
||||
this.data_query('master', 'view', ((typeof(q)!=='undefined') ? q : ''));
|
||||
},
|
||||
|
||||
tx_pinjam: function(){
|
||||
tx_pinjam() {
|
||||
new Request({
|
||||
url: this.PHP + '/form_pinjam',
|
||||
sendParam: ['KaryaID'],
|
||||
@@ -33,7 +33,7 @@ var GELKaryaJS = {
|
||||
}).send();
|
||||
},
|
||||
|
||||
tx_bayar: function(){
|
||||
tx_bayar() {
|
||||
new Request({
|
||||
url: this.PHP + '/form_bayar',
|
||||
sendParam: ['KaryaID'],
|
||||
@@ -46,7 +46,7 @@ var GELKaryaJS = {
|
||||
}).send();
|
||||
},
|
||||
|
||||
pinjam_simpan: function(){
|
||||
pinjam_simpan() {
|
||||
if (FoniaJS.StrToFloat($('#Total_Pinjam').val()) == 0){
|
||||
FoniaJS.showError("Silahkan masukkan jumlah pinjaman !");
|
||||
return;
|
||||
@@ -58,7 +58,7 @@ var GELKaryaJS = {
|
||||
}).send();
|
||||
},
|
||||
|
||||
bayar_simpan: function(){
|
||||
bayar_simpan() {
|
||||
if (FoniaJS.StrToFloat($('#Total_Bayar').val()) == 0){
|
||||
FoniaJS.showError("Silahkan masukkan jumlah pembayaran !");
|
||||
return;
|
||||
@@ -70,7 +70,7 @@ var GELKaryaJS = {
|
||||
}).send();
|
||||
},
|
||||
|
||||
karya_hapus: function(acell){
|
||||
karya_hapus(acell) {
|
||||
FoniaJS.showConfirm('Konfirmasi', 'Hapus item <strong>"'+acell[0]+'"</strong> ?', () => {
|
||||
new Request_JSF({
|
||||
url: this.PHP + '/table_karya',
|
||||
@@ -79,7 +79,7 @@ var GELKaryaJS = {
|
||||
}, 'danger');
|
||||
},
|
||||
|
||||
data_query: function(tipe, mode, kd_tx){
|
||||
data_query(tipe, mode, kd_tx) {
|
||||
if (tipe=="master"){
|
||||
new Request({
|
||||
url: this.PHP + '/form_master',
|
||||
@@ -98,7 +98,7 @@ var GELKaryaJS = {
|
||||
}
|
||||
},
|
||||
|
||||
ocKarya: function() {
|
||||
ocKarya() {
|
||||
this.data_query('master');
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user