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 RepoJualMarginJS = {
|
||||
PHP: '',
|
||||
KODE: '',
|
||||
|
||||
index: function(){
|
||||
index() {
|
||||
$('#butCetak').click(() => this.proses_print(true));
|
||||
$('#butPreview').click(() => this.proses_print());
|
||||
$('#butExcel').click(() => this.proses_dload());
|
||||
@@ -22,7 +22,7 @@ var RepoJualMarginJS = {
|
||||
FoniaJS.AutoComplete('#Nama_Member', this.PHP + '/auto_member', [], {'selectFunc':this.Member_Comp});
|
||||
},
|
||||
|
||||
proses_print: function(prt){
|
||||
proses_print(prt) {
|
||||
var cetak = new Printer(this.PHP + '/print');
|
||||
cetak.add_param("Tipe");
|
||||
cetak.add_param("CabID");
|
||||
@@ -33,7 +33,7 @@ var RepoJualMarginJS = {
|
||||
if (prt) cetak.doPrint(); else cetak.doPreview();
|
||||
},
|
||||
|
||||
proses_dload: function(){
|
||||
proses_dload() {
|
||||
var dload = new Download(this.PHP + '/excel');
|
||||
dload.add_param("Tipe");
|
||||
dload.add_param("CabID");
|
||||
@@ -44,7 +44,7 @@ var RepoJualMarginJS = {
|
||||
dload.download();
|
||||
},
|
||||
|
||||
member_brow: function(){
|
||||
member_brow() {
|
||||
var _isi = new String('<div class="row mb-1"><div class="col"><div class="input-group"><input class="form-control" id="Cari_Member" 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="divBrowMember"> </div>');
|
||||
this.winBMember = FoniaJS.showWindow('BMember', 'Daftar Member', _isi, 'xl', '', () => {
|
||||
$('#winBMember')
|
||||
@@ -61,13 +61,13 @@ var RepoJualMarginJS = {
|
||||
});
|
||||
},
|
||||
|
||||
member_select: function(acell){
|
||||
member_select(acell) {
|
||||
FoniaJS.closeWindow(this.winBMember);
|
||||
$('#MemberID').val(acell[0]);
|
||||
$('#Nama_Member').val(acell[1]);
|
||||
},
|
||||
|
||||
data_query: function(tipe){
|
||||
data_query(tipe) {
|
||||
if (tipe=="brow-member"){
|
||||
new Request_JSF({
|
||||
url: this.PHP + '/brow_member',
|
||||
@@ -77,7 +77,7 @@ var RepoJualMarginJS = {
|
||||
}
|
||||
},
|
||||
|
||||
Member_Comp: function(item){
|
||||
Member_Comp(item) {
|
||||
$('#MemberID').val(item.value);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user