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,26 +14,26 @@ var RepoInvLabelJS = {
|
||||
PHP: '',
|
||||
KODE: '',
|
||||
|
||||
index: function(q){
|
||||
index(q) {
|
||||
$('#butHapus').click(() => this.proses_empty());
|
||||
$('#butPrint').click(() => this.proses_print(true));
|
||||
$('#butPreview').click(() => this.proses_print());
|
||||
this.data_query('tabel-detail', 'empty', ((typeof(q)!=='undefined') ? q : ''));
|
||||
},
|
||||
|
||||
proses_empty: function(){
|
||||
proses_empty() {
|
||||
new Request_JSF({
|
||||
url: this.PHP + '/table_detail',
|
||||
sendParam: ['mode_detail=empty']
|
||||
}).send();
|
||||
},
|
||||
|
||||
proses_print: function(prt){
|
||||
proses_print(prt) {
|
||||
var cetak = new Printer(this.PHP + '/print');
|
||||
if (prt) cetak.doPrint(); else cetak.doPreview();
|
||||
},
|
||||
|
||||
produk_brow: function(){
|
||||
produk_brow() {
|
||||
var _isi = new String('<div class="row mb-1"><div class="col"><div class="input-group"><input class="form-control" id="Cari_Produk" placeholder="Kunci Pencarian" type="text"><button class="btn btn-info shadow-none" type="button" id="butSearch">Cari</button><button class="btn btn-secondary shadow-none" type="button" id="butAll">Semua</button></div></div></div><div id="divBrowProduk"> </div>');
|
||||
this.winBProduk = FoniaJS.showWindow('BProduk', 'Daftar Barang', _isi, 'xl', [{},{i:'butTutup'},{i:'butWSimpan',v:'Simpan',c:'success'}], () => {
|
||||
$('#winBProduk')
|
||||
@@ -51,7 +51,7 @@ var RepoInvLabelJS = {
|
||||
});
|
||||
},
|
||||
|
||||
produk_simpan: function(){
|
||||
produk_simpan() {
|
||||
new Request_JSF({
|
||||
url: this.PHP + '/table_detail',
|
||||
sendParam: ['mode_detail=simpan-produk'],
|
||||
@@ -59,7 +59,7 @@ var RepoInvLabelJS = {
|
||||
}).send();
|
||||
},
|
||||
|
||||
grup_brow: function(){
|
||||
grup_brow() {
|
||||
var _isi = new String('<div class="row mb-1"><div class="col"><div class="input-group"><input class="form-control" id="Cari_Grup" placeholder="Kunci Pencarian" type="text"><button class="btn btn-info shadow-none" type="button" id="butSearch">Cari</button><button class="btn btn-secondary shadow-none" type="button" id="butAll">Semua</button></div></div></div><div id="divBrowGrup"> </div>');
|
||||
this.winBGrup = FoniaJS.showWindow('BGrup', 'Daftar Grup Barang', _isi, 'xl', '', () => {
|
||||
$('#winBGrup')
|
||||
@@ -76,7 +76,7 @@ var RepoInvLabelJS = {
|
||||
});
|
||||
},
|
||||
|
||||
grup_select: function(acell){
|
||||
grup_select(acell) {
|
||||
new Request_JSF({
|
||||
url: this.PHP + '/table_detail',
|
||||
sendParam: ['mode_detail=simpan-grup','Grup_InvID='+acell[0]],
|
||||
@@ -84,7 +84,7 @@ var RepoInvLabelJS = {
|
||||
}).send();
|
||||
},
|
||||
|
||||
detail_ubah: function(acell){
|
||||
detail_ubah(acell) {
|
||||
new Request({
|
||||
url: this.PHP + '/form_detail',
|
||||
sendParam: ['mode_detail=update','ID='+acell[0]],
|
||||
@@ -101,7 +101,7 @@ var RepoInvLabelJS = {
|
||||
}).send();
|
||||
},
|
||||
|
||||
detail_hapus: function(acell){
|
||||
detail_hapus(acell) {
|
||||
FoniaJS.showConfirm('Konfirmasi', 'Hapus item <strong>"'+acell[1]+'"</strong> ?', () => {
|
||||
new Request_JSF({
|
||||
url: this.PHP + '/table_detail',
|
||||
@@ -110,7 +110,7 @@ var RepoInvLabelJS = {
|
||||
}, 'danger');
|
||||
},
|
||||
|
||||
detail_simpan: function(){
|
||||
detail_simpan() {
|
||||
new Request_JSF({
|
||||
url: this.PHP + '/table_detail',
|
||||
sendParam: ['mode_detail=update','ID='+$('#ID').val(),'Nama_Produk='+encodeURIComponent($('#Nama_Produk').val())],
|
||||
@@ -118,7 +118,7 @@ var RepoInvLabelJS = {
|
||||
}).send();
|
||||
},
|
||||
|
||||
data_query: function(tipe, mode, kd_tx){
|
||||
data_query(tipe, mode, kd_tx) {
|
||||
if (tipe=="tabel-detail"){
|
||||
new Request_JSF({
|
||||
url: this.PHP + '/table_detail',
|
||||
|
||||
Reference in New Issue
Block a user