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:
2026-11-01 14:57:54 +07:00
parent be2091eddd
commit aaaf0a9215
92 changed files with 749 additions and 749 deletions
+5 -5
View File
@@ -14,17 +14,17 @@ var GajiJS = {
PHP: '',
KODE: '',
index: function(){
index() {
$('#butUbah').click(() => this.proses_edit());
$('#butSimpan').click(() => this.proses_save());
this.data_query('view');
},
proses_edit: function(){
proses_edit() {
this.data_query('update');
},
proses_save: function(){
proses_save() {
new Request({
url: this.PHP + '/form_gaji',
sendParam: ['mode_detail=save','REG_ID','LEMBUR','BONUS1','BONUS2'],
@@ -36,7 +36,7 @@ var GajiJS = {
}).send()
},
data_query: function(mode){
data_query(mode) {
new Request({
url: this.PHP + '/form_gaji',
sendParam: ['mode_detail='+mode,'REG_ID'],
@@ -47,7 +47,7 @@ var GajiJS = {
}).send()
},
update_event: function(){
update_event() {
if ($.inArray($('#mode_detail').val(), ['update']) >= 0) {
$("#butUbah").prop('disabled', true);
$("#butSimpan").prop('disabled', false);
+7 -7
View File
@@ -14,7 +14,7 @@ var RekGrupJS = {
PHP: '',
KODE: '',
index: function(){
index() {
this.data_query('detail');
$('#Cari_Rek').keydown((e) => {
var key = e.keyCode || e.which || 0;
@@ -28,7 +28,7 @@ var RekGrupJS = {
FoniaJS.setFocus('#Cari_Rek');
},
detail_show: function(mode, ID){
detail_show(mode, ID) {
new Request({
url: this.PHP + '/form_grup',
sendParam: ['mode_detail='+mode,'Grup_RekID='+ID],
@@ -40,15 +40,15 @@ var RekGrupJS = {
}).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[1]+'"</b> ?', () => {
new Request_JSF({
url: this.PHP + '/table_detail',
@@ -60,7 +60,7 @@ var RekGrupJS = {
}, 'danger');
},
detail_save: function(){
detail_save() {
new Request_JSF({
url: this.PHP + '/table_detail',
sendParam: ['mode_detail','Grup_RekID','Nama_Grup','Aktif','Cari_Rek'],
@@ -71,7 +71,7 @@ var RekGrupJS = {
}).send();
},
data_query: function(tipe, mode){
data_query(tipe, mode) {
if (tipe=="detail"){
new Request_JSF({
url: this.PHP + '/table_detail',
+7 -7
View File
@@ -14,7 +14,7 @@ var KaryawanJS = {
PHP: '',
KODE: '',
index: function(){
index() {
this.data_query('detail');
$('#Cari_Karya').keydown((e) => {
var key = e.keyCode || e.which || 0;
@@ -28,7 +28,7 @@ var KaryawanJS = {
FoniaJS.setFocus('#Cari_Karya');
},
detail_show: function(mode, ID){
detail_show(mode, ID) {
new Request({
url: this.PHP + '/form_karya',
sendParam: ['mode_detail='+mode,'KaryaID='+ID],
@@ -38,15 +38,15 @@ var KaryawanJS = {
}).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',
@@ -56,7 +56,7 @@ var KaryawanJS = {
}, 'danger');
},
detail_save: function(){
detail_save() {
new Request_JSF({
url: this.PHP + '/table_detail',
sendParam: ['mode_detail','KaryaID','Nama_Karya','Gaji_Harian','Tgl_Masuk','Tgl_Keluar','Aktif','Cari_Karya'],
@@ -67,7 +67,7 @@ var KaryawanJS = {
}).send();
},
data_query: function(tipe, mode){
data_query(tipe, mode) {
if (tipe=="detail"){
new Request_JSF({
url: this.PHP + '/table_detail',
+9 -9
View File
@@ -14,7 +14,7 @@ var RekJS = {
PHP: '',
KODE: '',
index: function(){
index() {
this.data_query('detail');
$('#butPrint').click(() => this.print_show());
$('#Cari_Rek').keydown((e) => {
@@ -29,7 +29,7 @@ var RekJS = {
FoniaJS.setFocus('#Cari_Rek');
},
print_show: function(){
print_show() {
new Request({
url: this.PHP + '/detail_print',
onSuccess: (ajson) => {
@@ -42,7 +42,7 @@ var RekJS = {
}).send();
},
print_rek: function(prt){
print_rek(prt) {
var cetak = new Printer(this.PHP + '/print_rek');
cetak.add_param("Grup_RekID");
cetak.add_param("Level");
@@ -51,7 +51,7 @@ var RekJS = {
FoniaJS.closeWindow(this.winDPrint);
},
detail_show: function(mode, ID){
detail_show(mode, ID) {
new Request({
url: this.PHP + '/form_rek',
sendParam: ['mode_detail='+mode,'Kode_Rek='+ID],
@@ -61,15 +61,15 @@ var RekJS = {
}).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[1]+'"</b> ?', () => {
new Request_JSF({
url: this.PHP + '/table_detail',
@@ -79,7 +79,7 @@ var RekJS = {
}, 'danger');
},
detail_save: function(){
detail_save() {
new Request_JSF({
url: this.PHP + '/table_detail',
sendParam: ['mode_detail','Kode_Rek','Kode_Induk','Nama_Rek','Grup_RekID','Level','Mode','Kas_Rek','Aktif','Cari_Rek'],
@@ -90,7 +90,7 @@ var RekJS = {
}).send();
},
data_query: function(tipe, mode){
data_query(tipe, mode) {
if (tipe=="detail"){
new Request_JSF({
url: this.PHP + '/table_detail',