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 MenuGrupJS = {
|
||||
PHP: '',
|
||||
KODE: '',
|
||||
|
||||
index: function(){
|
||||
index() {
|
||||
this.data_query();
|
||||
$('#Cari_Grup').keydown((e) => {
|
||||
var key = e.keyCode || e.which || 0;
|
||||
@@ -28,7 +28,7 @@ var MenuGrupJS = {
|
||||
FoniaJS.setFocus('#Cari_Grup');
|
||||
},
|
||||
|
||||
detail_show: function(mode, ID){
|
||||
detail_show(mode, ID) {
|
||||
new Request({
|
||||
url: this.PHP + '/detail_grup',
|
||||
sendParam: ['mode='+mode,'Grup_MenuID='+ID],
|
||||
@@ -40,15 +40,15 @@ var MenuGrupJS = {
|
||||
}).send();
|
||||
},
|
||||
|
||||
detail_tambah: function(){
|
||||
detail_tambah() {
|
||||
this.detail_show('add', 0);
|
||||
},
|
||||
|
||||
detail_ubah: function(acell){
|
||||
detail_ubah(acell) {
|
||||
this.detail_show('edit', acell[0]);
|
||||
},
|
||||
|
||||
detail_hapus: function(acell){
|
||||
detail_hapus(acell) {
|
||||
FoniaJS.showConfirm("Konfirmasi", "Yakin akan hapus "+acell[1]+"?", function(){
|
||||
new Request_JSF({
|
||||
url: this.PHP + '/table_detail',
|
||||
@@ -58,7 +58,7 @@ var MenuGrupJS = {
|
||||
}.bind(this), 'danger');
|
||||
},
|
||||
|
||||
detail_save: function(){
|
||||
detail_save() {
|
||||
new Request_JSF({
|
||||
url: this.PHP + '/table_detail',
|
||||
sendParam: ['mode','Grup_MenuID','Nama_Grup','Ket','Aktif','Cari_Grup'],
|
||||
@@ -69,7 +69,7 @@ var MenuGrupJS = {
|
||||
}).send();
|
||||
},
|
||||
|
||||
menu_show: function(acell){
|
||||
menu_show(acell) {
|
||||
new Request({
|
||||
url: this.PHP + '/detail_menu',
|
||||
sendParam: ['Grup_MenuID='+acell[0]],
|
||||
@@ -92,15 +92,15 @@ var MenuGrupJS = {
|
||||
}).send();
|
||||
},
|
||||
|
||||
menu_ceksemua: function(){
|
||||
menu_ceksemua() {
|
||||
$('#tabMenuList input.form-check-input[type=checkbox]').prop('checked', true);
|
||||
},
|
||||
|
||||
menu_hapussemua: function(){
|
||||
menu_hapussemua() {
|
||||
$('#tabMenuList input.form-check-input[type=checkbox]').prop('checked', false);
|
||||
},
|
||||
|
||||
menu_simpan: function(){
|
||||
menu_simpan() {
|
||||
var alist = [];
|
||||
$('#tabMenuList tbody input.form-check-input[type=checkbox]:checked').map((i, b) => {
|
||||
alist.push($(b).val());
|
||||
@@ -119,7 +119,7 @@ var MenuGrupJS = {
|
||||
}).send();
|
||||
},
|
||||
|
||||
data_query: function(){
|
||||
data_query() {
|
||||
new Request_JSF({
|
||||
url: this.PHP + '/table_detail',
|
||||
sendParam: ['Cari_Grup'],
|
||||
|
||||
Reference in New Issue
Block a user