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 PointSkemaJS = {
|
||||
PHP: '',
|
||||
KODE: '',
|
||||
|
||||
index: function(){
|
||||
index() {
|
||||
this.data_query('detail');
|
||||
$('#Cari_Skema').keydown((e) => {
|
||||
var key = e.keyCode || e.which || 0;
|
||||
@@ -28,7 +28,7 @@ var PointSkemaJS = {
|
||||
FoniaJS.setFocus('#Cari_Skema');
|
||||
},
|
||||
|
||||
detail_show: function(mode, ID){
|
||||
detail_show(mode, ID) {
|
||||
new Request({
|
||||
url: this.PHP + '/form_skema',
|
||||
sendParam: ['mode_detail='+mode,'PointID='+ID],
|
||||
@@ -43,15 +43,15 @@ var PointSkemaJS = {
|
||||
}).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[5]+'"</b> ?', () => {
|
||||
new Request_JSF({
|
||||
url: this.PHP + '/table_detail',
|
||||
@@ -61,7 +61,7 @@ var PointSkemaJS = {
|
||||
}, 'danger');
|
||||
},
|
||||
|
||||
detail_save: function(){
|
||||
detail_save() {
|
||||
new Request_JSF({
|
||||
url: this.PHP + '/table_detail',
|
||||
sendParam: ['mode_detail','PointID','Point_TipeID','KartuID','CabID','Grup_MemberID','Nilai_Jual','Grup_Barang','Kode_Barang','Tgl_Mulai','Aktif','Cari_Skema'],
|
||||
@@ -72,7 +72,7 @@ var PointSkemaJS = {
|
||||
}).send();
|
||||
},
|
||||
|
||||
grup_form: function(){
|
||||
grup_form() {
|
||||
new Request({
|
||||
url: this.PHP + '/form_grup',
|
||||
sendParam: ['Grup_Barang'],
|
||||
@@ -87,15 +87,15 @@ var PointSkemaJS = {
|
||||
}).send();
|
||||
},
|
||||
|
||||
grup_semua: function(){
|
||||
grup_semua() {
|
||||
$('#tabGrupList input.form-check-input[type=checkbox]').prop('checked', true);
|
||||
},
|
||||
|
||||
grup_clear: function(){
|
||||
grup_clear() {
|
||||
$('#tabGrupList input.form-check-input[type=checkbox]').prop('checked', false);
|
||||
},
|
||||
|
||||
grup_save: function(){
|
||||
grup_save() {
|
||||
var alist = [];
|
||||
$('#tabGrupList tbody input.form-check-input[type=checkbox]:checked').map((i, b) => {
|
||||
alist.push($(b).val());
|
||||
@@ -104,7 +104,7 @@ var PointSkemaJS = {
|
||||
FoniaJS.closeWindow(this.winGrup);
|
||||
},
|
||||
|
||||
barang_form: function(){
|
||||
barang_form() {
|
||||
new Request({
|
||||
url: this.PHP + '/form_barang',
|
||||
sendParam: ['Kode_Barang'],
|
||||
@@ -117,7 +117,7 @@ var PointSkemaJS = {
|
||||
}).send();
|
||||
},
|
||||
|
||||
barang_hapus: function(acell){
|
||||
barang_hapus(acell) {
|
||||
FoniaJS.showConfirm('Konfirmasi', 'Yakin akan hapus <b>"'+acell[1]+'"</b> ?', () => {
|
||||
new Request_JSF({
|
||||
url: this.PHP + '/table_barang',
|
||||
@@ -127,7 +127,7 @@ var PointSkemaJS = {
|
||||
}, 'danger');
|
||||
},
|
||||
|
||||
data_query: function(tipe, mode){
|
||||
data_query(tipe, mode) {
|
||||
if (tipe=="detail"){
|
||||
new Request_JSF({
|
||||
url: this.PHP + '/table_detail',
|
||||
@@ -142,7 +142,7 @@ var PointSkemaJS = {
|
||||
}
|
||||
},
|
||||
|
||||
Produk_Comp: function(item){
|
||||
Produk_Comp(item) {
|
||||
new Request_JSF({
|
||||
url: PointSkemaJS.PHP + '/table_barang',
|
||||
sendParam: ['mode_detail=insert','Kode_Barang','InvID='+item.value]
|
||||
|
||||
Reference in New Issue
Block a user