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,32 +14,32 @@ var PrinterJS = {
|
||||
PHP: '',
|
||||
KODE: '',
|
||||
|
||||
index: function(){
|
||||
index() {
|
||||
$('#butBrow').click(() => this.cab_brow());
|
||||
$('#butUbah').click(() => this.proses_edit());
|
||||
$('#butSimpan').click(() => this.proses_save());
|
||||
this.data_query('form-printer');
|
||||
},
|
||||
|
||||
cab_brow: function(){
|
||||
cab_brow() {
|
||||
this.winBCab = FoniaJS.showWindow('BCab', 'Daftar Cabang', '<div id="divBrowCab"> </div>', '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-printer', 'view');
|
||||
},
|
||||
|
||||
proses_edit: function(){
|
||||
proses_edit() {
|
||||
this.data_query('form-printer', 'edit');
|
||||
},
|
||||
|
||||
proses_save: function(){
|
||||
proses_save() {
|
||||
this.data_query('form-printer', 'save');
|
||||
},
|
||||
|
||||
data_query: function(tipe, mode){
|
||||
data_query(tipe, mode) {
|
||||
if (tipe === 'form-printer'){
|
||||
new Request({
|
||||
url: this.PHP + '/form_printer',
|
||||
@@ -58,7 +58,7 @@ var PrinterJS = {
|
||||
}
|
||||
},
|
||||
|
||||
update_event: function(){
|
||||
update_event() {
|
||||
if ($.inArray($('#mode').val(), ['edit']) >= 0) {
|
||||
$('#butBrow').prop('disabled', true);
|
||||
$('#butUbah').prop('disabled', true);
|
||||
|
||||
Reference in New Issue
Block a user