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,34 +14,34 @@ var DISPConfigJS = {
|
||||
PHP: '',
|
||||
KODE: '',
|
||||
|
||||
index: function(){
|
||||
index() {
|
||||
$('#butBrow').click(() => this.cab_brow());
|
||||
$('#butUbah').click(() => this.proses_edit());
|
||||
$('#butSimpan').click(() => this.proses_save());
|
||||
this.data_query('form-display');
|
||||
},
|
||||
|
||||
cab_brow: function(){
|
||||
cab_brow() {
|
||||
var _isi = new String('<div id="divBrowCab"> </div>');
|
||||
this.winBCab = FoniaJS.showWindow('BCab', 'Daftar Cabang', _isi, 'lg', '', () => this.data_query('brow-cabang'));
|
||||
},
|
||||
|
||||
cab_select: function(acell){
|
||||
cab_select(acell) {
|
||||
FoniaJS.closeWindow(this.winBCab);
|
||||
$('#REG_ID').val(acell[0]);
|
||||
this.data_query('form-display', 'view');
|
||||
},
|
||||
|
||||
proses_edit: function(){
|
||||
proses_edit() {
|
||||
this.data_query('form-display', 'edit');
|
||||
this.load_port();
|
||||
},
|
||||
|
||||
proses_save: function(){
|
||||
proses_save() {
|
||||
this.data_query('form-display', 'save');
|
||||
},
|
||||
|
||||
data_query: function(tipe, mode){
|
||||
data_query(tipe, mode) {
|
||||
if (tipe=='form-display'){
|
||||
new Request({
|
||||
url: this.PHP + '/form_display',
|
||||
@@ -60,7 +60,7 @@ var DISPConfigJS = {
|
||||
}
|
||||
},
|
||||
|
||||
update_event: function(){
|
||||
update_event() {
|
||||
if ($.inArray($('#mode').val(), ['edit']) >= 0) {
|
||||
$('#butBrow').prop('disabled', true);
|
||||
$('#butUbah').prop('disabled', true);
|
||||
@@ -72,7 +72,7 @@ var DISPConfigJS = {
|
||||
}
|
||||
},
|
||||
|
||||
load_port: function(){
|
||||
load_port() {
|
||||
var parent = this;
|
||||
qz.serial.findPorts().then(function(data){
|
||||
var _selport = $('#POLE_PORT').val();
|
||||
|
||||
Reference in New Issue
Block a user