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:
2026-11-01 14:57:54 +07:00
parent be2091eddd
commit aaaf0a9215
92 changed files with 749 additions and 749 deletions
+15 -15
View File
@@ -14,7 +14,7 @@ var PromoTotalJS = {
PHP: '',
KODE: '',
index: function(){
index() {
this.data_query('detail');
$('#Cari_Promo').keydown((e) => {
var key = e.keyCode || e.which || 0;
@@ -28,7 +28,7 @@ var PromoTotalJS = {
FoniaJS.setFocus('#Cari_Promo');
},
detail_show: function(mode, ID){
detail_show(mode, ID) {
new Request({
url: this.PHP + '/form_promo',
sendParam: ['mode_detail='+mode,'PromoID='+ID],
@@ -47,15 +47,15 @@ var PromoTotalJS = {
}).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[2]+'"</b> ?', () => {
new Request_JSF({
url: this.PHP + '/table_promo',
@@ -65,7 +65,7 @@ var PromoTotalJS = {
}, 'danger');
},
detail_save: function(){
detail_save() {
new Request_JSF({
url: this.PHP + '/table_promo',
sendParam: ['mode_detail','PromoID','Nama_Promo','Jual_Min','Jual_Grup','CabID','Grup_MemberID','Tipe_Promo','Promo_Jual','Promo_InvID','Promo_SatuanID','Promo_Qty','Jumlah_Promo','Tgl_Mulai','Tgl_Akhir','Aktif','Cari_Promo'],
@@ -76,7 +76,7 @@ var PromoTotalJS = {
}).send();
},
grup_show: function(){
grup_show() {
new Request({
url: this.PHP + '/form_grup',
sendParam: ['Jual_Grup'],
@@ -91,15 +91,15 @@ var PromoTotalJS = {
}).send();
},
grup_semua: function(){
grup_semua() {
$('#tabGrupList input.form-check-input[type=checkbox]').prop('checked', true);
},
grup_clear: function(){
grup_clear() {
$('#tabGrupList input.form-check-input[type=checkbox]').prop('checked', false);
},
grup_save: function(){
grup_save() {
var alist = [];
$('#tabGrupList tbody input.form-check-input[type=checkbox]:checked').map((i, b) => {
alist.push($(b).val());
@@ -108,7 +108,7 @@ var PromoTotalJS = {
FoniaJS.closeWindow(this.winGrup);
},
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">&nbsp;</div>');
this.winBProduk = FoniaJS.showWindow('BProduk', 'Daftar Barang', _isi, 'lg', '', () => {
$('#winBProduk')
@@ -126,14 +126,14 @@ var PromoTotalJS = {
});
},
produk_select: function(acell){
produk_select(acell) {
FoniaJS.closeWindow(this.winBProduk);
$('#Promo_InvID').val(acell[0]);
$('#Promo_Produk').val(acell[1]);
this.update_Items(acell[0], 0);
},
data_query: function(tipe, mode){
data_query(tipe, mode) {
if (tipe=="detail"){
new Request_JSF({
url: this.PHP + '/table_promo',
@@ -148,7 +148,7 @@ var PromoTotalJS = {
}
},
update_Items: function(InvID, SatuanID){
update_Items(InvID, SatuanID) {
$('#Promo_SatuanID').empty();
if (InvID==0) return false;
new Request({
@@ -163,7 +163,7 @@ var PromoTotalJS = {
}).send();
},
oc_PilihP: function(){
oc_PilihP() {
var i = parseInt($('#Tipe_Promo').val());
if (i == 4){
$('.promo1').removeClass('d-none');