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:
@@ -15,7 +15,7 @@ var CekHargaJS = {
|
||||
KODE: '',
|
||||
html5QrcodeScanner: null,
|
||||
|
||||
index: function(){
|
||||
index() {
|
||||
$('#butBrow').click(() => this.produk_brow());
|
||||
if (FoniaJS.WEB_MOBILE){
|
||||
html5QrcodeScanner = new Html5Qrcode('qr-reader');
|
||||
@@ -26,7 +26,7 @@ var CekHargaJS = {
|
||||
}
|
||||
},
|
||||
|
||||
ScanSukses: function(decodedText, decodedResult){
|
||||
ScanSukses(decodedText, decodedResult) {
|
||||
new Request({
|
||||
url: CekHargaJS.PHP + '/scan_produk',
|
||||
sendParam: ['Cari_Produk='+decodedText],
|
||||
@@ -41,7 +41,7 @@ var CekHargaJS = {
|
||||
}).send();
|
||||
},
|
||||
|
||||
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', '', () => {
|
||||
$('#winBProduk')
|
||||
@@ -58,7 +58,7 @@ var CekHargaJS = {
|
||||
});
|
||||
},
|
||||
|
||||
produk_select: function(acell){
|
||||
produk_select(acell) {
|
||||
FoniaJS.closeWindow(this.winBProduk);
|
||||
$('#InvID').val(acell[0]);
|
||||
$('#Kode_Barang').val(acell[1]+' / '+acell[2]);
|
||||
@@ -68,7 +68,7 @@ var CekHargaJS = {
|
||||
this.update_Sup();
|
||||
},
|
||||
|
||||
data_query: function(tipe){
|
||||
data_query(tipe) {
|
||||
if (tipe=="brow-produk"){
|
||||
new Request_JSF({
|
||||
url: this.PHP + '/brow_produk',
|
||||
@@ -78,7 +78,7 @@ var CekHargaJS = {
|
||||
}
|
||||
},
|
||||
|
||||
Produk_Comp: function(item){
|
||||
Produk_Comp(item) {
|
||||
var adata = item.data.split(':');
|
||||
$('#InvID').val(item.value);
|
||||
$('#Nama_Barang').val(item.text);
|
||||
@@ -89,7 +89,7 @@ var CekHargaJS = {
|
||||
CekHargaJS.update_Sup();
|
||||
},
|
||||
|
||||
update_Sup: function(){
|
||||
update_Sup() {
|
||||
if (parseInt($('#InvID').val()) == 0) return false;
|
||||
new Request_JSF({
|
||||
url: this.PHP + '/update_sup',
|
||||
|
||||
Reference in New Issue
Block a user