- 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.
60 lines
1.7 KiB
JavaScript
60 lines
1.7 KiB
JavaScript
/*******************************************************************
|
|
|
|
PHP Class : /Controller/System/ConfigController
|
|
Description : Konfigurasi Informasi Perusahaan
|
|
Created By : Siau Pheng ([email protected]).
|
|
Created Date : May 25th, 2010.
|
|
Last Modified : August 14th, 2026.
|
|
|
|
(c) 3FONIA Software; WWW.3FONIA.COM.
|
|
|
|
*******************************************************************/
|
|
|
|
var ConfigJS = {
|
|
PHP: '',
|
|
KODE: '',
|
|
|
|
index() {
|
|
$('#butUbah').click(() => this.proses_edit());
|
|
$('#butSimpan').click(() => this.proses_save());
|
|
this.data_query('view');
|
|
},
|
|
|
|
proses_edit() {
|
|
this.data_query('edit');
|
|
},
|
|
|
|
proses_save() {
|
|
new Request({
|
|
url: this.PHP + '/config',
|
|
sendParam: ['mode=save','REG_ID','REG_ADDRESS','REG_CITY','REG_POSTCODE','REG_PHONE','REG_EMAIL','REG_OWNER','REG_NPWP'],
|
|
onSuccess: (ajson) => {
|
|
$('#divMaster').html(ajson.html);
|
|
this.update_event();
|
|
}
|
|
}).send()
|
|
},
|
|
|
|
data_query(mode) {
|
|
new Request({
|
|
url: this.PHP + '/config',
|
|
sendParam: ['mode='+mode],
|
|
onSuccess: (ajson) => {
|
|
$('#divMaster').html(ajson.html);
|
|
this.update_event();
|
|
}
|
|
}).send()
|
|
},
|
|
|
|
update_event() {
|
|
if ($.inArray($('#mode').val(), ['edit']) !== -1) {
|
|
$("#butUbah").prop('disabled', true);
|
|
$("#butSimpan").prop('disabled', false);
|
|
} else {
|
|
$("#butUbah").prop('disabled', false);
|
|
$("#butSimpan").prop('disabled', true);
|
|
}
|
|
}
|
|
|
|
};
|