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 MemberGrupJS = {
|
||||
PHP: '',
|
||||
KODE: '',
|
||||
|
||||
index: function(){
|
||||
index() {
|
||||
this.data_query('detail');
|
||||
$('#Cari_Member').keydown((e) => {
|
||||
var key = e.keyCode || e.which || 0;
|
||||
@@ -28,7 +28,7 @@ var MemberGrupJS = {
|
||||
FoniaJS.setFocus('#Cari_Member');
|
||||
},
|
||||
|
||||
detail_show: function(mode, ID){
|
||||
detail_show(mode, ID) {
|
||||
new Request({
|
||||
url: this.PHP + '/form_grup',
|
||||
sendParam: ['mode_detail='+mode,'Grup_MemberID='+ID],
|
||||
@@ -40,15 +40,15 @@ var MemberGrupJS = {
|
||||
}).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_detail',
|
||||
@@ -60,7 +60,7 @@ var MemberGrupJS = {
|
||||
}, 'danger');
|
||||
},
|
||||
|
||||
detail_save: function(){
|
||||
detail_save() {
|
||||
new Request_JSF({
|
||||
url: this.PHP + '/table_detail',
|
||||
sendParam: ['mode_detail','Grup_MemberID','Kode_Grup','Nama_Grup','Aktif','Cari_Member'],
|
||||
@@ -71,7 +71,7 @@ var MemberGrupJS = {
|
||||
}).send();
|
||||
},
|
||||
|
||||
data_query: function(tipe, mode){
|
||||
data_query(tipe, mode) {
|
||||
if (tipe=="detail"){
|
||||
new Request_JSF({
|
||||
url: this.PHP + '/table_detail',
|
||||
|
||||
Reference in New Issue
Block a user